[jboss-user] [JCA/JBoss] - Re: Stateless EJB calling WorkManager directly - legal?
adrian@jboss.org
do-not-reply at jboss.com
Mon Mar 31 05:27:33 EDT 2008
"gsniderJBoss" wrote :
|
| | 1) A CMT transaction TX1 is created in the EJB via hibernate call.
| | 2) the ejb uses the Resource Adapter to schedule work
| | 3) A new transaction is created TX2 by the WorkManager?
| | 4) TX2 will now participate in the XA transaction?
| |
| |
| | I think you've got some misunderstandings of how this works?
| |
| | anonymous wrote :
| | | 3) A new transaction is created TX2 by the WorkManager?
| | |
| |
| | No, the WorkManager doesn't create transactions. It lets you specify
| | which existing external transactions the work should run under.
| |
| | anonymous wrote :
| | | 4) TX2 will now participate in the XA transaction?
| | |
| |
| | Transactions are not partipants of XA (I thiink you mean JTA?) transactions.
| | XAResources are.
| |
| | I think what you are asking for is that TX1 and TX2 are really the same
| | transaction running on different threads so the hibernate and asynch work
| | are committed together?
| |
| | This breaks the EJB rules (see my comment above), unless you know
| | what you are doing. i.e. you make the ejb that submitted the work
| | wait for the work to finish and do the thread transaction association yourself
| |
| | * no portable api to get the transaction manager to do this
| | * you can break things big time if you mess this up
| |
| | NOTE: Spec support for this feature may be available in JavaEE6?
| | assuming the JSR 237 people ever finish the spec:
| | http://www.jcp.org/en/jsr/detail?id=237 and the JavaEE committee accepts it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140039#4140039
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140039
More information about the jboss-user
mailing list