• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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.
 
What? What, what, what? What what tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic