Home interfaces and remote interfaces present the bean however beans are insulated by the container and client application’s direct access. Whenever a bean is deleted, created or requested the whole process is managed by the container.
Component’s life cycle methods are presented by the home interfaces however bean’s business method is presented by the remote interfaces. Home & remote interfaces extends the javax.ejb.EJBHome interface and javax.ejb.EJBObject interface. Such types
Just one client can access the bean instance at any given time. There exists no persistency in case of state of the bean. They just exist for shorter time duration. State full session beans are suitable whenever: The state of bean presents the interaction b/w a specific client and the bean.The bean requires retention of certain information regarding the client, across method invocations.There occurs the mediation b/w other application components and client
A stateless session (EJB Component) is an enterprise bean which gives its users a stateless service. Interface javax.ejb.SessionBean is implemented by the stateless session bean (EJB Component) and deploys to the “stateless” declarative attribute. They are known as “stateless” as conversational states are not maintained by them that are specific to the client’s session. Stateless session beans are same as the static methods or procedural applications; no instance state is present therefore to execute
Updated 01-14-2012 at 06:14 PM by EJB
A stateful session bean is an enterprise bean (EJB component) that serves to be a client’s server side extension. It is created by one client and hence it works for just that client till the drop takes place in client connection or removal of the bean takes place explicitly. The stateful Bean (EJB Component) implements the interface javax.ejb.SessionBean and deploys to the “stateful” which is the declarative attribute. They are called stateful as conversational state is being maintained by them
Updated 01-14-2012 at 06:12 PM by EJB
Inside J2EE server, single client is presented in a session bean. It is considered as a non persistent object which makes the implementation of other business logics that run at server. Session beans are not able to survive the shut down of the system.
Two types of session beans are there: Stateless session beans (By multiple EJB clients, each session bean could be reused)Stateful session beans (every session bean is linked to just one EJB client)