A stateless session/message-driven bean has to complete the transaction, before the method ends. What happens if the transaction is kept open?... Will there be an exception and what happens to the open transaction? RemoteException/EJBException for remote/local clients?
Hi Vish, As the container must ensure that rule, I guess that it will throw some system exception in case your bean doesn't conform to it. Which one, I don't know (but I'd like to BTW ). Now if a system exception is well thrown, another rule will be applied anyway : the open transaction will be rollbacked. Regards, Phil.
Yes, Phillipe is right -- if the stateLESS bean or MDB starts but does not complete a transaction in a business method, the Container will: * Log it as an error * roll back the transaction * discard the bean instance * For STATELESS beans -- throw RemoteException or EJBException depending on whether the client is remote or local * For MessageDrive beans -- no exception is thrown, of course, because there's no client to get it! So, the only difference between MDBs and SLSBs in this case, is that the Container won't thrown an exception with a MDB, but in both cases, the bean is destroyed, the transaction rolled back, and the problem is logged. cheers, Kathy