EJB session bean: What happens if remove() is never invoked on a session bean?

What happens if remove( ) is never invoked on a session bean?

- Two situations need to be taken under consideration:

- Two situations need to be taken under consideration:

1. remove() invoked for a stateless session :

1. In this case it may not matter whether we use remove() or not as in either case, nothing is done.
2. The management of the number of beans in cache is done by container.

2. remove() invoked for a stateful session :

Here,

1. The bean might be kept in cache until the session is timed out after which it is removed or
2. When there is memory requirement, the data is cached and bean is sent to free pool.
EJB transaction attribute: What is the default transaction attribute for an EJB?
EJB transaction attribute - There is no default transaction attribute for an EJB. The deployer must specify a value for the transaction attribute for the methods that have..
EJB Server,Container,Connector: Difference between a Server, a Container, and a Connector.
EJB Server, Container, Connector - A server is an application that responds to the requests made by client(s) and manages system resources like network connections, threads, processes, memory, ..
EJB ejbFindByPrimaryKey: Why is ejbFindByPrimaryKey mandatory?
EJB ejbFindByPrimaryKey - Primary Keys are used to uniquely identify objects from a database. The ejbFindByPrimaryKey method is used...
Post your comment