• 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

will bean instance be toasted?

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the EJB Spec section 21.6.9, page 452 state that:

The EJB Container must provide enforcement of the client access control per the policy defined by the Deployer. A caller is allowed to invoke a method if, and only if, the caller principal is assigned at least one of the security roles that includes the method in its method permissions
definition. (That is, it is not meant that the caller must be assigned all the roles associated with the method.) If the Container denies a client access to a business method, the Container must throw the java.rmi.RemoteException to the client if the client is a remote client, or the javax.ejb.EJBException if the client is a local client.



it said that the container will throw java.rmi.RemoteException or javax.ejb.EJBException which is System Exception.
The question is: is the bean instance will be toasted?
since the lifecycle shows that if the bean throw system exception, then the bean will go to DOES NOT EXIST state.

in this case, is it mater who has throw the System Exception? Bean of Container?
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
If the bean throws a System Exception then the instance will go to DOES NOT EXIST state . In this case the container denies a client access to a business method and there is nothing wrong with the bean instance thus the bean instance won't be killed.


hope it helps.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic