Java Reference
In-Depth Information
In early versions of Java EE, local interfaces were required when the EJBs
and their clients were on the same JVM. Java EE 6 made local interfaces
optional; therefore, it isn't necessary to create any interface for our session
beans if they will only be accessed by clients executing in the same JVM.
Our example bean does not need to maintain conversational state with its clients;
therefore, we should make it a stateless session bean. Its only client will be executing
in a different JVM; therefore, we need to create a remote interface and don't need
to create a local interface.
When creating a remote interface, NetBeans requires us to specify a client library
in which the remote interface will be added. The client library is added as a
dependency to both the EJB project and the client project. This is the reason we had
to create a Java class library earlier. Our client library is selected by default when
we specify that we need to create a remote interface.
 
Search WWH ::




Custom Search