Pages

Sunday, July 5, 2009

ADF web applications and Oracle Enterprise Manager a perfect match

In the release of Oracle Fusion Middleware 11g the old Enterprise manager website is back. And this EM website is the bomb for ADF web applications. ( Well done) . In FMW11g EM you can off course do the standard things like deploy and undeploy, but Oracle added some extra to this site. You can now the measure performance of your ADF BC applications modules, Servlets , Web application and Task Flows. Change or tune the BC4J config parameters , change MDS or security settings ( add WSM policies ) or change the endpoint of your web service client.
Too bad this EM website is not available in the internal WLS of JDeveloper 11g ( It can be handy for performance tuning).
But we can install weblogic 10.3.1 and add the ADF Runtime and EM website to this WebLogic Domain. For this we need to download Application Development Runtime

Create a new WebLogic Domain and enable the Oracle Enterprise Manager / JRF options

When you want to deploy your ADF application to this WLS server then you probably missing some java libraries. To solve this change your war deployment so the required jars are added to the web-inf/lib.

We need to deploy the ear and not the war else the adf connections and security settings are not deployed. You can only deploy the ear from the application menu.

Here is a picture of the EM website ( http://localhost:7001/em ) where we can see our ADF applications

Overview of the deployed ADF application.


we can go the ADF settings by selecting ADF menu option

Here we can see the ADF BC AM performance
Overview of the Task Flow performance

We can change the BC4J configuration properties.

My application has a web service client and here we can change the endpoint or add some WS-Security policies.

And off course see the total ADF application performance.

Thursday, July 2, 2009

Customize and personalize your JSF pages with MDS / FMW 11G

In a previous post ( TP4 ) I already showed how you an application user can personalize the JSF pages of the ADF 11G application and that ADF will persists these username, role or site changes in a file or database. In TP4 I had to configure MDS manually. With the July release of JDeveloper 11g we can do this with a few wizards.

First we need to enable Customizations the viewcontroller project options. Enable User and Seeded Customizations
Open the adf-config.xml where we have to select the type of customization. We can choose user , role or site. You can always make your own customization class and select this class instead of the default options.

I choose for UserCC, this means I need to enable and configure ADF Security


Select Tag Configuration and choose for example column. This mean the user can change the properties of a table column.
In this case I want to enable that the user can change the column order and the width of the column.

The last step is to configure MDS or the Metadata repository. for this we need to go the application properties.

Make a new MAR deployment profile.



Select the MDS option where we can select the just created MAR profile.
Finally we can run your ADF application and change the column order of a ADF table. We can see these changes on our file system. ( JDEV_USER_HOME JDeveloper\system11.1.1.1.33.54.07\o.mds.dt\adrs )

Wednesday, July 1, 2009

Unit Test your composite application with Test Suite in Soa Suite 11g

With the release of Soa Suite 11g you can make a unit tests to test your Soa Composite Application. In this blog I will show all the steps you have to do, to make a successfull unit test. For this I made a simple Composite application which retrieves the last name of an employee. The Composite application with an exposed BPEL process has EmployeeId as input and BPEL invokes a database adapter to get the Employee’s lastname and return this as response.
First we start by making a XML schema with a input and response element

Add a BPEL process to the Composite xml and use the above XML schema as input and output and expose this BPEL as a webservice. After this I created a Database adapter which has employeeId as input and returns the lastname of the employee. Add a wire between the BPEL process and the Database adapter so I can invoke this adapter in the BPEL process

Open the BPEL process and add the invoke operation. I use an assign operation to fill the input variable of the database adapter and an other assign operation to retrieve the lastname and add this to the response of the BPEL process

The employee Composite application is finished and now I can create a new Test Suite.

The Test Suite creates a copy of the Composite xml.

Select the Exposed Service where we can create a new input request

In this dialog I can generate a sample xml and change the EmployeeId with a real value

Select the wire of the database adapter where we add a input and output assertion so the unit test can compare this to the adapter values

First we create the input assert, use the generate Sample button and change the employeeId value

Do the same for the output of the Database adapter.
Do the same for the exposed Service and the BPEL process

In this wire I want to compare the output of the BPEL process with the Callback Assert.

Now we only have to deploy the whole composite application. The just created Test Suite is part of this deployment.

To test this unit test I have to go to the new improved EM website of the Soa Suite server where I can select the Employee Composite

Select the Unit Test tab of the Employee Composite and select the testcase and press the Execute Button

Take a look at the Test Runs to see the results of the test.

We can see the test4 is successfull and the assertions are succesfull too.

Finally we can compare the expected and actual Value by selecting an assertion

That’s all