• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Explanation on remove.

 
Mohammed Eesa
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • 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?
 
Victor Santos
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic