This document provides details for trying and getting a hands-on
experience using Java on Oracle cloud platform as a service (PaaS).
Step 1:
Go to http://cloud.oracle.com and
request for a Java Try account. With this request a plat form of weblogic, and
associated database connection to a single database schema will be provided.
Value proposition of this PaaS is its ability to abstract
all the infrastructure and administrative complexity and provide only required administrative
screens for a business platform operation.
After getting trial account confirmation email, sign in
to http://cloud.oracle.com,
and see the list of java and database service activated as shown in the
following screen shot.
Step 2:
Click on service name Java to get service detail and its
management option. The Java service detail page will show the options and
details about the sftp accounts to move files in and out from cloud. It also
has link to Identity console, in which users and roles accounts could be
created and link to service console that
take enterprise manager (EM) page of Java server in which application
deployment, application management and monitoring could be performed.
To create users, modify password, click on button
Identity console
Step 3:
Confirm the associated data source name from em console
by clicking button ‘Service Console’ from Java Instance detail page. Java PaaS trial version provides already
associated database as a cloud (DaaS) with datasource name as ‘database’ as
shown in the following service console screen.
Above steps ensure all the required components are
available for web application development. Now, to test out the application development,
download ‘Oracle Java Cloud Service SDK’ from http://www.oracle.com/technetwork/topics/cloud/downloads/index.html
Above SDK comes with many sample applications. Setup the
environment as explained below to use SDK samples.
Step 1:
Unzip sdk files to a folder (ex: c:\tools). Modify
build.common.properties file in ‘samples’ folder
(C:\tools\oracle-javacloud-sdk\oracle-javacloud-sdk\samples) as per the
instruction in file. Following are the important parameters. These values are
determined from service instance detail page of your cloud environment.
#Identity domain name
identity-domain=trialasxh
#Service instance name
service-instance=java
# Name of the datasource that the application will use to
do database operations.
# This datasource name is same as your Database Cloud
Service name which is associated with this Java Cloud Service.
data-source=database
Ensure ‘ant’ is available in the path, and run ‘ant’ at
folder. Verify all the samples war files
(ex: petsore.war) are created under folder ‘apps’ (C:\tools\oracle-javacloud-sdk\oracle-javacloud-sdk\samples\apps).
Step 2:
Go to cloud java service console page and deploy petsore.war
using the ‘Deploy New’ button as shown in the following screenshots
Step 3:
Test deployed petsore application by clicking test link
from service console page as shown below.
Type ‘/bookstore’ at the end of the url
to get to the petstore home page.
Step 4 :
Verify tables and data in database by navigating to
database console clicking ‘Launch Service’ button from database service detail
page as shown following screenshots