Wednesday, August 31, 2011

Webcenter : Creating Portal Application and Integration with ADF

 

I will demonstrate how to create web center portal application and consume ADF Task flows based on ADF BC component.

1. Create New WC Portal  Application

image

2. I am selecting default provided by portal.

image

3.You will see default portal structure is created with three data control.

image

Above project structure has following component

- Portal

site navigation , page hierarchies , administration , security , page templates , skins and more.

-PortalWebAssests

This folder is specially for static resources.

Run Home.jspx and you will see following default out of box login page.

image

login as weblogic/weblogic1

image

On top right corner there is “Administration” link which will take you to runtime webcenter navigation customization , create page and much more.

image

In next few blogs we will create our own portal components and new ADF Project to integrate it to portal project.

Webcenter Warning :- Make Sure Your Domain Directory ?

 

When we create webcenter domain make sure it do not contains any spaces in between.

Also , make sure domain is present in folder which do not have spaces in between.

Consequences :- if you have above two point satisfied in your webcenter installation and configuration then pages in webcenter application will not be rendered.

Webcenter : How to verify that you have Webcenter Extension Installed

 

Open Jdeveloper

Help –> About (Click Extensions) and sort by Identifier two times.

You will see version of each component of webcenter like Oracle Composer , Webcenter Rss Services etc.

image

Tuesday, August 30, 2011

Weblogic : Taskflow do not show latest changes after running

 

When you add execute with parameter or new view to task flow run the project then some time I have seen that new taskflow changes are not reflected in running application.

Then you will do following things without any success

- Restart Integrated Weblogic Server

- Restart Jdeveloper

- Clean Project

However , still Task Flow changes are Old.

So what do I do next.

For web Logic there is domain and you can see current running domain by looking in to your J-developer log window.

image

So go to System directory Directory

C:\******\system11.1.1.4.37.59.23

Delete Project inside DRS folder

C:\**\system11.1.1.4.37.59.23\o.j2ee\drs

Result :- when you run project again you will see latest changes of your taskflow.

Delete Project inside ADRS folder

C:\***\system11.1.1.4.37.59.23\o.mds.dt\adrs

This will delete some mds stuff.

Tuesday, August 23, 2011

Weblogic : Identifying Class Conflict and ClassLoading in deployed ADF Application using CAT Tool in Weblogic

 

List of Class Loader in Weblogic

System Class Loader - Weblogic Classes in weblogic system directory

Domain Class Loader - Domain Classes in domain directory

Application Class Loader - Library from Weblogic-application.xml , APP-INF/lib

WEB APP Class loader - Library from weblogic.xml , WEB-INF/lib , WEB-INF/classes

JSP class loader

Class Conflict

Until Weblogic 10.3.4 there was no tool available in weblogic  to identify class conflict. However , Now weblogic has a tool called CAT (Classloader Analysis Tool) to perform class conflict check.

Let us say you have class call ClassLoadingExample.class in your Ear Application $CLASSPATH.

Also, you have same class in $CLASSPATH of weblogic.

So when you run the application then Weblogic class will be considered ,not the EAR one giving you surprising result.

Filtering Class Loader

This provide us option to configure our deployment description to make sure that our WAR/EAR class are loaded ,not the one in weblogic.

FilteringClassLoader sits between Application and System Class loader. It is child of System Class Loader and Parent of Applicatino Class Loader.

FilteringClassLoader intercept loadClass method and compare className with list of package specified in weblogic-application.xml file. If package matches class name , FilteringClassLoader throws ClassNotFoundException. This exception notifies applicatino classloader to load class from application.

Configure Filtering Class Loader

Add prefer-application-packages description in weblogic-applicatino.xml which detail is of package to be loaded from application.

<prefer-application-packages>  
<package-name>thirdparty package in your application which may be in weblogic</package-name>
</prefer-application-packages>

Installing CAT


CAT is a Web-based class analysis tool provided by weblogic and we need to deploy wls-cat.war which is located in “WL_HOME/server/lib/wls-cat.war”


After deploying it can be accessed in.


http://weblogichost:port/wls-cat/


CAT Display all currently running applications and modules.


You can use this tool to check Classloading conflicts , Check system and application classloaders and even generate report. For further information please refer to oracle documentation.


For me wls-cat.war is located in


image


I login to weblogic console


http://localhost:7101/console


image


Install war as application , not as lib.


image


Finally deployed with following context


image


Go to testing and access the application.


image


CAT TOOL GUI


image


We can use this “Analyze Conflict” , Generate Report etc.


image








Click analyze conflict. It showed me conflicting classes and gave me suggested solution that I can use in my weblogic-application.xml or weblogic.xml.


image

Monday, August 22, 2011

ADF BC : Making specific row read only for critical records.

 

As I have already shown you in previous blog how to make salary column read only based on role condition.

Now let me write a logic to make specific row read only based on it importance.

Generate Impl class for Employee Entity Object.

Override isAttributeUpdateable method.

image

I checked if job is Vice President then do not allow user to edit record.

Run the page and you will see that row with JobId AD_VP is read only.

image

If you notice this time I wrote logic in EntityImpl.java instead of VORowImpl.java. Actually , we can override isAttributeUpdateable method in both Impl. Please refer to documentation for further reference.

ADF BC : How to make whole view object read Only

 

Some time small things make difference and needle can do the job where sword cannot.

There are some system information that need to be read only on GUI and if you have generated VO based on EO then go to following screen and set the updatable flag to false.

image