• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

RemoteException

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
One more qt from ejb certificate
Which of the following statements are true when a session bean's client receives a java.rmi.RemoteException? [Check all correct answers]
one of the answers is
The container does not throw the java.rmi.RemoteException if the container performs a transaction rollback.
I think the above answer is wrong bec the container throws RemoteException when it has rolled back a transaction.A container rollsback a transaction when a sys exception arises.But it wraps it as a Remote Exception and throws it to the client.
Please correct me if I am wrong.Thanks in advance for your comments.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Venkatesh
I wonder if the question is referring to the discusion
in 18.3.1 of the spec where the exception thrown depends
on whether the transaction was started by the client or
the container
- if the client started the transaction (Required, Mandatory, Supports)
the container marks the client's transaction as rolled back
and throws the TransactionRolledback exception
 
David O'Brien
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(as I was syaing before I accidently presses the Reply button)
- if the container rollbacks back a transaction it started
(Required and RequiresNew) it throws RemoteException
OK so TransactionRolledbackException is a subclass of
RemoteException so (polymorphically) in both cases a
'RemoteException' is returned but there is extra detail in
the TransactionRolledbackException.
Basically I don'u understand the question but perhaps it's not me
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Venkatesh Kumar:
Which of the following statements are true when a session bean's client receives a java.rmi.RemoteException? [Check all correct answers]
one of the answers is
The container does not throw the java.rmi.RemoteException if the container performs a transaction rollback.
I think the above answer is wrong bec the container throws RemoteException when it has rolled back a transaction.A container rollsback a transaction when a sys exception arises.But it wraps it as a Remote Exception and throws it to the client.


What if the client has created the transaction? The client may receive, TransactionRolledbackException which extends from RemoteException.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic