Web hosting java - Introduction to Session Beans 93 package examples; import
Wednesday, December 12th, 2007Introduction to Session Beans 93 package examples; import javax.ejb.*; import java.rmi.RemoteException; /** * This is the home interface for CountBean. This interface * is implemented by the EJB Server s glue-code tools - the * implemented object is called the Home Object, and serves * as a factory for EJB Objects. * * One create() method is in this Home Interface, which * corresponds to the ejbCreate() method in the CountBean file. */ public interface CountHome extends EJBHome { /* * This method creates the EJB Object. * * @param val Value to initialize counter to * * @return The newly created EJB Object. */ Count create(int val) throws RemoteException, CreateException; } Source 4.3 CountHome.java. Because we implement javax.ejb.EJBHome, our home interface gets the remove() destroy method for free. The Count Bean s Deployment Descriptor Now that we have all our Java files for our bean, we need to define the deployment descriptor to identify the bean s settings to the container. The deployment descriptor settings we use are listed in Source 4.4.
We are dedicated to offering you a reliable, fast, and scalable unlimited web hosting home for your business, and personal web sites.Go and see our shared web hosting services.