This is in part a general J2EE question, but I suspect some of the behavior may be 
implementation specific, so if it has a JBoss peculiarity, please let me know.
 
I would like to establish a JTA transaction in a servlet, under which the servlet will 
look up and interact with session beans, which will in turn do the same with entity 
beans.  The entity beans, and possibly the session beans under special circumstances, 
will be obtaining JDBC connections from the pool and using them to move data to and 
from the DB.  The servlet will make many session bean calls, each of which may make 
several entity bean calls, but of course I want the whole thing, including all the DB 
changes, to operate as a transaction -- that is, nothing really changes at the DB 
level until the servlet calls usertxn.commit().
 
The problem is that all the doc I can find dances around the interaction of jdbc and 
jta transactions without actually answering the question of whether this is how things 
are supposed to work, and if so, what config and coding pattern(s) to follow to 
achieve this goal.  It seems like a fairly standard thing to want to do, so I can't 
imagine the answer isn't out there somewhere -- but so far, I've had no luck finding 
it.
 
If it matters, all the beans use container managed transactions set to join any txn in 
process, and the entity beans use bean-managed persistence.
 
So, can anyone either provide this info directly, or point me to some good clear 
documentation on the details of how to do this under JBoss?  Thanks in advance!
 

<<winmail.dat>>

Reply via email to