• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RemoteException

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic