280 Migrating from WebSphere Application Server Community Edition to WebSphere Application Server
24.In the CMP Attributes window, from the Table menu select
ADVENTUREBUILDER.LODGINGORDERBEAN, which is the table that is
associated with the EJB that you are creating now, as shown in Figure 7-53.
25.Click Next.
Figure 7-53 Define CMP attributes
Chapter 7. Developing the application on WebSphere Application Server Community Edition 281
26.Click Finish to create the CMP Entity Bean (Figure 7-54).
Figure 7-54 Specify modifiers, interfaces to implement, and method stubs generate
282 Migrating from WebSphere Application Server Community Edition to WebSphere Application Server
Figure 7-55 shows the created EJB.
Figure 7-55 Project Explorer
Importing the source code for the EJBs
You have now created the three EJBs that compose the application. We do not
discuss how to fill in the source code for these beans. Instead, we import the
source code from the <source dir>.
Here are the source files that you need to import by their package names:
com.sun.j2ee.blueprints.lodgingsupplier
JNDINames.java
com.sun.j2ee.blueprints.lodgingsupplier.pomessagebean
InvalidDocumentException
Invoice
LodgingMessageBean
LodgingMessageMdb
Chapter 7. Developing the application on WebSphere Application Server Community Edition 283
LodgingMessageUtil
ProcessingException
WebServiceBroker
com.sun.j2ee.blueprints.lodgingsupplier.powebservice
InvalidOrderException
LodgingOrder
LodgingPOEndpoint
LodgingPOEndpointBean
LodgingPOEndpointSession
OrderSubmissionException
com.sun.j2ee.blueprints.lodgingsupplier.purchaseorder.ejb
LodgingOrderBean
LodgingOrderCMP
LodgingOrderData
LodgingOrderLocal
LodgingOrderLocalHome
You also need to import the WebSphere Application Server Community Edition
specific deployment plan, because XDoclet only supports generation of the J2EE
Deployment Descriptor. So, the EJBs that you have imported are annotated to
generate the ejb-jar.xml file but not the openejb-jar.xml file. You need to import
the WebSphere Application Server Community Edition specific deployment plan
from the META-INF directory of the LodgingSupplier-EJB project that is included
in the source files that we provide with this book.
Because some of the EJBS in this module refer to the servicelocator utility jar,
you need to import this .jar file as well.
284 Migrating from WebSphere Application Server Community Edition to WebSphere Application Server
To import the source code, complete the following steps:
1. Right-click LodgingSupplier project and select Import J2EE Utility Jar.
2. Select the “Copy Utility Jars into an existing EAR from an external location”
option as shown in Figure 7-56 and click Next.
Figure 7-56 Utility Jar Import

Get Migrating from WebSphere Application Server Community Edition to WebSphere Application Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.