Use an IDE to Deploy and Undeploy an Application

You can use an Integrated Development Environment (IDE) such as Eclipse to deploy and undeploy an application to an Oracle Java Cloud Service instance.

The following tutorials are also available:

Topics

Prerequisites for Deploying Using an IDE

Complete the following tasks before deploying an application:

Connect the IDE to a Remote WebLogic Server

To deploy an application to Oracle Java Cloud Service, you must first establish a connection between the IDE and Oracle WebLogic Server.

  1. Use the Oracle Java Cloud Service console to identify the public IP address of your Administration Server.
  2. Start Oracle Enterprise Pack for Eclipse.
  3. Click Workbench.
  4. Select Window – Show View – Others...
  5. Enter server in the search box, click the Servers entry, and click OK.
    The Servers view panel is displayed in the bottom half of the Workbench.
  6. In the Servers view panel, click No servers are available. Click this link to create a new server...
  7. Click Oracle, then select the WebLogic Server version of your Oracle Java Cloud Service instance, and click Next.
  8. In the New Server dialog box, click the browse icon next to WebLogic home, and select your WebLogic Server home directory.

    Note:

    Make sure that the local version of WebLogic Server you’re running is the same version as the instance running on the cloud service. If they are not the same version, then you can’t make a connection.
  9. Click the browse icon next to Java home, and select your Java home directory.
  10. Select Remote.
    1. Set the Remote Host to the IP address of your Oracle Java Cloud Service instance.
    2. Set Port to 7002. This is the SSL port of your Oracle Java Cloud Service instance.
    3. Make sure that Use SSL port is checked.
    4. Set User to the WebLogic Server administrator credentials you specified when you created the Oracle Java Cloud Service instance.
  11. Click Test Connection.
  12. In the Success dialog box, click OK.
    In the Eclipse console, a new connection is added to the Servers view panel. A Validating server... status message is displayed. After the connection is established, the status changes to Started.

Use an IDE to Deploy an Application to a Cluster

You can deploy the application to the administration server by using the Eclipse IDE, for example. You can deploy an application to a cluster by setting properties to add the cluster as a target.

To use Eclipse to deploy an application to a cluster in your Oracle Java Cloud Service instance:
  1. If you have not done so already, start the Oracle Enterprise Pack for Eclipse (OEPE).
  2. If Project Explorer is not visible, select Window – Show View – Project Explorer.
  3. Under Project Explorer, right-click and select Import – WAR file .
  4. In the War Import dialog, click the Browse button, navigate to the directory where your application resides, and select it. Click Open.
  5. On the WAR Import dialog, click Finish.
  6. If an Open Associated Perspective dialog appears, click Yes to associate the perspective of the project to Java Enterprise Edition (Java EE).
  7. On the Eclipse console, select the Servers tab.
    By default, the IDE deploys your application to the Oracle Java Cloud Service administration server. You need to deploy the application to a cluster rather than to the Administration Server.
  8. On the Servers tab, right click on the server connection established previously to the administration server.
  9. Select Properties.
    The Properties dialog is displayed.
  10. Select WebLogic – Publishing – Advanced.
  11. Click on the green plus sign to add the cluster as the target.
    A new line is added under Targets.
  12. Click on Browse.
    The names of the administration server and the cluster are listed on the Target Name dialog.
  13. To delete the Administration Server as a target, select the target name and click on the red cross icon next to the Administration Server name.
  14. To add the cluster as a target, click on the green plus sign.
    A new line is added under Targets.
  15. Click Browse and select the cluster where you want to deploy the application.
    The Administration Server and the cluster are listed in the Target Name dialog.
  16. Click on the cluster and click OK.
  17. Click Apply, and then click OK.
  18. Click on the Servers tab.
  19. On the Servers tab, right click on the server connection and select Add and Remove...
    The application is then listed in the available applications section of the Add and Remove dialog.
  20. Select the name of the application and click Add.
  21. Click Finish.
    In the bottom right corner of the Eclipse console, the status of the publish request is displayed.
  22. Click the icon next to the publish request status message to see the details of the request.
    The status of the request will become Active.
  23. On the Servers tab, expand the server connection to see that the application is deployed.

Use an IDE to Undeploy an Application

After you deploy an application, you can undeploy it by using an IDE.

To use the Eclipse IDE to undeploy an application:
  1. If you have not done so already, start Oracle Enterprise Pack for Eclipse (OEPE).
    You can click on the icon on your desktop or search for eclipse on the Windows Start menu.
  2. Select the Servers tab of the Eclipse console.
  3. Expand the server connection for the server on which the application resides.
  4. Locate the application under Published Modules.
  5. Right-click on the application and select Remove.
    The application is removed from the published modules list.
The application is now undeployed.