Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Kathy Can u clarify this ?

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if a CMT bean calls getUserTransaction() method on its context , EJB Specification says that it throws IllegalStateException , which is a RunTimeException . So , if the client is remote , will that throw a RemoteException or not!! looks strange.. because , if it is a runtimeexception , it will be thrown as a remoteexception (for remote clients). But the specification seems to say that it will throw IllegalStateException only . Please Clarify ...I havent been getting answer for this q .. tahts why i am posting as a new one...
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When a CMT bean calls getUserTransaction() method on its context, the CMT bean will receive illegalStateException thrown by the Container.
According to EJB 2.0 spec 18.2.2

If the bean method encounters a RuntimeException or error, it should simply propagate the error from the bean method to the Container (i.e., the bean method does not have to catch the exception).


So the bean propagates the illegalStateException to the Container.
The Container will throw either TransactionRolledBack(Local)Exception or RemoteException/EJBException to the client based on the rule EJB 2.0 spec 18.3 Table 15.
Refer to EJB 2.0 spec 18.4.2 and take a look at some of the system applications received by the client
Hope it'll help
Joyce
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also check out my Exception Handling cheat sheet which sort of sums up the whole exception handling stuff
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic