-
1. Re: Transactional integrity problem
hvoss Aug 29, 2002 8:09 AM (in response to randyn)It's a good thing that the set methods in your entity beans require a transaction, but as long as the stateless session bean, that calls for the updates does not handle them all in one transaction, you will get a rollback only on the update that misperformed.
Two ways to do it:
Easy way: set the method of your stateless session bean which calls for the updates as required; this causes all the updates to be performed in one transaction.
Fairly easy way: assign your own user transaction to all the updates within your session bean. -
2. Re: Transactional integrity problem
randyn Aug 29, 2002 10:20 AM (in response to randyn)Thanks for the reply. Actually the method in the session bean that controls all of the updates also is set to REQUIRES for transactions. As it is the initial point of entry from the client, I would expect that a transaction is created for that method and would be the transaction used for all of the other updates called from that method.
-
3. Re: Transactional integrity problem
tfk257 Sep 17, 2002 4:34 AM (in response to randyn)I faced the same problem, and the solution is to define a data source class in the jboss.jcml that implements javax.sql.XADataSource(not the normal jdbc driver class). in my case it was oracle.jdbc.xa.client.OracleXADataSource (for Oracle). becuase your datasource class must support the two phase commit protocol