Creating a Deployment Profile for EJB Modules (EJB JAR)
When you use JDeveloper's integrated development environment to create J2EE
EJB components and Business Components
for Java (BC4J) EJB applications, the corresponding deployment descriptor
files, ejb-jar.xml
and/or orion-ejb-jar.xml
(for OC4J deployments only) are automatically generated and appear in the Navigator
below the project.
However, as part of the deployment process in JDeveloper, you must also create
the EJB JAR deployment profile containing the EJB components and the corresponding
deployment descriptor files. You can choose to package them into a standard
J2EE EJB JAR or into an Enterprise Archive (EAR) file for deployment.
Note: For JBoss deployments, see Deploying
EJB JARs to JBoss or Deploying BC4J as an
EJB Session to JBoss.
To create a deployment profile for J2EE EJB JARs in JDeveloper:
Tip: If an
ejb-jar.xml file already exists in your project,
you can right-click
ejb-jar.xml
and choose Create
EJB JAR Deployment Profile from the context menu to quickly
create this profile.
- In the Navigator, select the
<projectname>.jpr in which you
want to create the EJB JAR deployment profile.
- Choose File | New
to open the New Gallery.
- In the Categories tree, expand General
and select Deployment Profiles.
- In the Items list, double-click EJB
JAR File - J2EE EJB Module.
- Click OK.
- Specify a location for the
<ejb_name>.deploy
profile or accept the defaults.
- Click Save.
- The EJB JAR Deployment Profile Settings panel
displays. Configure the settings for each page as appropriate:
- General Page
- JAR Options Page
- Files Page
- Dependency Analyzer Page
- (Advanced) Filters Page: further
refinement to the Dependency Analyzer settings
- (Optional) Profile
Dependencies: if the deployment
profile depends on J2EE modules from another deployment profile.
- (Optional) If you want to pass
command line parameters to any of the supported target connection types,
click the appropriate node: Standalone OC4J,
iAS Remote DCM, iAS Local
DCM, WebLogic 6.x, or WebLogic
7.x.
- Click OK when you are done.
The newly created EJB JAR deployment profile and and its corresponding
deployment descriptor icons appear in the Navigator below the specified
project.
- (Optional) If you are deploying to a WebLogic application
server, create the
weblogic-ejb-jar.xml
file by choosing File
| New | Business Tier - Enterprise JavaBeans (EJB) - EJB Deployment
Descriptor for WebLogic (weblogic-ejb-jar.xml).
Notes: This file can also automatically generated later when
you actually deploy to an existing WebLogic connection.
If changes are made to the weblogic-ejb-jar.xml
file, you'll
need to include this updated version in the EJB JAR before redeploying.
Otherwise, the first generated version will be deployed. See Editing
weblogic-ejb-jar.xml for more information.
- By default, you can run and debug the EJB JAR components in JDeveloper's
embedded OC4J server to test
the application. However, when you are ready to deploy the resulting EJB JAR
or EAR to the target application server, make sure to create
an application server connection.
- (Optional) If you want to edit either the
<ejb_name>.deploy profile or the
corresponding deployment descriptor,
orion-ejb-jar.xml
, right-click its icon in the Navigator and choose
Settings. To edit
ejb-jar.xml
, right-click its icon and choose Edit
EJB Module. Alternatively, you can use the Code
Editor if you are knowledgeable about the descriptor's XML format.
- To deploy the J2EE EJB Module, see Deploying
EJB JARs.
Notes
- When deploying to OC4J or Oracle Application Server, do not assemble EJB 1.1 and
EJB 2.0 modules into a single J2EE application EAR file as deployment will
fail and SQL and connection errors will be raised.
- The EJB container in OC4J provides full support for EJB 2.0. For more information,
see the EJB 2.0 specification:
http://www.javasoft.com/products/ejb/docs.html
- Make sure that the EJB deployment descriptor is located inside the EJB JAR
META-INF/ejb-jar.xml
.
Related topics
- About J2EE Applications and How They
Are Packaged and Deployed
- Editing orion-ejb-jar.xml
- Deploying an EJB JAR to WebLogic
- Deploying BC4J as an EJB Session Bean
to OC4J
- Deploying BC4J as an EJB Session
Bean to WebLogic
- Understanding the n-Tiered
Business Components Architecture
- Sample Business Components EJB Command-line
Client Deployed to OC4J
- Running an EJB
- Debugging an EJB