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 ejbjarxml ejb-jar.xml file already exists in your project, you can right-click ejbjarxml ejb-jar.xml and choose Create EJB JAR Deployment Profile from the context menu to quickly create this profile.

  1. In the Navigator, select the project_icon <projectname>.jpr in which you want to create the EJB JAR deployment profile.
  2. Choose File | New to open the New Gallery.
  3. In the Categories tree, expand General and select Deployment Profiles.
  4. In the Items list, double-click EJB JAR File - J2EE EJB Module.
  5. Click OK.
  6. Specify a location for the <ejb_name>.deploy profile or accept the defaults.
  7. Click Save.
  8. The EJB JAR Deployment Profile Settings panel displays. Configure the settings for each page as appropriate:
    1. General Page
    2. JAR Options Page
    3. Files Page
    4. Dependency Analyzer Page
    5. (Advanced) Filters Page: further refinement to the Dependency Analyzer settings
    6. (Optional) Profile Dependencies: if the deployment profile depends on J2EE modules from another deployment profile.
    7. (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.
  9. 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.

  10. (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.

  11. 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.
  12. (Optional) If you want to edit either the EJB_deployment_profile_icon <ejb_name>.deploy profile or the corresponding deployment descriptor, ejbjarxml orion-ejb-jar.xml, right-click its icon in the Navigator and choose Settings. To edit ejbjarxml 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.
  13. To deploy the J2EE EJB Module, see Deploying EJB JARs.

Notes


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