Hi and thanks for the help.

I'm using JBoss 4 and 3.2 and Postgres for the CMP. With the property
"TransactionIsolation" set to TRANSACTION_SERIALIZABLE Postgres seems to
use that specific isolation level but that doesn't make all the
transactions serializable; deadlock can still occur. Even more strange
is that I get two different exceptions: 

javax.ejb.EJBException: null; CausedByException is: Application deadlock
detected: Two or more transactions contention.

but sometimes

javax.ejb.TransactionRolledbackLocalException: A CMR field cannot be set
or added to a relationship in ejbCreate; this should be done in the
ejbPostCreate method instead [EJB 2.0 Spec. 10.5.2].; CausedByException
is: A CMR field cannot be set or added to a relationship in ejbCreate;
this should be done in the ejbPostCreate method instead [EJB 2.0 Spec.
10.5.2].

I'm 100% sure that I don't set any of my relations in ejbCreate() so
this must be some kind of bug?

Is there a way in JBoss to specify that all transactions must happen
serialized?

Thanks again
Jonas


On Thu, 2002-12-05 at 20:33, Rod Cope wrote:
> In JBoss 3.0+, it's a <config-property> named "TransactionIsolation" you
> need to add to your data source deployment.  Here's an example from our
> mysql-service.xml:
> 
>     <depends optional-attribute-name="ManagedConnectionFactoryName">
>       <!--embedded mbean-->
>       <mbean code="org.jboss.resource.connectionmanager.RARDeployment"
> name="jboss.jca:service=LocalTxDS,name=MySqlDS">
> 
>         <attribute name="JndiName">MySqlDS</attribute>
> 
>         <attribute name="ManagedConnectionFactoryProperties">
>           <properties>
>             <config-property name="ConnectionURL"
> type="java.lang.String">jdbc:mysql://localhost:3306/jbossdb</config-prop
> erty>
>             <config-property name="DriverClass"
> type="java.lang.String">com.mysql.jdbc.Driver</config-property>
>             <!--set these only if you want only default logins, not
> through JAAS -->
>             <config-property name="UserName"
> type="java.lang.String">root</config-property>
>             <config-property name="Password"
> type="java.lang.String">password</config-property>
>             <config-property name="TransactionIsolation"
> type="java.lang.String">TRANSACTION_SERIALIZABLE</config-property>
>           </properties>
> 
>         </attribute>
> 
> <!--Below here are advanced properties -->
>         <!--hack-->
>         <depends
> optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployme
> nt,name=JBoss LocalTransaction JDBC Wrapper</depends>
> 
>       </mbean>
>     </depends>
> 
> 
> Rod Cope
> EJB Solutions, Inc.
> [EMAIL PROTECTED]
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of David
> Jencks
> Sent: Thursday, December 05, 2002 12:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Jboss-user] Serializable Transactions?
> 
> It's always a good idea to tell us what jboss version you are using.  I
> think you can set transacction isolation for all jboss 3++ versions in
> the
> datasource configuration file.  As I recall you can use a string == the
> constant name.  If it's not in an example file look in the ra.xml for
> one
> of the wrappers.
> 
> I think it is also possible to set this in 2.4, but don't remember the
> details.
> 
> david jencks
> 
> On 2002.12.05 10:09:13 -0500 Jonas Engman wrote:
> > I'm having some troubles with deadlocks with a SessionBean and three
> > Entity beans and an easy solution would be to run all transactions
> > serialized. Is that somehow possible in JBoss?
> > 
> > Thanks
> > Jonas
> > 
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > 
> > 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
Jonas Engman <[EMAIL PROTECTED]>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to