Re-entrant means where Bean A calls methods of Bean B and then Bean B turns around and calls methods of Bean A.
The above all within a single thread of control. This is also called as loopback.
Entity beans are the only one bean that is reentrant.
Neither Session bean nor Message Driven Bean are reentrant.
When Entity bean, we have to declare in the deployment descriptor whether it is reentrant ( true or false).
1. If reentrant is defined as true in the entity bean deployment descriptor, multiple clients can connect to the Entity bean and execute methods within the entity bean concurrently and J2ee Container takes care of synchronization.
2. If reentrant is defined as false in the entity bean deployment descriptor, and many clients tries to connect to Entity Bean concurrently to execute a method, exception is thrown.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.