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

Explanation on remove.

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need some clarification about remove of Component interface of session bean

1. can we have transaction attribute for that methods?

2.remove method can be called "without exception", by both remote and local clients?
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !
you said " 1. can we have transaction attribute for that methods? ! "
and my answer is no . Because it is not a business method for SESSION BEAN .
According to the spec it is called with no transaction contex .
And then you said " 2.remove method can be called "without exception", by both remote and local clients? "
and my answer is : for remote client you will have to put the method call in a try/catch for both , RemoteException and RemoveException . RemoveException you will have if your statefull session bean is still in a transaction . With stateless session bean clients will never see RemoveException , since removal is not tied to clients . Only the container can remove a stateless session bean to reduce de size of the pool .
For local clients you will have to put the method call in a try catch for RemoveException only !
I think I am right and guess it can help you a bit
 
reply
    Bookmark Topic Watch Topic
  • New Topic