A POJI is a Plain Old Java Interface and in EJB3 that is all you need to define your business methods that you want to expose.


Let's create the POJI interface to define the business methods for our Stateless Session Bean.


We create a local interface which is the best choice for entity beans running in the same JVM.


When working in a distributed environment and deploying Enterprise Java Beans to run in a different JVM than the client, you should use a remote interface. This tells the server to implement all required network support and does involve a certain amount of overhead.


To indicate to the server that LibraryLocal.java is a local interface we use the JDK 5.0 annotation @Local at the head of the interface.


                    

Copyright © 2010 VisualBuilder. All rights reserved