Friday, August 29, 2014

End-To-End ADF Cloud Deployment Process

ADF and ADF BC perfectly runs on Oracle Java Cloud. You could deploy regular ADF application straight away from familiar JDeveloper environment without any hassle. With this blog post I would like to walk through the process of migrating DB model to the cloud and deploying ADF application (enabled with ADF Security) to the cloud.

Here you can download sample application - TreeComponentsCloud.zip. This application is deployed and runs on Oracle Java Cloud, accessible through this link. Online access will be available until my Oracle Java Cloud trial subscription expires (in a month or so). You can login using following credentials - username: redsam, password: We1come@ and identity domain: ltredsamuraictrial99050.

First of all, we should prepare data model - basically you could migrate your local database to the cloud (including data) using JDeveloper wizards. Database Cart wizard could be used for this purpose, simply add all required tables to the cart and set a checkbox to include the data:


You would need to enable SFTP access and note down specific SFTP connection details for Oracle Database Cloud, read more about it in Oracle Java Cloud documentation section Building the Data Model. I have defined Oracle Database Cloud connection in JDeveloper for SFTP access:


Data Model and data upload to the cloud is very seamless process - it does everything just with one click. Entire structure is packaged into archive and sent over to the cloud:


When migration process is completed, we could double check if data is in the cloud. You could expand Oracle Database Cloud connection in JDeveloper and browse through the tables, data should be accessible:


Next we should enable secure access in the cloud. Oracle Java Cloud supports regular ADF Security setup. However, to render Oracle Java Cloud login page, you must include additional security constraint into web.xml (read more about ADF Security in Configuring Security section from Oracle Java Cloud documentation). Here you can see security constraint implemented in sample application web.xml:


You should define regular ADF Security permission for page access. I'm using custom application role - AccountantAppRole:


There is enterprise role AccountantRole defined and mapped with application role from above. This enterprise role is also defined in Oracle Java Cloud service:


Finally there is user defined - redsam, the same user is defined in Oracle Java Cloud service. This user is mapped with AccountantRole enterprise role:


I have defined AccountantRole role under Users group in Oracle Java Cloud service:


This role is mapped with redsam user in the same Oracle Java Cloud service:


Deployment process is identical to the one deploying to local WebLogic server, you could use the same JDeveloper wizard - only select Oracle Cloud as target Application Server from the list:


Once application is deployed, you could login to Oracle Java Cloud service control (looks quite similar to Oracle Enterprise Manager) and check application status, etc.:


Let's do a test now. I will try to login with a user who do not have access to the application. Our sample application is protected by ADF Security, Oracle Java Cloud renders login screen automatically (no need to implement it in your custom application):


Application access will be reported as unauthorised, as expected:


Login with a valid user - redsam (see all login credentials listed in the beginning of this post):


We can access application now. Browse through tree structure and even render a colourful chart:

9 comments:

Anonymous said...

Thanks Andrejus for sharing this..very useful..

Maroof Ahmad said...

Hi Andrejus,

I am trying to login in cloud with user: redsam , pwd: We1come@ and Identity Domain: ltredsamuraictrial99050

but its failed with error message 'The information you entered is incorrect. If you've forgotten your password, click Forgot Password.'

Please provide correct credential. And if i want to deploy same(From your blog) application on my oracle cloud, Can i do with JDev 11.1.1.6 ? Which JDeveloper you used for this application?

Maroof

Andrej Baranovskij said...

Hi Maroof,

Credentials are correct, may be you did some mistype? You should double check.

I was using JDEV 11.1.1.7.1

Andrejus

Maroof Ahmad said...

Hi Andrejus,

Thanks for replying, First was redirect some different link, but now worked for me, i was logged-in your cloud app and browsed your application, for me Region data was shown but employee-department data not displayed. Anyway it was very useful for me Thanks.

Maroof

Andrej Baranovskij said...

Employee-department data is also displayed, you simply need to select location from US.

Andrejus

Anonymous said...

Once Again Thank You So Much Andrejus ..!!
I am very happy when I learned new things from your posts.

I have some questions related to running ADF application in Oracle Cloud..
Currently working on FusionApplication(FusionApps)and it's in SAAS model.We haven't access the DB and any unix box also.So in SAAS model we can't deploy any custom objects.

1. Can we deploy and run Custom ADF application on SAAS cloud ?
As you mentioned your application running on Java Cloud.
2. If someone wants to deploy and run custom applications and rely upon on Oracle cloud then which cloud will be use?SAAS or JAVA.
3.Somewhere I saw in some cases the ADF applications will be run on cloud we need to take a special attention to build the application at the time of development.How developer/architect will be aware about at the time of design about those facts? Can you put some lights on that.

Thanks Once Again..!!

Andrej Baranovskij said...

I will go through your questions and post a reply. Also I will cover similar topics during my session on OOW about ADF to cloud deployment.

You should be able to extend Fusion Applications in the cloud.

Andrejus

Adarsh said...

Hi Andrejus,

Do you know if there is way to access SFTP server from the cloud? I have a third party SFTp server which I want to use in my cloud application.

Apoorva said...

Hi Andrejus,

Can an ADF application which has integration with SOA web services be deployed on Oracle Cloud?