When you create the Custom Application, make sure to pick the Maven build tool. You can add in the respective Group ID, Artifact ID, and Version to suit your project's needs.
XML Configuration Files
There are a number of XML configuration files that need to be updated. These are:
ejb-jar.xml
weblogic-ejb-jar.xml
weblogic-application.xml
adf-config.xml
The snippets below provide the files used in order to get a working ESS Application.
ejb-jar.xml
NOTE: The message-driven EJB is mentioned in the updated ejb-jar.xml file. This is the same as the EJB name in the weblogic-ejb-jar.xml file.
NOTE: Using the oracle.ess.client library reference is required to resolve the EJBs referred to in the ejb-jar.xml file. These are not present in the oracle.ess.thin.client
NOTE: You will need JDeveloper installed on the build machine in order to complete this step as it uses ojdeploy and the deployment profiles that are created during development time.
By selecting the Maven build tool during application creation, you'll notice that pom.xml files are generated in the JDeveloper Application and JDeveloper Project directory. These get updated as you create the deployment profiles. In order to build the ESS Application, you can use the deployment profiles and reflect this in the Application level pom.xml to run the EAR deployment profile. The updated Application level pom.xml file should look similar to the example below.
Application level pom.xml file
The pom.xml file includes the pom properties required if registering the artifact via CI Server to MyST Studio.
Note: The ess.redeploy artifact metadata property defaults to true. This is required as deployments will fail unless the old deployment is removed beforehand because the name would be in use.
The available properties are detailed in the next section under ESS Artifact Type.
NOTE: You do need to provide the oracleHome parameter as it is used to find the location of the ojdeploy executable. The command above assumes this is set as an environment variable ORACLE_HOME.
Deployment
Whilst ESS is bundled as an EAR, you are unable to use the standard J2EE EAR deployment capabilities in MyST. This is due application requiring Metadata Repository configuration during deployment. The solution is to use the recently added feature in MyST called the Deployment SDK. This allows users to create new artifact types and specify how to deploy the artifact types by writing and including their own scripts.
MyST Deployment SDK
The MyST Deployment SDK allows the user to programmatically define new artifact types and provide implementations for deployment.
The structure of the ESS Application artifact type is as follows. This structure can be found in the MyST Studio container.
Deploying ESS is very similar as deploying an EAR application, with the added step of configuring the application for the metadata repository. If this configuration is not performed, you receive a oracle.mds.config.MDSConfigurationException. Some light reading of the Oracle Support DocumentDoc ID 1350255.1 provides a sample WLST script that has been adapted to work with MyST and the ESS Artifact Type above.
The ESS Application has been built and uploaded to Artifactory with version 1.4. Manually registering the build in MyST (not via CI Server) will have the following information:
The ESS Application pom.xml file has the properties defined in order to get them to show similar to the screenshot above if built and published to MyST Studio via CI Server.
During deployment time we see the wlst setAppMetadataRepository operation being successfully applied before the deployment.
Operation "setAppMetadataRepository" successful.
Saved metadata repository configurations in "/tmp/mystWorkspace/418a8f7f-be3a-4581-80c4-9f1384423f5c/target/artifacts/ESSSampleAppl/ESSSampleAppl-1.4.ear".
The entire log below:
...
About to Deploy 1 Artifact
ESSSampleAppl essear 1.4
...
Applying the MyST configuration plan to the application
Trying to apply configuration plan '(EMBEDDED)/myst-config-plan.xml' to the source '/tmp/mystWorkspace/418a8f7f-be3a-4581-80c4-9f1384423f5c/tmp/06-27-18-02-27-04-26624/0c479cc2-f4a7-4a02-9df6-7e9101e4de16/ESSSampleAppl-1.4.ear'
Parsing the plan contents
MyST Configuration plan does not exist. Skipping applying customisation.
No Custom MyST Configuration Plan found in: /tmp/mystWorkspace/418a8f7f-be3a-4581-80c4-9f1384423f5c/target/artifacts/ESSSampleAppl/ESSSampleAppl-1.4.ear
Connecting to t3://SampleESS-1.rubiconred.aws:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "SampleESS_domain".
Warning: An insecure protocol was used to connect to the server.
To ensure on-the-wire security, the SSL port or Admin port should be used instead.
Operation "setAppMetadataRepository" successful.
Saved metadata repository configurations in "/tmp/mystWorkspace/418a8f7f-be3a-4581-80c4-9f1384423f5c/target/artifacts/ESSSampleAppl/ESSSampleAppl-1.4.ear".
Finding MBean of type AppDeployment in all the instances ...
/AppDeployments/ESSSampleAppl
Stopping application ESSSampleAppl.
.
Completed the stop of Application with status completed
Current Status of your Deployment:
Deployment command type: stop
Deployment State : completed
Deployment Message : no message
Undeploying application ESSSampleAppl ...
.
.
Completed the undeployment of Application with status completed
Current Status of your Deployment:
Deployment command type: undeploy
Deployment State : completed
Deployment Message : no message
Deploying application from /tmp/mystWorkspace/418a8f7f-be3a-4581-80c4-9f1384423f5c/target/artifacts/ESSSampleAppl/ESSSampleAppl-1.4.ear to targets ess_cluster (upload=true) ...
.
.
Completed the deployment of Application with status completed
Current Status of your Deployment:
Deployment command type: deploy
Deployment State : completed
Deployment Message : no message
...