Installation of JBI service assemblies

The process for deploying a JBI service assembly is:

  • retreive the DeploymentService from the JMX server,
  • call the deploy method with the service assembly Zip file path.
The deployment service explodes the Zip file, analyses its jbi.xml descriptor, and deploy all the service units.

Requirements to deploy succesfully a service assembly:

  • the service units must not be duplicated for the service assembly
  • the components linked to the service units must be deployed and started
  • the shared libraries needed by the components must be deployed

Implementation

DeploymentService

According to the JBI specification, the methods in the DeploymentService return a XML result.

This XML return must respect the dtd defined in the specification.

According to this dtd, when we deploy a service assembly, we do not have the name of the deployed service assembly in the XML.

This name is necessary if we want to start, stop, shutdown, or undeploy a service assembly.

Thus we added the name of the service assembly, when we successfully deployed a service assembly.

Example of XML result when the service assembly is successfully deployed:

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<jbi-task version='1.0' xmlns='http://java.sun.com/xml/ns/jbi/management-message'>
	<jbi-task-result>
		<frmwk-task-result>
			<frmwk-task-result-details>
				<task-result-details>
					<task-id>deploy</task-id>
					<task-result>SUCCESS</task-result>
					<message-type>INFO</message-type>
					<msg-loc-info>
						<loc-token>jbimsg</loc-token>
						<loc-message>Successfully deployed service assembly : {1}</loc-message>
						<loc-param>SASmtpProp</loc-param>
					</msg-loc-info>
				</task-result-details>
				<locale>en</locale>
			</frmwk-task-result-details>
			<is-cause-framework>YES</is-cause-framework>
		</frmwk-task-result>
		<component-task-result>
			<component-name>SMTPBC</component-name>
			<component-task-result-details xmlns='http://java.sun.com/xml/ns/jbi/management-message'>
				<task-result-details>
					<task-id>deploy</task-id>
					<task-result>SUCCESS</task-result>
				</task-result-details>
			</component-task-result-details>
		</component-task-result>
	</jbi-task-result>
</jbi-task>

We can get the name of the service assembly in the first message parameter.( XML tag loc-param).

Collaboration diagrams

DeploymentService.deploy()

deploy.PNG

DeploymentService.start() : start the Service Assembly

startSA.PNG

DeploymentService.start() : start the Service Units of the Service Assembly

startSU.PNG