Entering content frame

Process documentation Using DeployService Interface in Java Clients Locate the document in its SAP Library structure

Purpose

You can use the com.sap.engine.services.deploy.DeployService interface to create a standalone Java client that manages the deployment and update of applications, libraries, services, and interfaces on the J2EE Engine programmatically.

The interface is packed in the Deploy Service component of the J2EE Engine (deploy.sda).

Process Flow

In order to use the functions that DeployService interface provides, you must obtain a reference to the service from the naming system.

This graphic is explained in the accompanying text

Properties ctxProp;

...

ctxProp = new Properties();

      ctxProp.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");

      ctxProp.put(Context.PROVIDER_URL, "localhost:50004");

      ctxProp.put(Context.SECURITY_PRINCIPAL, "Administrator");

      ctxProp.put(Context.SECURITY_CREDENTIALS, "sap");

ctx = new InitialContext(ctxProp);

...

deploy = (DeployService) ctx.lookup("deploy");

Once you have obtained a reference to the service, you can invoke methods on the service interface (DeployService interface). From your standalone Java client you can:

·        Deploy applications, application components, or other J2EE Engine components (libraries, interfaces, or services)

·        Remove applications or J2EE Engine components

·        Update a whole application or a single file in a previously deployed application

·        Start and stop applications

·        Retrieve the client JAR file for an application

·        Create references from an application to a library, interface, service, or another application

·        Retrieve information about the application status and the application components

·        Retrieve information about the containers, the applications, and the libraries in the cluster.

You can find an example of using the DeployService interface from a Java client in the File Transfer Service API example.

For more information about the functions that DeployService interface provides, see the J2EE Engine API documentation in the SAP NetWeaver Developer Studio help.

 

Leaving content frame