A quick introduction to getting up and running with the Oracle Cloud.
On January 2nd I received a New Year's gift, my "Welcome to Oracle Cloud" email. I had requested a 30-day free trial back on October 17, when the Oracle Cloud was first announced, and had basically forgotten all about it. If you haven't already, request a trial account for yourself:
The Oracle Cloud integrates very nicely with Eclipse, NetBeans and JDeveloper, where you can develop and deploy to the cloud just as if you would to a local instance of WebLogic. The goal of this entry is to show you how to configure JDeveloper to deploy to the cloud. In the resources section below I've included pointers to instructions for both Eclipse and NetBeans.
There are specific versions of JDeveloper, Eclipse and NetBeans that work with the Oracle Cloud. All of the Oracle Cloud related downloads are assembled for you on the Oracle Cloud Downloads  page. For JDeveloper you need version 22.214.171.124.0. However, not just any version of 126.96.36.199.0 will do. There was a special release of version 188.8.131.52.0 just to support the Oracle Cloud. To verify that you have it, check the About box reads BUILD JDEVADF_184.108.40.206.0CLOUD_GENERIC.
If not, just download and install JDeveloper again.
Once you have the correct version of JDeveloper installed, you can establish a pointer to the WebLogic server instance hosted in the Oracle Cloud. Switch to the Application Server Navigator. Right click the Application Servers node and select New Application Server:
Give the connection a name and set the Connection Type to Oracle Cloud:
Supply your Oracle Cloud account credentials:
Go to the My Account Administration URL , select the java service, and note the Data Center, Service Name and Identity Domain:
Use these values to populate the next page of the Create Application Server Wizard:
Finally, test your connection. If the connection test fails, double-check your inputs. I got tripped up for a long time because I had a typo in my Identity Domain:
You are now configured to deploy applications to the cloud just as you would a local application server!
As a test, let's create a simple Hello World application. Create a new Generic Application, HelloCloudApp:
And associated HelloCloudProj. There's no need to select any specific Project Technologies for this simple application:
Create a new JSF Page:
I'm naming it index.jspx:
Design your page. I'm simply adding an Output Text:
At this point we could deploy the application, but it would require your cloud credentials in order to view it. We need to make one minor addition to the web.xml which will make it available to the public. Simply add the empty
<login-config/> tag to the file as shown below. You can read about the details of Updating web.xml  in the Cloud Documentation.
Double-click the project to open the Properties dialog and select Deployment to create a new Deployment Profile:
Select Archive Type as WAR File. All applications to the Oracle Cloud must be deployed as a WAR or EAR. See Supported Application Containers and Services  for details:
Optionally, give the application a more user friendly Context Root:
Right-click the HelloCloudProj and select Deploy > HelloCloudApp. Select Deploy to Application Server:
Select the OracleCloud server we set up earlier:
Monitor the Deployment progress in the Deployment - Log:
Since JDeveloper knows we are deploying to the Oracle Cloud, it automatically runs the application through the whitelist utilities, which ensures you're not trying to use certain APIs. Read the details at About Java Cloud Service Whitelist . Click the Oracle Deploy Job Log link in the output window to see the details of the API Whitelist run.
The application is live and public:
Your access URL should be the same, except for the identity domain. Just swap mine with yours. If you want, leave a link to your running Hello Cloud app in the comments.
It's never been so easy to make a Java EE application public!
|HelloCloudApp.zip ||42.46 KB|