Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, My question is not about a particular app server but about EJB behavior in general, although the thing I'm getting at is probably product specific. I'm asking it more for research questions than to solve a particular problem so any experience you have with any appserver would be appreciated. Suppose there is an EJB with a transactional method that takes a very long time to run. Suppose I call that method from a remote client, and while it's running, my client either disconnects (say, the user got tired of waiting and killed it) or the client decides to give up waiting for the response from the EJB server and throw an exception (I would imagine such behavior would be vendor-specific, but probably exists with some products). My concern is what happens to the transaction that is in progress on the abandoned EJB call. When the call finally completes, will the transaction automatically roll back, or will it commit? Is the behavior vendor-specific or defined by the specification? I'd like to think that a rollback would be the right behavior, but I can't find that documented anywhere -- and it also brings up the question of how the EJB server can know for sure that the client is still around (imagine a situation where the client disconnects after the transaction completes but before the results are marshalled back to it). If I were a J2EE vendor I might want to wait for the client to acknowledge receipt of the response before I committed the transaction; does anyone know if any products actually do this, or know for sure that a certain product does not? Thanks for your help. Frank
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.