Bugs item #1005213, was opened at 2004-08-07 17:55 Message generated for change (Settings changed) made by ejort You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1005213&group_id=22866
>Category: JBossServer Group: v3.2 >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Michael Remijan (mjremijan) >Assigned to: Adrian Brock (ejort) Summary: EJB DB transactions differ from 3.2.3 to 3.2.5 and higher Initial Comment: I have a simple local stateless session bean that uses two local entity beans to insert data into two seperate tables in the database. I've used Xdoclet 1.2.0 to generate all the deployement descriptors and all methods have "transaction=required". In version 3.2.3 ***Using Tomcat 5 from the docs/examples/tomcat directory!!!!*** The session bean uses the two entity beans successfully. The data gets inserted and the code continues. In version 3.2.5 and later (I tried 4.0.0DR4 and 4.0.0RC1) the transaction management seems to differ. The problem I have is that create() method of the first local entity bean gets excecuted but after that the second entity bean is never called. Instead, JBoss just hangs until a transaction timeout occurs. ----------------- 12:39:33,017 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl [Format Id=257, GlobalId=ladybug//17, BranchQual=] timed out. status=STATUS_ACTIVE ----------------- I've attached a zip file which should have everything in it to reproduce this problem. Here are the steps: --------------------------------------------------- JBoss 3.2.3 (This version had no problems working) --------------------------------------------------- (1) Create a database in PostgreSQL: $ initdb DSR (2) Execute the sql statements in "build_tables.sql" to create the tables (3) Copy jcache.jar, jdbc-pg74.214.jdbc3.jar to $jboss_home/server/tomcat5/lib (4) Copy postgres-ds.xml and 0.0.1-dsr.ear to $jboss_home/server/tomcat5/deploy (5) Make sure PostgreSQL is stared then start jboss. $jboss_home/bin/run.bat -c tomcat5 (6) Open a browserr to http://localhost:8080/homsuite. (7) Click "Become a member" on the right hand side. Fill out the form. (8) After you click "register" the DB information will be inserted and you'll be automatically logged in. --------------------------------------------------- JBoss 3.2.5 (This version **has** the problem) --------------------------------------------------- (1) Create a database in PostgreSQL: $ initdb DSR (2) Execute the sql statements in "build_tables.sql" to create the tables (3) Copy jcache.jar, jdbc-pg74.214.jdbc3.jar to $jboss_home/server/default/lib (4) Copy postgres-ds.xml and 0.0.1-dsr.ear to $jboss_home/server/default/deploy (5) Make sure PostgreSQL is stared then start jboss. $jboss_home/bin/run.bat (6) Open a browserr to http://localhost:8080/homsuite. (7) Click "Become a member" on the right hand side. Fill out the form. (8) After you click "register" the DB information will **not** be inserted and the browser will wait forever because the JBoss transaction is hung up and will eventually time out. Thanks, Michael ---------------------------------------------------------------------- >Comment By: Adrian Brock (ejort) Date: 2004-08-23 21:12 Message: Logged In: YES user_id=9459 If this really did work (which I doubt) on any previous version of JBoss it was a bug. You have AccountLocalSessionEjb.persist() which starts a new transaction. In that transaction it does AccountEjb.create() which locks the created bean Then you do AccountEjb.getId() on that bean, but with NOT_SUPPORTED. Since the bean is already locked to the transaction, access outside a transaction is not allowed (this is a self deadlock and the transaction will timeout). What you really want is read-only methods, configured in jboss.xml ---------------------------------------------------------------------- Comment By: Michael Remijan (mjremijan) Date: 2004-08-23 18:19 Message: Logged In: YES user_id=627477 I am unable to make the attachement because of the size of the file. I have put the file at http://mjremijan.dyndns.org/tmp/jboss-bug.zip Since making the initial bug request I have converted from CMP to BMP. This change, however, does not effect the transaction problem described above. ---------------------------------------------------------------------- Comment By: Michael Remijan (mjremijan) Date: 2004-08-23 18:15 Message: Logged In: YES user_id=627477 The file, mjremijan.zip should be attached. Since submitting this bug I have converted from CMP to BMP however the transaction problem described above still remains. ---------------------------------------------------------------------- Comment By: Adrian Brock (ejort) Date: 2004-08-23 17:50 Message: Logged In: YES user_id=9459 There is no attachment. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1005213&group_id=22866 ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
