This content has been marked as final. Show 1 reply
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
Some Bussiness Logic
Invoke AsynCall ---------------------> Will continue
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 .