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://javatrial0129-usoracletrial80797.java.us2.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. SeeOracle 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 you can find on the My Account Dashboard
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. TheOracle 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.
- "Securing Oracle Cloud" in Getting Started with Oracle Cloud
There's also a nice tutorial available: Securing a Web Application on a Java Cloud Service.