BKJIA exclusive compilation] This article describes the application of the EJB model in the new WebService of Java EE 6. One of the most important new features of Java EE 6 is to better use the EJB model. The EJB model requires that enterprise bean components be installed in the EJB-jar file module. For enterprise beans commonly used by Java EE Web applications, the necessary conditions for these components must be that they can withstand a lot of loads.
For more information about Java EE 6 features, please refer to BKJIA: Java EE 6 platform guide.
Because the heavy computing workload of enterprise bean classes in EJB 3.1 is restricted in the packaging of EJB-jar files, it is necessary to solve the complicated restrictions on such packaging. So you can only put the EJB model in the WEB-INF/classes directory, or the EJB model file compressed into a jar file put in the WEB-INF/lib directory, this way, only in this way can you directly put EJB in a file and use the same component rules applicable to Web applications. At the same time, the deployment descriptor of the EJB model is optional. If you need it, you can package the EJB deployment descriptor into a WEB-INF/EJB-jar.xml file.
Therefore, we have demonstrated the above idea on webservices. The following describes how to use NetBeans 6.9 and Glassfish 3.0.1 to create and deploy an EJB model.
First, let's useNetBeans 6.9 creates a Webservice.
NetBeans 6.9 creates a Webservice
Next,We specify the project location.
Specify the project location
Select GlassFish 3.0.1 and NetBeans 6.9Is a bundled server. Note: I use Java EE 6.
Select GlassFish 3.0.1 and NetBeans 6.9