Creating a Deployment Profile for BC4J EJBs

Before deploying a BC4J project, you must have already created a project with business components using the Business Components Package Wizard. JDeveloper creates all the necessary code to deploy BC4J EJBs.

Note: 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.

To create a deployment profile for BC4J EJBs:

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. Make sure that you've completed all the BC4J prerequisites for deployment to standalone OC4J or Oracle Application Server or WebLogic.
  2. In the Navigator, select the bc4j_project_icon <BC4J_project>.jpx for which you want to create a deployment profile.
  3. Right-click and choose Create Business Component Deployment Profiles from the context menu.

    Note: You can also choose File | New to open the New Gallery. In the Categories tree, expand General and select Deployment Profiles. In the Items list, double-click Business Components EJB Session Bean.

  4. This wizard guides you in the creation of business components deployment profile type(s). From the Welcome page, click Next.
  5. For Step 1, select EJB Session Beans and move it from the Available list to the Selected list.
  6. Click Next.
  7. In the Profile Name field, enter or browse to the full path and name for this deployment profile.

    Note: The BC4J deployment profile should be named with a .bcdeploy filename extension. This name also becomes the display name in the Navigator.

  8. In the Deploy to list, select the appropriate EJB container type corresponding to the application server to which you are deploying. For example, if you are deploying to standalone OC4J or Oracle Application Server, select Oracle9iAS EJB Container.
  9. In the Server Connection field, choose an existing application server connection. Or, you can create a new application server connection by clicking New to display the Connection Wizard.
  10. A list of EJB types displays. Select one of more EJB types from the Available list and use the move button to shuttle it to the Selected list. In most cases, choosing Session Facade (BMT) would be appropriate. If you are unsure about what to choose, you can refer to these links for more information:
    1. About Business Components Service Session Facades
    2. About Container-Managed and Bean-Managed Transactions
    3. Using Client-Demarcated Transactions
  11. Click Next.
  12. Select the Create AppModule Configurations checkbox to create the bc4j.xcfg configuration file. This file is required for client access to the BC4J application. See Defining BC4J JSP Runtime Properties in the bc4j.xcfg File.
  13. Click Data Source to enter connection information to the data source containing the business data.
    1. Click Help for more information.
  14. In the Available list, select the application module(s) you want to deploy as an EJB session bean. To do this, select the application_module_icon Application Module (for example, Mypackage1Module) from the Available list and move it to the Selected list.
    Note: To prepare an application module for deployment, you must generate classes and interfaces that allow a client program to access your deployed module and its service methods. JDeveloper automatically generates the code that gives you remote access to the application. The generated code makes it possible to deploy an application remotely and build a client interface without having to build any interface by hand.
  15. Click Next.
    The Business Components Deployment Wizard - Summary dialog displays. Review the BC4J deployment profile settings.
  16. Click Finish.
    The deployment profile is created. The BC4J deployment profile icon bc4j_deploy_profile_icon <ProjectName>.bcdeploy appears in the Navigator below your project.
  17. To deploy the bc4j_deploy_profile_icon <ProjectNameEJB>.bcdeploy deployment profile, see Deploying BC4J as an EJB Session Bean.

Related topics

About OC4J Data Sources
About J2EE Applications and How They Are Packaged and Deployed
About Business Components for Java (BC4J) Deployment
Editing orion-ejb-jar.xml
Sample Business Components EJB Command-line Client Deployed to OC4J
Understanding the n-Tiered Business Components Architecture