Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

method calls in one atomic action

Status
Not open for further replies.

joris2ee

Programmer
Feb 23, 2004
3
BE
Hello,

I'm trying to execute different methods as one atomic action. The situation is as follows: the client calls the method startSession(). Then the client is allowed to call any method he wants and at the end the whole session should be rolled back or commit. The name session here has nothing to do with SessionBeans, but the methods will be in a SessionBean that calls the methods of an entity bean.

So, in the application server it's not known in advance what methods the client will call during the session he started. But if one method fails, all the other methods should be rolled back (in the database). This all means that the client can call different methods and that they all should be executed in atomic transaction or session.

My problem is that I've no idea how this can be realized in J2EE EJBs. I looked at userTransactions, but they are not usable for long transactions and also not in a distributed environment (only at the client side).

Any comment is welcome, even if you think that I'm trying to do something stupid or not possible.

Thnx
Joris

PS: To make it a bit more complicated, the client should also be able to call a method without starting a session. Then only that method is executed in a atomic way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top