A Session Bean implements and encapsulates a business task that can be invoked programmatically by a client over local, remote, or web service client views. The session bean performs work (such [...]
A session bean may be either: Stateless—the session bean instances contain no conversational state between methods; any instance can be used for any client. Stateful—the session bean instances [...]
Stateful session beans are appropriate if any of the following conditions are true. The bean’s state represents the interaction between the bean and a specific client. The bean needs to [...]
There must be atleast one business interface for a session bean. The interface can be marked as @Remote, @Local or @WebService. EJB 3.1 provides a no-interface view for the client in which the [...]
For a client, a session object is a non-persistent object that implements some business logic running on the server. A client never directly accesses instances of the session bean’s class. [...]
A remote client of a session bean can be another enterprise bean deployed in the same or different container; or it can be an arbitrary Java program, such as an application, applet, or servlet. [...]
A local client is a client that is in the same JVM with the session bean that provides the local client view. For example, EJB deployed in JBoss container and servlet client deployed in the SAME [...]
Only Stateless session beans and Singleton session beans may have web service clients. To provide a webservice endpoint interface view for the client, the business interface of the bean should be [...]
The EJB 3.0 local client view is based on a plain old java interface (POJI) called a local business interface. A local interface defines the business methods that are exposed to the client and [...]
A business interface cannot be annotated with more than one access type. For example, an interface HelloWorld cannot have both @Local and @Remote annotations. If we want the bean to provide [...]