Platform Configuration

Deploying ESS using Myst Deployment SDK?

Developing an ESS Application

The article at SOA 12c–Creating ESS Job metadata (JDeveloper) | Siva's Blog provides a very good step by step guide on creating an ESS project in JDeveloper. Do however, make note of the following improvements.

Picking a Build Tool

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:

  1. ejb-jar.xml

  2. weblogic-ejb-jar.xml

  3. weblogic-application.xml

  4. adf-config.xml

The snippets below provide the files used in order to get a working ESS Application.


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.

<?xml version = '1.0' encoding = 'windows-1252'?>
<ejb-jar xmlns:xsi=""
version="3.0" xmlns="">
<description>Runtime Session Bean</description>
<description>Metadata Session Bean</description>
<description>Async Request Bean</description>


NOTE: This also includes a role assignment. May not be required in all cases.

<?xml version = '1.0' encoding = 'windows-1252'?>
<weblogic-ejb-jar xmlns:xsi=""


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

<?xml version = '1.0' encoding = 'windows-1252'?>
<weblogic-application xmlns:xsi=""


<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="" xmlns:adf=""
<adf:adf-properties-child xmlns="">
<adf-property name="adfAppUID" value="ESSSampleAppl-6637"/>
<sec:adf-security-child xmlns="">
<CredentialStoreContext credentialStoreClass=""
<adf-mds-config xmlns="">
<mds-config version="" xmlns="">
<namespace path="/oracle/apps/ess/custom/osb" metadata-store-usage="ess_custom_metadata"/>
<metadata-store-usage id="ess_custom_metadata" deploy-target="true" default-cust-store="false">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property name="jndi-datasource" value="jdbc/mds-ESS_MDS_DS"/>
<property name="repository-name" value="mds-ESS_MDS_DS"/>
<property name="partition-name" value="essUserMetadata"/>

Building an ESS Application with Maven

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.

<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="">
<!--ess.redeploy>true</ess.redeploy--> <!-- defaults to true -->

Maven Build Command

In order to build the ESS Application, use the standard maven command (in a MyST world this will include setting the version beforehand as well):

mvn clean package install:install deploy:deploy \
-DaltDeploymentRepository=central::default::http://maven-repository:8080/artifactory/libs-release \

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.


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.

docker exec -ti myststudio_web bash

|-- ess
|-- metadata.json
|-- wlst

ESS Artifact Type

The contents of the metadata.json file are:

"type": "ess",
"label": "ESS Application",
"deployment.type": "essear",
"defaultPackaging": "ear",
"metadata": [
"myst-cli-property-name": "name",
"pom-keys": [
"myst-cli-property-name": "target",
"pom-keys": [
"myst-cli-property-name": "stage-mode",
"pom-keys": [
"myst-cli-property-name": "redeploy",
"pom-keys": [
"myst-cli-property-name": "myst-config-plan-apply",
"pom-keys": [
"myst-cli-property-name": "myst-config-plan-location",
"pom-keys": [
"implementation-source": "CLI",
"introspection-rules": {
"includes": {
"resources": {
"custom": {
"by-property": ["myst-config-plan-location"]

ESS Deployment Script

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 Document Doc ID 1350255.1 provides a sample WLST script that has been adapted to work with MyST and the ESS Artifact Type above.

The contents of the file are:

execfile(System.getProperty("myst.home") + '/lib/targets/common/')
execfile(System.getProperty("myst.home") + '/lib/targets/common/')
execfile(System.getProperty("myst.home") + '/lib/targets/')
from import File
def myst(conf):
# Find location of the artifact
artifact_id = conf.configuration.getFlagArguments()['artifact']
application_location = getArtifactFile(conf, artifact_id)
application_name = conf.getProperty('core.deployment[' + artifact_id + '].param[name]')
application_target = conf.getProperty('core.deployment[' + artifact_id + '].param[target]')
application_present = conf.getProperty('core.deployment[' + artifact_id + '].present')
application_stageMode = conf.getProperty('core.deployment[' + artifact_id + '].param[stage-mode]')
application_redeploy = conf.getProperty('core.deployment[' + artifact_id + '].param[redeploy]')
ignoreMissingConfigPlan=conf.getProperty('core.deployment[' + artifact_id + '].param[ignore-missing-myst-config-plan]')
if application_present is None:
application_present = 'true'
if application_redeploy is None:
application_redeploy = 'true'
if application_present.upper()=='TRUE':
# check if a configuration plan needs to be applied before deployment
application_configPlanApply=conf.getProperty('core.deployment[' + artifact_id + '].param[myst-config-plan-apply]')
application_configPlanLocation=conf.getProperty('core.deployment[' + artifact_id + '].param[myst-config-plan-location]')
application_location = apply_myst_config_plan(conf, application_location, application_configPlanApply, ignoreMissingConfigPlan, application_configPlanLocation)
username, password, host = validate_args(conf)
connect(username, password, host)
# Apply MDS configuration
archive = getMDSArchiveConfig(fromLocation=application_location);
# Complete Deployment
deploy_application(conf=conf, application_name=application_name, application_location=application_location, application_target=application_target, application_present=application_present, application_stageMode=application_stageMode, application_redeploy=application_redeploy)

What it looks like in MyST?

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:// 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 ...
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