Skip to main content

Moving On-premise Applications to the Oracle Cloud

Posted by bleonard on January 23, 2013 at 6:24 AM PST

As a test, I re-created the HRSystem application as described in the tutorial Developing Rich Web Applications With Oracle ADF. It's more than your basic Hello World application. For starters, the HR system application accesses a database. It also takes advantage of some sophisticated ADF features, such as graphs, page flows, auto-suggest, menu options to export to Excel and display in printable page formatting, etc. You can experience it all here: https://java-trialaxkb.java.em1.oraclecloudapps.com/HRSystem/faces/DepEmpPage.

Deploying the HRSystem application to the Oracle Cloud took 4 easy steps.

Step 1. Connect your IDE to the Oracle Cloud

NetBeans, Eclipse and JDeveloper are all capable of connecting and deploying to the Oracle Cloud. Actually, this step is optional, as the EAR file could be uploaded to the cloud, but the integration with the IDE is nice. See Hello Oracle Cloud for instructions on setting up integration with JDeveloper as well as pointers to instructions for NetBeans and Eclipse.

Step 2. Move Your Database Schema to the Cloud

The HRSystem tutorial application uses the Oracle HR schema. See Oracle HR Schema Objects in the Cloud for an example of how to do this step.

Step 3. Set your Application Database Connection to the Oracle Cloud Database

Your application connection type must be set to JDBC DataSource as opposed to JDBC URL. For production applications, this is most likely already the case. But the JDBC DataSource name must match the service name provided for you by your Oracle Cloud database service, which is probably "database":

To update the connection information, Edit the Application Module:

 

Step 4: Configure Your Access

OK, I took the easy road here and just made my application publicly available. This is achieved by simply adding the empty <login-config/> tag to the bottom of web.xml (see Hello Oracle Cloud for instructions). However, I realize that's not realistic for most enterprise deployments. The Oracle Cloud documentation has a nice section on Managing Application Security:

Managing Application Security

This section describes how to secure Java EE and ADF applications targeted for a Java Cloud Service instance.

Topics:

See Also:

There's also a nice tutorial available: Securing a Web Application on a Java Cloud Service.

AttachmentSize
HRSystem.zip1.28 MB
HRSystem.jpg103.35 KB