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
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.
- Make sure that you've completed all the BC4J prerequisites for deployment
to standalone OC4J or Oracle Application Server
or WebLogic.
- In the Navigator, select the
<BC4J_project>.jpx for which you
want to create a deployment profile.
- 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.
- This wizard guides you in the creation of business components deployment
profile type(s). From the Welcome page, click Next.
- For Step 1, select EJB Session Beans and move
it from the Available list to the Selected
list.
- Click Next.
- 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.
- 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.
- 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.
- 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:
- About Business Components Service
Session Facades
- About Container-Managed and Bean-Managed
Transactions
- Using Client-Demarcated Transactions
- Click Next.
- 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.
- Click Data Source to enter connection
information to the data source containing the business data.
- Click Help
for more information.
- 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 (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.
- Click Next.
The Business Components Deployment Wizard - Summary
dialog displays. Review the BC4J deployment profile settings.
- Click Finish.
The deployment profile is created. The BC4J deployment profile icon
<ProjectName>.bcdeploy appears
in the Navigator below your project.
- To deploy the
<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