Wednesday, September 30, 2009

For my previous blog post I got interesting comment from one of my readers - Husain. He was asking, how he can save search results across multiple sessions in Oracle ADF application. Actually, while asking he found solution by himself and updated my sample application from my previous post. Today I'll describe this updated application and will cover MDS topic for persisting query criteria results.

Sunday, September 27, 2009

In Januray, I was blogging about very useful component in ADF Faces Rich Client - Panel Collection. However I got a comment, where user was saying that provided features most likely will not be accepted by the end users (mostly because UI changes were not persisted). That's true, in our project we also were hearing similar complains. Good news today, ADF 11g R1 provides User Customization per Duration of Session, and also its possible to configure persistence Across Sessions using MDS. Today I will quickly show how user changes are stored during active session, without MDS.

Download sample application - UserCustomizationsSession.zip. In order to implement persistence of user changes during active session, just go to ViewController project properties and in ADF View section set Enable User Customizations For Duration of Session.

Thats it, pretty straightforward. Now how it works - let's open page with Query Criteria and results table:

First column is FirstName, second column is LastName - let's swap those columns and put LastName column as first:

Press Close button to return to Index page:

As it was working before, if user will open same page with Query Criteria and results table, FirstName would be again as first column. But now, since we have enabled User Customizations and it works - as first column will remain LastName:

This weekend I was using 3G Mobile Internet with my Mac Book Pro, unfortunately network providers usually (with some exceptions) give you client software adopted only for Windows platform. I'm running Windows on Mac OS (Leopard) through VMware Fusion 2.0, however there is a bug in VMware - it can't recognize Mac Book Pro built-in microphone. I can hear, but can't talk - too bad.

But there is quite interesting solution - since I can't configure 3G Mobile Internet device drivers in Mac OS directly, I can access internet connection available in VMware from Mac OS. Thats a bit unusual, in the most of the cases we use Mac OS connection in VMware and not otherwise.

In Mac OS, using AirPort utility, create network:

You create Computer - to - Computer network, set password you want and press Ok:

When Computer - to - Computer network is created, your Mac will not use Wireless connections, it will act as wireless router itself and will utilize available physical networks.

Before starting VMware, make sure you have set Bridged network configuration:

Now its time to start VMware Fusion. When Windows will be up and running, open Network Configuration, you should see there Local Area and your 3G Mobile Internet connections enabled.

If Local Area connection can't get dynamic IP, open network configuration for 3G Mobile Internet connection and set there Internet Connection Sharing option:

Now you should be able to use 3G Mobile Internet directly on your Mac, with VMware Fusion running and acting as internet modem.

Saturday, September 26, 2009

With today post I'm closing series of posts, where I was describing how you can orchestrate and connect various services with Oracle Fusion/SOA 11g. Before reading this post, I would recommend to look through my previous related writings:

There is one more Switch activity and it is designed to route process according output from Human Task. If manager will reject raised request, original salary value will be set back in database. If request will be approved, no action will be taken, because salary value already is updated in database by ADF BC:

Thats it, Human Task is defined and its output is processed. Now its time to check how it works on runtime. Let's use application (B) and for Employee Id = 101 update original Salary value 16000:

To 15000. Salary change is 1000 and this will not violate Business Rule, where it is declared maximum change without manager approval is 5000:

Human Task will not be initiated in this case - process instance will be successfully executed without Human Task intervention:

Let's update now to 23000, it will be 8000 change and Business Rule should trigger Human Task invocation:

You can see Human Task is in running state:

We need to approve or reject raised Human Task in order to complete BPEL process. We can do this through sample Oracle BPM Worklist application provided by Oracle together with Oracle SOA Suite 11g:

When I login into BPM Worklist, I can see there is a Salary Change task assigned to my user:

I can approve or reject it:

In this particular case I have rejected Salary Change and BPEL process became completed:

You can notice in the log, that right after Human Task there was SalaryControlService reference executed, this means Salary Change was rejected and Web Service method was invoked to store original salary value.

Monday, September 21, 2009

On October 5th, I will run public Oracle JDeveloper/ADF 11g training in my home town - Vilnius. Its always a pleasure to have lectures in native language :) Event is organized by Oracle Lithuania office.

Participants should come with JDeveloper 11g and Oracle XE database installed in their notebooks. It will be master class type event, where I will explain and help to understand tricks of ADF development. Will walk through following topics:

I have described a hint for Oracle ADF application deployment on WebLogic Managed server in my previous post. I was describing how to enable Oracle ADF libraries (JRF files) on Managed Server using Oracle Enterprise Manager 11g Web console.

Those of you, who don't have Oracle Enterprise Manager 11g, there is another way to enable ADF libraries on Managed Server. Just go to Deployments section in WebLogic console:

And for all ADF library related deployments, enable your Managed Server target (by default it is not enabled):

Sunday, September 20, 2009

In Oracle Fusion 11g R1 we can deploy Oracle ADF applications on Oracle WebLogic server directly from JDeveloper 11g - and it works perfectly. However, sometimes we need to deploy EAR file manually from WLS console. If you'll deploy your application to EAR file and later will try to deploy on WebLogic server through console, you will get deployment error related to database connection: No credential mapper entry found for password indirection:

This will happen, when Application Module will be configured to use JDBC DataSource (most common setting while deploying):

I have solved deployment error after reading Steve Muench blog post. He writes there about 'Auto-generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment' checkbox. Its exactly what I was looking for, since I'm doing manual deployment, automatic mechanism for Data Source declaration on WebLogic is not triggered and you're getting errors. So, what you need to do is to uncheck this checkbox:

After this change, application is deployed and works properly (just don't forget to define manually Data Source on WLS):

To illustrate the difference when weblogic-jdbc.xml auto synchronization is on, I have extracted contents for both EAR files:

On the left - when auto synchronization is on, on the right - when it is off. You can see that with auto synchronization option on, one additional file is created - Hr-jdbc.xml. This file contains database connection information and creates problem during manual EAR deployment on WLS. When 'Auto-generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment' checkbox is unchecked, this file is not generated and manual deployment succeeds.

In production, usually no one is using WebLogic Admin server for application deployments - thats logical. All enterprise applications should be deployed on WebLogic Managed server. During deployment on Managed Server, I have faced small issue - ADF 11g R1 libraries were not found. However, I have resolved this quite easily, will describe how.

I have resolved this problem quite easily - just opened Oracle Enterprise Manager 11g console. There you can find a list of develop_domain servers - Admin Server (AdminServer) and Managed Server (dev_server). Open details screen for Managed Server and you will see option to apply - JRF Template for this server. Its exactly what I was looking for:

After JRF Template was applied for Managed Server, Oracle ADF application deployment on this server was successful as well: