Use PSM to push your application to ACCS

To push an application on the Application Container Cloud Service (ACCS) from the terminal, you can use the Oracle product 'PaaS Service Manager Command Line Interface' (PSM CLI). PSM CLI is a tool to help you with scripting tasks you want to do against several Oracle Clouds. The steps to push your application to the Oracle Cloud are not that complex, in short:

  1. We create a container in Storage Cloud for our application.
  2. We put the application archive in the Storage Container.
  3. We install the PSM CLI tool and connect it to our Cloud Identity.
  4. We setup the PSM tool with our username/password/etc. 
  5. We create an application container in ACCS using PSM using the archive from the Storage Cloud.
  6. We monitor the job progress using PSM. 

1. Create a container in Storage Cloud for our application.
curl -i -X PUT -u <username>:<password> \

2. Put the application archive in the Storage Container.
curl -i -X PUT -u <username>:<password> \
 https://<identitydomain><identitydomain>/<StorageContainer>/<zipname>.zip -T ./dist/<zipname>.zip

3. Install the PSM CLI tool and connect it to our Cloud Identity.
curl -X GET -u <username>:<password> -H X-ID-TENANT-NAME:<identitydomain><identitydomain>/client -o

4. You have to run the command 'psm setup' to set up the connection to your cloud identity, provide username, password and the identity domain.

5. Create an application in ACCS using PSM using the archive from the Storage Cloud, you have to supply the manifest & depoyment description as well as the application name.
psm accs push -n <ApplicationName> -r node -s hourly -m ./manifest.json -d ./deployment.json -u <StorageContainer>/<zipname>.zip

6. Monitor the job progress.
Use the jobid you got back from the previous task to monitor the job progress, it might takes some time before the creation of the application is complete.
psm accs operation-status -j <jobId>

Once the job progress is completed, you should be able to access your application on Application Container Cloud.


New Release ADF EMG Selenium Tools v3.0.0

First of all, the github repository is now under the ADF EMG repository and not anymore under Wilfred his personal account. On the release page there is a new release of the Selenium Tools, version 3.0.0.

This new version is based on Java 8 (version 52+) and compatible with JDeveloper (and thus ADF) 12.2.1.x. The selenium tools work the same as they always did and the components are still in the com.redheap.selenium.component package, I did not rebrand it all to an org.adfemg package structure because of backwards compatibility.


New Release: ADF EMG Audit Rules

A new release of the ADF EMG Audit Rules has been out, version:

You can find the artefacts on the download page here.

Or just use the Help -> Check for Updates function and find it in the Open Source section.


New Release: SonarQube ojaudit plugin

There is a new release of the ojaudit plugin for SonarQube on github.
Version 2.0 of this plugin is now compatible with SonarQube 5.6 and 6.0.

For the release, please go to:

The sources can be found on github under adfemg:

Put Component References in the correct memory scope

Memory scopes itself can be confusing enough, therefor I always advise my fellow developers to use the ADF scopes as much as possible and avoid the JSF scopes if they can.

When using taskflows, a lot of times, we want to store values in a pageFlowScope bean, for example to use during the lifecycle of the taskflow on several pages. Now a common mistakes is to have the UI components bind to the same bean as the values.
Usually this happens, because there is an actionListener that refreshes the component in the pageFlowScope bean, that also sets values in that same bean.

I am always a fan of splitting up beans in smaller logical blocks of code, but in this case it is necessary as well. There is a good blog by the a-team on the best practises for bindings in ADF. Next to that, there is also a Code Guideline on the ADF Architecture Square:

• [ADFcg1-03009] – Store UI components in requestScope and backingBeanScope beans - only store references to UI components in requestScope and backingBeanScope beans. Never store references to UI components in applicationScope, sessionScope, viewScope or pageFlowScope beans.

Not doing this, can cause problems on a HA clustered environment, but the main and best reason in my eyes for this is because the UI component tree might not be released correctly. This has two side effects, mostly a significantly increasing of memory load of your application, but I have also seen some strange behaviour of the UI component, leading to inconsistent state of the component in the browser.

The tricks is to split the beans in separated concerns, one that manages the UI components, holding the component references, as well as the actionlisteners. In the taskflow we inject the pageFlowScope bean holding the values in this backingBeanScoped bean that manages the UI state.
Because we have access to the values through the injected bean, we can use the getters and setters to read or modify the value in the pageFlowScope bean, while making sure our UI component references never exceed the backingBeanScope.

My next blogpost will show an example of how to set up this beans including code examples.


OOW16: What is new in ADF

It was not hard to find the ADF sessions this year at Open World, mainly because there was really only one session. Shay his session about new features in JDeveloper & ADF. It was worth seeing who would show up in the room and to be honest, it was quite crowded for an ADF session. 

JDeveloper came out in June 2016, however, this new JDeveloper is only a Patch Set, so mainly bug fixes and not much news compared to last year. Last year I already wrote a blog entry about the JDeveloper

ADF Business Components Triggers
These are simple hook points, in both the Entity Object level as wel as the View Object level, just like we know from the database. You can for example create a BeforeDelete trigger or an AfterInsert. 

You can write this in groovy, JDeveloper even has syntax support for that now and will also do a type check on the groovy code.

ADF Remote Regions
The ADF Remote Regions were already in JDeveloper as well, however, you might have done a small Proof of Concept and came to the conclusion not to use this. Well, the latest patch set included a lot of bug fixes on the remote regions, so if you ever had a good usecase for this it might be worth reconsidering. 

New DVTs
There are again some new Data Visualisation Tools as well:

Next Release
There was a little bird saying something about, however, I could not find anything official on this, so we have to sit tight wether we will get an other PatchSet or a release. 


OOW16: Oracle JET

Since last year at Open World, the Oracle JET team has been quite busy and it has been for the better. There has been quite some development, some great blogs and even a free online course (MOOC). A quick update of the cool features I have seen.

First of, lets start easy, you can see how your layout looks on different devices. No rocket science and not something shockingly new, but pretty cool they now support this.

When in the Cookbook, you can select the device on the top right, and you will see the preview directly in your browser.

Next to that, they have redone the Cookbooks, so the page looks new and refreshing, but that is not all, there is a new section 'Composite Component', in Cookbooks you can find it under Framework:

In here they introduce the concept of CCA: Composite Component Architecture. The concept of writing reusable pieces of UI, that can be embedded as an HTML element. This might sound familiar, this is something HTML5 and web components try to achieve as well.
The good news is that JET can now create HTML5 web components and even better, Oracle will put effort in making all current available JET components into HTML5 Web Components.

JB has created a cool example of how that can work. If you go to the advanced tab of the Composite Component page, you will see a memory game, like this:

You can find all the code to create this component on this page, however you can also consume it as a web component. JB explains this on his github account as well, you can see how the development effort will go down, mixing different JET components. After installing, when consuming the web component for the memory game, this is all the HTML code needed to embed on your webpage:

- The Oracle JET page
- Web Components
- JB’s github
- CCA : Composite Component Architecture
- Memory Game Page