Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Deploying a EclipseLink Application (ELUG)
Contents
This section includes deployment information on various types of EclipseLink applications.
For more information, see the following:
- Integrating EclipseLink with an Application Server
- Creating EclipseLink Files for Deployment
- Packaging a EclipseLink Application
Deploying Java Applications
Build the JAR file (see Packaging Java Applications) and place it on the classpath.
For more information on accessing EclipseLink from your client application, see Acquiring and Using Sessions at Run Time.
Deploying JavaServer Pages and Servlets
After you build the WAR and JAR files (see Packaging JavaServer Pages and Servlet Applications), build them into an EAR file for deployment. To deploy the EAR to your JSP servlet server, copy the EAR to a commonly used directory. You may also need to use server-specific deployment tools. For more information, see the server documentation.
For more information on accessing EclipseLink from your client application, see How to Load a Session from sessions.xml with an Alternative Class Loader.
Deploying Session Bean Applications
After you build the WAR and JAR files (see Packaging Session Bean Applications), build them into an EAR file for deployment. To deploy the EAR file to your Java EE server, copy the EAR to a commonly used directory. You may also need to use server-specific deployment tools. For more information, see the server documentation.
For more information on accessing EclipseLink from your client application, see How to Load a Session from sessions.xml with an Alternative Class Loader.
Optionally, you may also consider Performing Hot Deployment of EJB.
Deploying JPA Applications
After you packaged your JPA application, deploy it to an application server of your choice.
For more information, see Deploying a EclipseLink JPA Application.
Deploying a EclipseLink Database Web Service
This section describes the following:
- How to Deploy a EclipseLink Database Web Service to OC4J
- What You May Need to Know About Deploying a EclipseLink Database Web Service
How to Deploy a EclipseLink Database Web Service to OC4J
To deploy a EclipseLink database Web service to OC4J, you can use any development tool that supports deployment to OC4J.
To Deploy a EclipseLink Database Web Service to OC4J
- Generate your EclipseLink database Web service.For more information, see Creating Deployment Files for EclipseLink Database Web Services.
- Package your EclipseLink database Web service WAR file.For more information, see Packaging a EclipseLink Database Web Service.
- Choose how to deploy your EclipseLink database Web service depending on how you packaged it:
- If you chose not to package the EclipseLink database Web service WAR in an EAR, deploy the EclipseLink database Web service as a standalone Web module.For more information, see the Oracle Fusion Middleware Enterprise Architecture and Deployment Guide.
- If you chose to package the EclipseLink database Web service WAR in an existing application's EAR, deploy the EclipseLink database Web service by deploying the EAR.For more information, the Oracle Fusion Middleware Enterprise Architecture and Deployment Guide.
What You May Need to Know About Deploying a EclipseLink Database Web Service
For production, you must deploy your EclipseLink database Web service to OC4J.
For more information, see How to Deploy a EclipseLink Database Web Service to OC4J.
For complete details on deploying a Java EE application, see the Oracle Fusion Middleware Enterprise Architecture and Deployment Guide.
For more information, see the following:
- Creating Deployment Files for EclipseLink Database Web Services
- Packaging a EclipseLink Database Web Service
Performing Hot Deployment of EJB
Many Java EE containers support hot deployment, a feature that enables you to deploy EJB on a running server. Hot deployment allows you to do the following:
- Deploy newly developed EJB to a running production system.
- Remove (undeploy) deployed EJB from a running server.
- Modify (redeploy) the behavior of deployed EJB by updating the bean class definition.
The client receives deployment exceptions when attempting to access undeployed or re-deployed bean instances. The client application must catch and handle the exceptions.
How you configure hot deployment of EJB depends on the type of Java EE application you are deploying:
- POJO application (see How to Perform Hot Deployment in a POJO Application).
For more information about hot deployment, see the Java EE container documentation.
How to Perform Hot Deployment in a POJO Application
When you take advantage of hot deployment in a POJO application, you must refresh the EclipseLink session using the SessionManager method getSession with the appropriate arguments (see How to Refresh a Session when the Class Loader Changes.
If you do not use this SessionManager method, then your application is responsible for destroying or refreshing the session when a hot deployment (or hot redeployment) occurs.