You can create an EJB client JAR project for an existing EJB project.
If you have an existing EJB project that currently does not take
advantage of the EJB client JAR specification and tooling, you can quickly
create an EJB client JAR project for the EJB project. The EJB client JAR project
is exported as an EJB client JAR file when the application is exported.
When
you create an EJB Client JAR project for an existing EJB project, all Java™ JAR
dependencies are updated appropriately. In other words, all Java project
references on the Java build paths and the MANIFEST class path entries
are modified. The EJB client JAR is added as a utility JAR to any EAR projects
that include the EJB project. Any remote and local client interfaces are moved
from the EJB project to the EJB client JAR project. The interfaces are moved
to the new project, which is categorized in the Project Explorer under Other
projects.
To create an EJB client JAR project for an existing
EJB project:
The EJB client JAR project is created, any remote and local interface
classes are moved to the EJB client JAR project, class paths are updated with
appropriate references, and the EJB client JAR project is added as a project
utility JAR file to any enterprise application (EAR) project that includes
the EJB project.
Important: If
you use the Export EJB JAR file wizard to export an EJB project, the export
wizard does not include an EJB project's associated EJB client JAR project.
To include the EJB client JAR file, it is recommended that you export the
enterprise application EAR file that contains the EJB project. The resulting
EAR file will include any dependent EJB client JAR files as utility JAR files.
Alternatively, you can
remove the EJB
client JAR file before exporting the EJB project, or export the EJB
client JAR project separately as a JAR file. Another option for a team environment
is to export the projects together. See
Exporting projects for sharing.
Restriction: If you want to create
an EJB client JAR project for an existing EJB project that has already been
deployed, you must first manually delete all deployment code from the EJB
project. After the deployment code is deleted from the EJB project, you can
create the EJB client JAR project and redeploy the EJB project.