Wednesday, 9 December 2009

jBPM on Weblogic

Since I’m using ADF as the main technology for my current project and I wanted it to integrate with jBPM 4 I had no choice. WLS (Weblogic BEA) is currently the only platform which supports ADF 11g. So I had to get jBPM running on WLS.

In this battle I had several barriers to take, some of those are more related to the ADF technology rather than to the WLS server.

Step 1: get rid of all the ‘unnecessary’ jar files
Since my jBPM integration is part of a web project I had to move all necessary libraries under the WEB-INF\lib folder. After a big clean up I ended up with these ones:

These are the ones you really need to get the jBPM engine running.

Step 2: be sure the right jar files are getting used
I suppose this step is more related to the use of ADF en JDeveloper but I share it with you anyway. Since there are already certain jBPM libraries present in JDeveloper and ADF those one are used by default rather than the one you specify in the WEB-INF lib folder. To tell your application server to prefer the ones you added in the WEB-INF\lib folder you have to add a deployment descriptor.
For WLS add the Weblogic.xml deployment descriptor and add the following lines:


This option tells WLS to prefer the jar files specified in the WEB-INF\lib folder instead of the ones who are installed inside the application server.

Jobs done, now it should be possible to run jBPM inside your web application on Weblogic.

Monday, 23 November 2009

ADF: popup ‘ContentDelivery’ property with value ‘lazyUncached’

I have a case in which I have a servlet who renders an image from certain database values. The servlet is called from within an ADF popup.

One of the properties of the popup is the property ‘ContentDelivery’ which default value is ‘lazy’. When this property is set to ‘lazyUncached’ the content of the popup window will be delivered fresh each time the window is shown according to the documentation.

Just what I needed!

But my experience taught me something else, the first time the image is rendered correctly as I expected but from that point on my servlet code is never called again and a cached image seems to be shown.

The work around for this error is quite simple (and obvious if you’re familiar with ADF). Just put a partial submit on the buttons or components on the page that are responsible for the changes to the image (in my case via database manipulation) and add a partial trigger to the popup to this buttons or components.

Jobs done, now when the popup is called after one of the partial submit buttons is clicked the image on the popup is rendered correctly.

Thursday, 19 November 2009

Property editors/inspectors

Ooh yeah, another tip, if you have ever have to write your own property editor (or inspector or whatever you want to name it) Java Introspection works just fine. But to write your own property editor based on JavaBeans and BeanInfo Classes that’s just a pain in the ass…. Seeing Sun’s BeanBox I had an ‘aha phenomenon’ because I had just seen something that fulfilled all my needs. So I search for the code that could just render me a property editor just like the BeanBox does. But I can now say to you ‘bad approach’. So if you ever plan to write your own property editor based on Java Introspection, just write some simple classes who render a basic property editor without using custom property editors based on java.beans.PropertyEditorSupport, and other shit….

Indeed it is ‘Quick & Dirty’ but the other way seems just to be too much work compared to the benefits it gives you…

Wednesday, 18 November 2009

ADF 11g the struggle :-)

Maybe a good opener: ‘Every technology is easy to use once you have the right knowledge’… And yes this is also the case for the Oracle ADF (11g) Framework which I’m currently using. The more I learn of this technology the more I love it, but to get at this level… man what a struggle, if I could suggest one thing to Oracle it would be: build a good knowledge base for ADF…