Isolation level in EJB
Hi people,
I set isolation level into ejb-j2ee-engine.xml adding entity bean methods in order to have a lock in the records table (Oracle). In the xml I have the follow for each method:
<transaction-descriptor>
<isolation-level>
<method>
<ejb-name>DatabaseTabaccaiEjbBean</ejb-name>
<method-name>ejbFindByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.Long</method-param>
</method-params>
</method>
When I deploy the EAR containing the EJB project I have the follow error:
Caught exception during application deployment from SAP J2EE Engine's deploy service:java.rmi.RemoteException: Cannot deploy application sap.com/DatabaseTabaccaiEar.. Reason: Cannot find method ejbFindByPrimaryKey(java.lang.Long) declared in ejb-j2ee-engine.xml.; nested exception is: com.sap.engine.services.ejb.exceptions.deployment.EJBXMLParserException: Cannot find method ejbFindByPrimaryKey(java.lang.Long) declared in ejb-j2ee-engine.xml. (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
Where is the problem?
Thanks,
Vito
For 5.1, look at:
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#107261
7
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_reference.html#1061916
"marshalli" <[email protected]> wrote in message
news:3a59546d$[email protected]..
>
> How to set the isolation level(Container Manager or Bean Manager) in EJB.
Thanks
>
>
Similar Messages
-
Transaction Isolation Level for EJB methods
L.S.
I just found out the in OC4J one can not set the transaction isolation level on ejb methods. Moreover one needs to revert to bean managed transaction (manual coding of the ALL transaction logic) to set the isolation level.
On entity beans one can only set the isolation level for the whole bean (not on individual methods), and in session beans there is no way at all to set the isolation level.
This is on shear contract to all other application servers I used before (there one can declaratively set the isolation level for a ejb method, both in session and in entitybean deployment descriptors)
Is it foreseen in a future release to include such a valuable feature will be provided by oc4j?
Note that I was VERY surprised that OC4J could not handle this (I checked the j2ee spec, but admittedly the spec is a little vague about this support and makes it vendor dependent. the j2ee spec does not mandate this, except for CMP entity beans, but includes some suggestions on this ability. But most other application servers implemented the ability)
Regadrs,
ErikHello Erik --
I think we met in Perth recently?
Anyway, your information is correct.
We can set the transaction isolation level for each entity bean, at the bean level. We don't have for the specification of method level isolation settings -- I'd be interested to hear how you would like/do use this. What behaviour do you expect to see when a transaction is started that spans multiple methods on a bean with different declared isolation levels.
For session beans, we do not currently have the ability to declaratively specify the isolation level to use for the bean. I know this is not in the forthcoming 904 release, and will to check what is beyond that.
As you point out, this can be done programatically using the Connection.setIsolationLevel() method on any connections you are using from within the session bean.
I'd would like to log an enhancement request for you for this functionality. Can you send me an email at [email protected] and we'll take it offline.
-steve- -
Set isolation level in EJB 2.0
how can i set isolation level to a transaction in EJB 2.0.
If anybody can give example code much appriciatedFor 5.1, look at:
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#107261
7
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_reference.html#1061916
"marshalli" <[email protected]> wrote in message
news:3a59546d$[email protected]..
>
> How to set the isolation level(Container Manager or Bean Manager) in EJB.
Thanks
>
>
-
How to set isolation level in EJB?
How to set the isolation level(Container Manager or Bean Manager) in EJB. Thanks
For 5.1, look at:
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#107261
7
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_reference.html#1061916
"marshalli" <[email protected]> wrote in message
news:3a59546d$[email protected]..
>
> How to set the isolation level(Container Manager or Bean Manager) in EJB.
Thanks
>
>
-
EJB Isolation levels in ejb-j2ee-engine.xml
Can anyone explain to me why I only seem to have the option of using the 'repeatable read' isolation level in Netweaver Developer Studio?
I'm new to SAP and Netweaver but as a seasoned J2EE developer I would have expected to find read committed, read uncommitted, serializable, as well as repeatable read.
Is there some SAP or Netweaver specific reason why I don't get to choose these options, or do I need to enable them by configuring properties somewhere?Hi Steve,
The reason is that the J2EE Engine EJB Container supports Read Committed and Repeatable Read isolation levels and Read Committed is the default one. That's why you only have the option of specifying Repeatable Read.
For more information on locking and isolation levels please have a look at these documents:
http://help.sap.com/saphelp_nw04/helpdata/en/37/019b3e25f95f14e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/a1/d81db94a10bc4b83b3f60b0e3037e7/frameset.htm
Best regards,
Vladimir -
Setting transaction isolation level in Weblogic 5.1
Hi,
I'm using Weblogic server5.1 and i'm trying to set the isolation level on one
of my session bean. Below is the code :
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>chargeMgr</ejb-name>
<jndi-name>chargeMgr</jndi-name>
<transaction-isolation>
<isolation-level>Serializable</isolation-level>
<method>
<ejb-name>chargeMgr</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
</transaction-isolation>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
I have checked the syntax against the weblogic documentation.
However, when i try to jar the beans up into the jar file (weblogic.ejbc), it
give me the following error :
org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allows no further
input; "transaction-isolation" is not allowed.
Can anyone help?
Regards.
yes, only in weblogic-ejb-jar.xml , and you can see that from the DTD
source.
thanks
Yu
"cw lee" <[email protected]> wrote in message
news:[email protected]...
>
> thanks for ur advice.
>
> one thing i forgot to mention is that the isolation-level was specified in
weblogic-ejb-jar.xml.
> Do u mean that it must be placed in weblogic-cmp-rdbms-jar.xml and not
weblogic-ejb-jar.xml
> ?
>
> Are the codes u suggested to be in weblogic-ejb-jar.xml or
weblogic-cmp-rdbms-jar.xml
> ?
>
> Regards.
>
>
>
> "Yu Tian" <[email protected]> wrote:
> >the right name for Seriealizable should be: TRANSACTION_SERIALIZABLE.
> >so the
> >DD looks like:
> >
> ><?xml version="1.0"?>
> >
> ><!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
> >5.1.0
> >EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
> >
> ><weblogic-ejb-jar>
> > <weblogic-enterprise-bean>
> > <ejb-name>containerManaged</ejb-name>
> > <caching-descriptor>
> > <max-beans-in-cache>1000</max-beans-in-cache>
> > </caching-descriptor>
> > <persistence-descriptor>
> > <persistence-type>
> > <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
> > <type-version>5.1.0</type-version>
> > <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
> > </persistence-type>
> > <persistence-use>
> > <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
> > <type-version>5.1.0</type-version>
> > </persistence-use>
> > </persistence-descriptor>
> > <jndi-name>containerManaged.AccountHome</jndi-name>
> > <transaction-isolation>
> > <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
> > <method>
> > <ejb-name>containerManaged</ejb-name>
> > <method-name>*</method-name>
> > </method>
> > </transaction-isolation>
> > </weblogic-enterprise-bean>
> > </weblogic-ejb-jar>
> >
> >Thanks
> >
> >Yu
> >
> >
> >"cw lee" <[email protected]> wrote in message
> >news:[email protected]...
> >>
> >> Hi,
> >>
> >> I'm using Weblogic server5.1 and i'm trying to set the isolation level
> >on
> >one
> >> of my session bean. Below is the code :
> >>
> >> <weblogic-ejb-jar>
> >> <weblogic-enterprise-bean>
> >> <ejb-name>chargeMgr</ejb-name>
> >> <jndi-name>chargeMgr</jndi-name>
> >> <transaction-isolation>
> >> <isolation-level>Serializable</isolation-level>
> >> <method>
> >> <ejb-name>chargeMgr</ejb-name>
> >> <method-intf>Remote</method-intf>
> >> <method-name>*</method-name>
> >> </method>
> >> </transaction-isolation>
> >> </weblogic-enterprise-bean>
> >> </weblogic-ejb-jar>
> >>
> >> I have checked the syntax against the weblogic documentation.
> >> However, when i try to jar the beans up into the jar file
(weblogic.ejbc),
> >it
> >> give me the following error :
> >>
> >> org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean"
allows
> >no further
> >> input; "transaction-isolation" is not allowed.
> >>
> >> Can anyone help?
> >>
> >> Regards.
> >>
> >
> >
>
-
Oracle XA driver and isolation level
We have an Entity EJB that has isolation level specified in its
deployment descriptor and everything works fine if we use the non-XA
Oracle 9i driver.
However when we use the Oracle 9i Release 2 XA driver we get the
following exception:
java.sql.SQLException: Due to vendor limitations, setting transaction
isolation for "Oracle 8.1.7 XA" JDBC XA driver is not supported.
at
weblogic.jdbc.jta.DataSource.setTxIsolationFromTxProp(DataSource.java:1126)
at
weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1109)
at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:145)
at weblogic.jdbc.jta.Connection.getAutoCommit(Connection.java:247)
at
weblogic.jdbc.rmi.internal.ConnectionImpl.getAutoCommit(ConnectionImpl.java:173)
at
weblogic.jdbc.rmi.SerialConnection.getAutoCommit(SerialConnection.java:164)
Note the 8.1.7 version that the container prints. The driver is
definitely 9i and not 8.1.7 and it's the very first thing in the classpath.
Is this a problem with the driver really or is it a WLS issue?
Thanks,
DejanHi,
I removed the transaction isolation level setting from the deployment
descriptor and it works now as expected.
But in the meanwhile I also ran a test by using the driver directly
without Weblogic and I was able to successfully set the transaction
isolation level on the XA connections so I believe it's a Weblogic problem.
Dejan
Deyan D. Bektchiev wrote:
Yes,
We know about this but we just try to set it to the default one
(READ_COMMITED) which is probably redundant for Oracle but might not
be the default one for another DB vendor.
Here is the part of the deployment descriptor:
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
<method>
<ejb-name>Event</ejb-name>
<method-name>*</method-name>
</method>
</transaction-isolation>
Dejan
Slava Imeshev wrote:
Deyan,
I'm not 100% sure, but AFAIR oracle doesn't support all isolation
levels.
Which level do you set? Could you show us this part of the deployment
descriptor?
Slava
"Deyan D. Bektchiev" <[email protected]> wrote in message
news:[email protected]...
Thanks for the reply Sree,
Yes the 9i driver is the very first thing in the classpath as otherwise
we wouldn't even be able to connect to the 9i database with the 8.1.7
driver (we were getting lots of other exceptions when we were still
using the 8.1.7 driver).
I'll try removing the setting of the isolation level and I'll post the
result to the newsgroup.
Dejan
Sree Bodapati wrote:
hi Deyan,
java.sql.SQLException: Due to vendor limitations, setting
transaction
isolation for "Oracle 8.1.7 XA" JDBC XA driver is not supported.
should not have showed up with wrong version of oracle. If you can
verifiy
that the thin driver is the first thing in the classpath and you are
indeed
using the thin driver, This is a bug.
But in this case it looks like you need to remove the
TransactionIsolation
level from the EJB descriptor to get this to work. can you try that? I
will
forward this to one of our EJB engineers and see if we can get some
help
for
you.
sree
"Deyan D. Bektchiev" <[email protected]> wrote in message
news:[email protected]...
Sree,
We already did but the only answer we got was that the Oracle 9i
Release
2 driver was not at all supported by Weblogic 7.0 SP1.
But the certification page says that it is even certified...
So which one is true: The Oracle 9i Release 2 driver is not
supported or
is supported?
--dejan
Sree Bodapati wrote:
Please file a support case for this at [email protected]
"Deyan D. Bektchiev" <[email protected]> wrote in message
news:[email protected]...
We have an Entity EJB that has isolation level specified in its
deployment descriptor and everything works fine if we use the
non-XA
Oracle 9i driver.
However when we use the Oracle 9i Release 2 XA driver we get the
following exception:
java.sql.SQLException: Due to vendor limitations, setting
transaction
isolation for "Oracle 8.1.7 XA" JDBC XA driver is not supported.
at
weblogic.jdbc.jta.DataSource.setTxIsolationFromTxProp(DataSource.java:1126
at
weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1109)
at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:145)
at
weblogic.jdbc.jta.Connection.getAutoCommit(Connection.java:247)
at
weblogic.jdbc.rmi.internal.ConnectionImpl.getAutoCommit(ConnectionImpl.jav
a
>
173)
at
weblogic.jdbc.rmi.SerialConnection.getAutoCommit(SerialConnection.java:164
Note the 8.1.7 version that the container prints. The driver is
definitely 9i and not 8.1.7 and it's the very first thing in the
classpath.
Is this a problem with the driver really or is it a WLS issue?
Thanks,
Dejan -
How to set isolation level for BMP
Hi.
We're trying to avoid the ORA-08177 by setting the isolation level in the weblogic-ejb-jar.xml
to READ_COMMITED
Still (looking in the jdbc.log) it seems that weblogic set the transaction isolation
level to SERIALIZABLE
The xml :
<weblogic-enterprise-bean>
<ejb-name>Account</ejb-name>
<caching-descriptor>
<max-beans-in-cache>100</max-beans-in-cache>
<idle-timeout-seconds>600</idle-timeout-seconds>
<cache-strategy>Read-Write</cache-strategy>
</caching-descriptor>
<persistence-descriptor>
<delay-updates-until-end-of-tx>true</delay-updates-until-end-of-tx>
<finders-call-ejbload>false</finders-call-ejbload>
</persistence-descriptor>
<clustering-descriptor>
<home-is-clusterable>false</home-is-clusterable>
<home-load-algorithm>round-robin</home-load-algorithm>
</clustering-descriptor>
<enable-call-by-reference>false</enable-call-by-reference>
<jndi-name>Account</jndi-name>
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
<method><ejb-name>Account</ejb-name><method-name>*</method-name></method>
</transaction-isolation>
</weblogic-enterprise-bean>
RegardsWhen I marked all the beans with READ_COMMITED it works.
-
Error defining transaction-isolation at weblogic-ejb-jar.xml
Hi,
.. from WebLogic 5.1 reference:
(...) the top level elements in weblogic-ejb-jar.xml are as follows:
. description
. weblogic-version
. weblogic-enterprise-bean
. ejb-name
. caching-descriptor
. presistence-descriptor
. clustering-descriptor
. transaction-descriptor
. reference-descriptor
. enable-call-by-reference
. jndi-name
. TRANSACTION-ISOLATION
. security-role-assignment
this way i've appended a transaction isolation section immediatly after the jndi-name section
from my weblogic-ejb-jar.xml file to specify that all methods of my container-managed ejb
should use read-committed accesses to the database. But i've gotten the error message:
org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allows no further input; "transaction-isolation" is not allowed.
during compilation time at parsing. Nowhere else in the weblogic-ejb-jar.xml i can put the
isolation transaction section without receiving some related parsing error. The same happens
trying to include such transaction section at ejb-jar.xml. I'm attaching both xml files. Should
anybody help me saying where that section should be described? And if it should be placed in
another file, why the documentation states for describing it at the weblogic-ejb-jar.xml?
[weblogic-ejb-jar.xml]That means that you do not have the SP6 in the service pack and it is using
the old DTD.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Ana Benites" <[email protected]> wrote in message
news:[email protected]...
>
Cameron,
hello.
When you say "<enterprise-bean>" block, you mean"<weblogic-enterprise-bean>"block, isn't it?
>
Because you recommend in your response exactly what i was doing in myweblogic-ejb-jar.xml,
>
that i had attached to my message when openning this discussion. I copyit again here:
>
My weblogic-ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
>
>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>cluster.ejb.TellerHome</ejb-name>
<caching-descriptor>
</caching-descriptor>
<enable-call-by-reference>False</enable-call-by-reference>
<jndi-name>cluster.ejb.TellerHome</jndi-name>
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
>
<method>
<ejb-name>cluster.ejb.TellerHome</ejb-name>
<method-name>*</method-name>
</method>
</transaction-isolation>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
...and this is resulting in the following parsing error during compiletime:
>
>
org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allowsno further input; "transaction-isolation" is not allowed.
at com.sun.xml.parser.Parser.error(Parser.java:2775)
atcom.sun.xml.parser.ValidatingParser$ChildrenValidator.consume(ValidatingPars
er.java:306)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1280)
at com.sun.xml.parser.Parser.content(Parser.java:1498)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
at com.sun.xml.parser.Parser.content(Parser.java:1498)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:491)
at com.sun.xml.parser.Parser.parse(Parser.java:283)
at weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:69)
at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
atweblogic.ejb.deployment.dd.DescriptorLoader.<init>(DescriptorLoader.java:157
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
Am i forgetting anything?
Thanks for your help
Ana.
"Cameron Purdy" <[email protected]> wrote:
Hi Ana,
Add to weblogic-ejb-jar.xml:
Inside each <enterprise-bean> block, add the following immediately before
the block closes:
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
<method>
<ejb-name></ejb-name>
<method-name>*</method-name>
</method>
</transaction-isolation>
The <ejb-name> value of the <method> block of the <transaction-isolation>
block must match the <ejb-name> value of the <enterprise-bean> block.
Please note the case sensitive nature of the values.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Ana Benites" <[email protected]> wrote in message
news:[email protected]...
Thanks for your attention Cameron,
from my WebLogic Console one can read
"WebLogic Build 5.1.0 Service Pack 6 09/20/2000 21:03:19#84511"
...because i was suspecting the problem was due to a lack of
applying
the service pack 6. But even
after that upgrade the parsing errors remain.
regards
Ana
"Cameron Purdy" <[email protected]> wrote:
Ana,
The 5.1 release did NOT support transaction isolation in the
weblogic-ejb-jar.xml file.
That feature was introduced in a service pack. What SP are you using?
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Ana Benites" <[email protected]> wrote in message
news:[email protected]...
Hi,
.. from WebLogic 5.1 reference:
(...) the top level elements in weblogic-ejb-jar.xml are as follows:
description
weblogic-version
weblogic-enterprise-bean
. ejb-name
. caching-descriptor
. presistence-descriptor
. clustering-descriptor
. transaction-descriptor
. reference-descriptor
. enable-call-by-reference
. jndi-name
. TRANSACTION-ISOLATION
security-role-assignment
this way i've appended a transaction isolation section immediatly
after
the jndi-name section
from my weblogic-ejb-jar.xml file to specify that all methods of mycontainer-managed ejb
should use read-committed accesses to the database. But i've gotten
the
error message:
org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean"
allows
no further input; "transaction-isolation" is not allowed.
during compilation time at parsing. Nowhere else in theweblogic-ejb-jar.xml i can put the
isolation transaction section without receiving some related parsingerror. The same happens
trying to include such transaction section at ejb-jar.xml. I'm
attaching
both xml files. Should
anybody help me saying where that section should be described? And
if
it
should be placed in
another file, why the documentation states for describing it at theweblogic-ejb-jar.xml? -
Setting the isolation level in Toplink or in my EJB beans?
Hi,
Seems like you can set the isolation levels in both Toplink and in the deployment descriptor of your ejb project.
What is the recommended place to specify the isolation level settings?
With kind regards.Hi,
Seems like you can set the isolation levels in both Toplink and in the deployment descriptor of your ejb project.
What is the recommended place to specify the isolation level settings?
With kind regards. -
Setting db isolation level on transaction without EJB
I'm using UserTransaction in the servlet container, to control XA transactions.
We're not using EJB. How do I set the database isolation level? I'm tempted
to use java.sql.Connection.setTransactionIsolation(). However, the Sun Javadoc
for that method says you can't call that after the transaction has started (which
makes sense). Right now, we're starting the transaction, getting a connection,
closing the connection, and committing the transaction. I guess that order won't
work if I want to set the isolation level. Or am I mixing apples and oranges
here? If I use UserTransaction, is it even appropriate to try to set the isolation
level on the connection?
All I really want to do is change the default isolation level. We do not need
different isolation levels for different use cases. (Not yet, anyway.) We might
have transactions against two different database instances or other resource managers.
That's why I want to use UserTransaction and XA transactions.
Thanks!
Steve Molitor
[email protected]
Only committed transactions are replicated to the subscriber. But it is possible for the report to see dirty data if running in READ UNCOMMITTED or NOLOCK. You should run your reports in READ COMMITTED or SNAPSHOT isolation , and your replication
subscriber should be configured with READ COMMITTED SNAPSHOT ISLOATION eg
alter database MySubscriber set allow_snapshot_isolation on;
alter database MySubscriber set read_committed_snapshot on;
as recommended here
Enhance General Replication Performance.
David
David http://blogs.msdn.com/b/dbrowne/ -
Setting Transaction isolation level when I'm not in an EJB
I have a Message Driven Bean (MDB) that is container managed, and its transaction
isolation is set to TRANSACTION_READ_COMMITTED in weblogic-ejb-jar.xml and that
seems to work fine. If I look at an entity bean in onMessage which is updated/commited
outside the transaction I can see the updates no problem.
Now the problem is this.. inside the onMessage method, the MDB creates a new
instance of a class. This class starts up its own UserTransaction (using (UserTransaction)new
InitialContext().lookup("javax.transaction.UserTransaction")) and goes into a
loop working away. Inside the loop it is inspecting a value on an entity bean.
The classs never sees any updates to this bean which are made outside this new
UserTransaction.
It looks to me that the UserTransaction that the class is getting has a different
isolation level (serialized?). Is there a way to set the isolation level for
a UserTransaction?
Any help would be great!
lance
Just a follow up, I think the isolation level is perhaps being set to REPEATABLE_READ,
since that is what seems to be happening. The value from the first read is maintained
through subsequent reads in the same transaction.
lance
"Lance" <[email protected]> wrote:
>
>I have a Message Driven Bean (MDB) that is container managed, and its
>transaction
>isolation is set to TRANSACTION_READ_COMMITTED in weblogic-ejb-jar.xml
>and that
>seems to work fine. If I look at an entity bean in onMessage which is
>updated/commited
>outside the transaction I can see the updates no problem.
>
>Now the problem is this.. inside the onMessage method, the MDB creates
>a new
>instance of a class. This class starts up its own UserTransaction (using
>(UserTransaction)new
>InitialContext().lookup("javax.transaction.UserTransaction")) and goes
>into a
>loop working away. Inside the loop it is inspecting a value on an entity
>bean.
> The classs never sees any updates to this bean which are made outside
>this new
>UserTransaction.
>
>It looks to me that the UserTransaction that the class is getting has
>a different
>isolation level (serialized?). Is there a way to set the isolation level
>for
>a UserTransaction?
>
>Any help would be great!
>
>lance
-
How to set the isolation level on Entity EJBs
I am using 10.1.3.3 of the OC4J app server.
I am creating an application that uses EJB 2.1.
I am trying to set the isolation levels on the EJBs to either serializable or repeatable read.
When i deploy the EAR file from the OC4J admin console, i can set the isolation level property on the EJB's however when i inspect the orion-ejb-jar.xml file I do not see the isolation level being set. Furthermore, i tried to manually change the isolation setting by editing the orion-ejb-jar.xml and adding the isolation="serialiable" attribute on the entity bean descriptor. I then stopped and restarted the server. I noticed that my change was no longer in the file.
Can someone please let me know how to solve this problem and set the isolation level on Entity EJBs . ThanksI find it at ejb.pdf from BEA.
The transaction-isolation stanza can contain the elements shown here:
<transaction-isolation>
<isolation-level>Serializable</isolation-level>
<method>
<description>...</description>
<ejb-name>...</ejb-name>
<method-intf>...</method-intf>
<method-name>...</method-name>
<method-params>...</method-params>
</method>
</transaction-isolation>
"Hyun Min" <[email protected]> wrote in message
news:3c4e7a83$[email protected]..
> Hi!
>
> I have a question.
> How to set the transaction isolation level using CMT in descriptor?
>
> The Isolation level not supported in CMT?
>
> Thanks.
> Hyun Min
>
>
-
OCJ4's EJB transaction isolation level
Hello, all
Does OC4J supports various transaction isolation level?
I am using JDeveloper to create and deploy
EJBs and all I can find is transaction attributes,
and not isolation level. The book I am currently reading
suggests that there's tx isolation setting in BEA
WebLogic.
If anybody has found a way to do this in OC4J + Jdeveloer,
or if it is ever required, let me know.
ThanksHi
You can specify the isolation level using the "isolation" attribute of the "entity-deployment" tag.
Ex:
<entity-deployment name="MyEJB" isolation="serializable">
Go through the DTD for details :
http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd
--Shrini -
Hi ,
I was using the DDConvertor supplied with WL51 to convert my old
DeploymentDescriptor.txt to the new XML format.
I have noticed that the Isolation Level did not pass to the new format.
My entity bean is not container managed and the Isolation level is
READ_COMMITED .
No weblogic-cmp-rdbms-jar.xml File was generated.
Attached are the files.
Could you please tell me where can I specify the Isolation Level if I have
no rdbms file ?
thanks
Amit Sivan
[DeploymentDescriptor.txt]
[weblogic-ejb-jar.xml]weblogic-ejb-jar.xml
amit sivan wrote:
Hi ,
I was using the DDConvertor supplied with WL51 to convert my old
DeploymentDescriptor.txt to the new XML format.
I have noticed that the Isolation Level did not pass to the new format.
My entity bean is not container managed and the Isolation level is
READ_COMMITED .
No weblogic-cmp-rdbms-jar.xml File was generated.
Attached are the files.
Could you please tell me where can I specify the Isolation Level if I have
no rdbms file ?
thanks
Amit Sivan
; Copyright (c) 1998-1999 by BEA WebXpress. All Rights Reserved.
(EntityDescriptor
beanHomeName pay2card.OnlineHomeEntity
enterpriseBeanClassName pay2card.beans.online.entity.OnlineEntityBean
homeInterfaceClassName pay2card.beans.online.entity.OnlineEntityHome
remoteInterfaceClassName pay2card.beans.online.entity.OnlineEntity
isReentrant false
(accessControlEntries
; DEFAULT [admin manager]
); end accessControlEntries
(controlDescriptors
(DEFAULT
isolationLevel TRANSACTION_READ_COMMITTED
transactionAttribute TX_REQUIRED
runAsMode CLIENT_IDENTITY
; runAsIdentity admin
); end DEFAULT
); end controlDescriptors
(environmentProperties
; homeClassName
; ejbObjectClassName
maxBeansInFreePool 20
maxBeansInCache 1000
idleTimeoutSeconds 60
; isModifiedMethodName isModified
); end environmentProperties
; Entity EJBean-specific properties:
primaryKeyClassName pay2card.beans.online.entity.OnlinePK
; end entity EJBean-specific properties.
); end EntityDescriptor
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>pay2card.OnlineHomeEntity</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>20</max-beans-in-free-pool>
<max-beans-in-cache>1000</max-beans-in-cache>
<idle-timeout-seconds>60</idle-timeout-seconds>
</caching-descriptor>
<persistence-descriptor>
<delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>
</persistence-descriptor>
<jndi-name>pay2card.OnlineHomeEntity</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Maybe you are looking for
-
Itunes no longer works after installing 11.1.4
I installed Itunes 11.1.4 and noww ITUNES will not work. I have uninstalled all apple products and reinstalled, No Luck I have even tried a system restore point three different dates still no luck. I have even gone to Filehippo web site and tried to
-
How do I transfer music/files from my Iphone 4 to Iphone 5S??
Trying to take my old data from my IPhone 4S, push to the ICloud and then push to my new IPhone 5S....any help much appreciated
-
It is a $100 gift card and has already been redeemed and purchases have been made previously. There is a remaining balance on the card. When i sign into the app store, there used to be a balance that appeared beside the "account" tab, but now it is g
-
Good evening, I'm writing some articles on linguistics in Page and it seems I've found a displaying mistake in fonts with diacritic symbols. The problem is with the font Times New Roman, Arial. With Helvetica it's okay. Specifically the diacritic sym
-
How do i get adobe to stop asking me to identify me comments
how do i get adobe to stop asking me to identify my comment