[jboss-user] [EJB3] - Re: 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 11:40:16 EDT 2012


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

"Re: 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/728546#728546

--------------------------------------------------------------
Fixed my problem, after debug session of JBoss code it turned out that the code that parses TX attributes produces wrong info.
we had the folowing in ejb-jar.xml

<method>
     <ejb-name>SomeEjb</ejb-name>
     <method-name>*</method-name>
</method>
...
<trans-attribute>RequiresNew</trans-attribute>

Specified like that JBoss set default TX attribute Required to all LOCAL_HOME methods (ejbCreate/Find/Select/Home)
and RequiresNew to all Bean methods such as toString(), hashCode()...

by adding <method-intf>LocalHome</method-intf>

<method>
     <ejb-name>SomeEjb</ejb-name>
     <method-intf>LocalHome</method-intf>
     <method-name>*</method-name>
</method>

all went to normal, my ejbCreate() started new transaction, and getProperties() method did not use TX interceptor.

So it looks like different or wrong loginc in JBoss, the code itself states it has some problems, and it looks targeted at EJB 3.x, it is not a separate code for 2.x

daniel
--------------------------------------------------------------

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

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/7fb7eeea/attachment-0001.html 


More information about the jboss-user mailing list