[jboss-user] [JCA/JBoss] - Re: Completely confused JCA and Hibernate
vickyk
do-not-reply at jboss.com
Mon Mar 17 06:38:57 EDT 2008
"gsniderJBoss" wrote : My apologies. I've searched and searched. I'm confused about my current configuration for Hibernate.
|
| Basically we use Hibernate.getCurrentSession() to 'get' and 'save' information. We have CMT and an XA-datasource configured.
|
| Is Hibernate using any part of JCA for its work? (the example mysql-ds.xml was in the examples\jca directory). And if I want to use the WorkManager, what am I supposed to do? Is there some default RA to use with JBoss that already works with the WorkManager?
|
| Here is the use case:
| 1) stateless EJB inserts a record into table A: (get the primary key from the insert)
| 2) asynchronously do some 'work' that will use the PK from step 1 to insert into child table B
|
| The problem is
| 1) TX1 is created for the insert
| 2) TX2 is created by the WorkManager for the inserts into the child table B. But TX2 cannot see the changes made by TX1.
|
How are you starting the asynchrounous call ?
So you would have flow like this
Start TX
Some Bussiness Logic
Invoke AsynCall ---------------------> Will continue
End TX
AsyncCall -------> Ends later .(This can't have control of TX as that is ended earlier)
Async Call should end before the END TX , then it would be useful.
So asnchronous does not add value here .
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137016#4137016
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137016
More information about the jboss-user
mailing list