Which of the following statements are true when a session bean's client receives a java.rmi.RemoteException? The correct answer is: 1. The container does not throw the java.rmi.RemoteException if the container performs a transaction rollback. 2. The client calls the session bean from within the same JVM. 3. The client will never receives a java.rmi.RemoteException. 4. The client calls the session bean from another JVM. 5. The throws clauses of all methods in the remote home and component interface must declare a java.rmi.RemoteException. Ans given: 1,4,5. I did not understand why is ans 1 a correct option.
posted 13 years ago
My advice is to not think about this question as it is poorly worded. The question says that a client gets a RemoteException and then one of the answers says that the container did not throw the RemoteException. The only way this is possible is if the transmission from the container back to the client got messed up. The question may have been trying to insinuate that no RemoteException is thrown if setRollbackOnly is called or that the client will receive a TransactionRolledbackException if a runtime exception occurs on the server.