Hello.
The scenario is Weblogic 6.1SP2, Oracle XA driver.
Working with CMT EJB1.1, the descriptor to methods are set to 'Requiered'.
The data operations to the data base are done in Session Beans as follows
methodA( params)
method1(params)
method2(params)
method3(params)
methodRegister(params)
end methodA
if methodRegister() fails, only he gets rolled back and not methods 1, 2 and 3, leaving data base inconsistancy.
- If the transacction is the container's job, why does'nt it all get rolled back?
In an other App Server, when error occurs in this last method, all records in the MethodA method are rolled-back.
In Weblogic, only operations asocciated in the last method are rolled back, while other methods in the methodA() leave inconsistancies. I need it to work in WebLogic
- Should we change the Requiered tag to another?
- Should this be done with BMT so manualy start and commit transaction?
- Which is the best aproach?.
please help
Ricardo Madariaga
OMEGA Computación Ltda.
Avenida Providencia #1760 of.1303. Piso 13
Tel: +56-2-2350615 Anexo 19
Fax: +56-2-2350629
rmadariaga at omegacl dot cl
www.omegacl.cl
Discussions
EJB programming & troubleshooting: methods not getting rolled back when descriptor set to 'Required
-
methods not getting rolled back when descriptor set to 'Required (3 messages)
- Posted by: Ricardo Madariaga
- Posted on: May 28 2002 15:41 EDT
Threaded Messages (3)
- methods not getting rolled back when descriptor set to 'Required by Nishchit Goel on May 28 2002 17:00 EDT
- methods not getting rolled back when descriptor set to 'Required by Ricardo Madariaga on May 28 2002 18:51 EDT
- methods not getting rolled back when descriptor set to 'Required by Tom Davies on May 29 2002 01:35 EDT
-
methods not getting rolled back when descriptor set to 'Required[ Go to top ]
- Posted by: Nishchit Goel
- Posted on: May 28 2002 17:00 EDT
- in response to Ricardo Madariaga
Make sure that you are using a TX datasource instead of normal datasource.
Transaction rollback workd fine with Weblogic 6.1 server.
Hope this helps,
Nishchit -
methods not getting rolled back when descriptor set to 'Required[ Go to top ]
- Posted by: Ricardo Madariaga
- Posted on: May 28 2002 18:51 EDT
- in response to Nishchit Goel
Hello.
But, please correct me.
Is TX only used when more then one resource is used (DB, schema, other systems)?.
If the transacction is 'local' (involves only one data base for example) it is managed by calles to its own resource. It does not need a global transaction context. That's why it's 'lighter' (faster).
please correct:)
- Can it be that utility clases (not EJB clases) are not behaving in a trasssaction way?
- Why does it work on Orion App Server and not WebLogic (using the same driver classes12.zip)?
Ricardo
-
methods not getting rolled back when descriptor set to 'Required[ Go to top ]
- Posted by: Tom Davies
- Posted on: May 29 2002 01:35 EDT
- in response to Ricardo Madariaga
Are your calls A, 1, 2, 3 etc. individual calls to session bean methods from a client? If this is the case then each is performed in a seperate TX.
If they are all wrapped in a single call from a client to a session bean method which then makes each of the calls you've listed, and has a Required attribute, then it should work.
When you say 'fails' exactly what do you mean?
Tom