Packaging the Enterprise Bean

The next few sections show how to package and deploy the enterprise bean and run the sample client in WebLogic Server. The corresponding steps for JBoss are presented later today.

The following snippet shows the directory structure for the SignOn bean files for WebLogic Server:

C:\styejb\examples\
              day05\
                   SignOn.java
                   SignOnHome.java
                   SignOnEJB.java
                   InvalidLoginException.java
                   ejb-jar.xml
                   weblogic-ejb-jar.xml

For JBoss, replace the vendor-specific weblogic-ejb-jar.xml file with jboss.xml.

As you learned on Day 2, packaging is the process of assembling the enterprise bean files into an ejb-jar file. To package the SignOn component, you must perform the following steps:

1.
Set up the environment for the build in a new ...

Get Sams Teach Yourself EJB in 21 Days now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.