Packaging PARs in J2EE
Applications
A PAR file can be packaged in an Enterprise Application Archive (EAR) file. When the EAR file is deployed using J2EE deployment facilities, the PAR is forwarded to the PRT container.
When a PAR file is deployed in EAR file, it cannot later be deployed with the standard deployment tools. It should always be deployed in an EAR file.
To use the portal application through a J2EE Application, the portal application must be started as a reference. List the module in the application-j2ee-engine.xml deployment descriptor of the J2EE application in the deployment reference. The reference contains the following tags:
Tag |
Value |
modules-additional |
<none> |
module |
<none> |
entry-name |
<the name of the portal application including the extension> |
container-name |
PortalRuntimeContainer |
· When Deploying: If a PAR is deployed as part of an EAR in a cluster, then only the J2EE node in which the deployment was triggered will receive the PAR file in its PRT container. This container then uploads the PAR in the PCD and triggers the update of the local deployment of all portal nodes. The PRT containers on all other nodes will only be notified about the deployment.
· When Undeploying: The PRT container on the node on which undeploy was triggered will remove the PAR from the PCD and notify all portal nodes to remove the local deployment. The PRT containers on the other nodes do nothing.
If multiple PARs are contained in one EAR, the PARs are uploaded in one step to the PCD. In addition, the update of the local deployment on all portal nodes is made in one step too.
If two EAR files contain one and the same PAR file, then the first PAR file will be removed and replaced by the second PAR file. A warning message is displayed in the portal log files.
This is the part of a deployment descriptor for an EAR file containing two PAR files:
<modules-additional> <module> <entry-name> com.sap.portal.core.examples.PARInEARPortalApp.par </entry-name> <container-type> PortalRuntimeContainer </container-type> </module> <module> <entry-name> test.portal.MyPortalTest.par </entry-name> <container-type> PortalRuntimeContainer </container-type> </module> </modules-additional> |