Hi Sandesh,
Container can throw RemoteException and need not rollback transaction (if bean method runs in unspecified transaction context)
You are right but is not against what ejbcertificate explanations say at all.
It's pure logic and
its's very common logic mistake!!!. Think about it:
ejbcertificate says: if the container perfoms a transaction rollback, then throws a RemoteException. So if A, then B
your answer: not true because if RemoteException (B) then not automatically transaction rollback (A) . So if B, then Not A.
But by saying that, you don't make the ejbcertificate's assemption false.
The only way to prove that if A then B is false is to pick up a case where Not B => A (and not if B => Not A).
You say also:
Container can rollback transaction in case EJBContext.setRollbackOnly() is called before throwing an Application exception by a bean method. Container throws Application Exception to client as it is after it performs transaction rollback. So one also can NOT say that if Container rollbacks transaction, it will always throw a java.rmi.RemoteException
Here you are!! That's a logical contradiction with the ejbcertificate assomption:
A (container performs transaction roolback) => not B (not RemoteException but ApplicationException)
But, because there's a but, we can always argue that in this case, it's not completely tied to the container to rollback the transaction because you have to do a SetRollBackOnly() in the bean's instance code...
So, to my mind, it's not so easy to say who is right and wrong...
Regards,
Cyril.