[jboss-user] [EJB3] - EJB 2.1 BMP with CMT and RequiresNew in JBoss AS 7.1.0 Final

Daniel Zhelyazkov do-not-reply at jboss.com
Thu Apr 5 04:03:20 EDT 2012


Daniel Zhelyazkov [https://community.jboss.org/people/dzhelyazkov] created the discussion

"EJB 2.1 BMP with CMT and RequiresNew in JBoss AS 7.1.0 Final"

To view the discussion, visit: https://community.jboss.org/message/728441#728441

--------------------------------------------------------------
I have the folowing case where transactions lock up, and it was working OK in JBoss 3, 4 and 6.

We have the Session Facade pattern where the SLSB calls the Entity Bean, both SLSBs and EntityBeans use RequiresNew as transaction attribute. (Changing the Entity Beans attribute to Requires solves the problem, too much places to fix, and some tricky situations where more changes are required)

So what happens is:

*SLSB.newRecord(...) starts with RequiresNew*
*{*
    //with RequiresNew (the insert statement is executed, then by spec on TX end ejbLoad is called and data is read from Database - so far so good.
*record = EntityHome.create(...);*

     //method part of the local interface of the Entity - here a new transaction is started, and at the end of the method the transacion is commited and ejbStore is called, however this does not work because of db lock which I can not understand.
 *record.getProperties(); * 
*}*

The datasource isolation level is READ_COMMITED.
In previous versions of JBoss call to record.getProperties() did not start new transaction and no call to ejbStore 


I hope someone could help,
Daniel
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/728441#728441]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120405/8a3e5d0e/attachment.html 


More information about the jboss-user mailing list