my question is why the transaction is broken if one session bean has direct DB access and try to create a sequencer?
transaction => Container managed
ejb-jar.xml => required
jboss => 4.0.3
DB => Oracle 10g
1. call one entity bean to remove transient data
2. call one session bean which has direct DB access and it removes an Oracle sequencer
3. call one entity bean removed data from group table
If I get an exception in 3. point only the 3. one is rolledback but the 1,2 steps not (the seq and the transient deleted from the DB). If I uncomment the 2. step everything works properly. => all or nothing is rolled back.
I can't understand becacuse I see in the log file (server.log) that call of all 3 methods happens in on transaction with the same id (localID) and in this case all should be rolled back.
I am sure if I use this session bean (step 2) with direct DB access the transaction handling is not OK.
Is it not possible that one session bean that has direct DB access take part in the same transaction? do I have to implement entity bean for this session bean for the good transaction handling? I mean it doesn't make sense to a sequencer....
Please give me some hint what the problem can be!