Tuesday, September 25, 2012

ADF Essentials - Quick Technical Review

Finally we have express ADF edition - ADF Essentials, free to use even for production deployment. It includes most of the important ADF features, except ADF Security (this can be implemented with standard Java security). We were discussing idea of express ADF edition on ACE Directors briefings already two years back and Sten Vesterli was one of the strongest advocates for ADF Essentials.

There is lots of hype about free ADF edition, but only time will show how successful it will be. Currently most of the Oracle customers already have WebLogic licenses, so it makes more sense to use full ADF version and avoid sometimes painful ADF setup, configuration and runtime performance monitoring for serious production systems. On the other hand, lighter ADF edition also makes its own sense - we can have much more ADF deployments across enterprise with lower cost.

This post is just a quick review for ADF Essentials on Glassfish. I will do proper performance test soon to compare ADF performance on WebLogic vs. Glassfish. So far, it seems like runtime ADF performance on Glassfish is pretty good, may be because lighter server. I will need to verify how good it scales and how well it works under stress load.

Download sample application for this post - adfessentialstest.zip. This application contains two JDeveloper 11.1.2.3 applications - one main application, another ADF library. I would like to test if ADF region imported from ADF library works. Sample application was deployed to Glassfish server based on instructions from Shay Schmeltzer - Deploying Oracle ADF Essentials Applications to Glassfish.

Main application is up and running on Glassfish server:


There is ADF Library JAR file included into Main application, it contains ADF region:


Main application contains single page with two tabs, imported region is in second tab. First tab contains Master-Detail implementation:


Application is pretty simple, but first thing I noticed WAR deployment archive size - around 60 MB, lots of ADF libraries are packaged into WAR. No wonder Glassfish server goes out of memory after couple of redeployments. ADF Essentials are deployed into Glassfish domain LIB folder, in addition different ADF libraries are included into WAR package as well. In order to decrease WAR size a bit, we can enable compression option (it allows to decrease WAR size by around 15 MB in this case):


Compressed WAR size is 44 MB:


List of ADF libraries in deployment WAR file:


ADF runtime performance on Glassfish was quite good, it looked to me even a bit faster comparing to WebLogic - but I could verify this only after JMeter stress test. Master-Detail data was loading pretty fast:


ADF region imported from ADF library didnt work for me - empty block is rendered:


Region error is reported in Glassfish log:


Important: I have tested the same application on WebLogic server with full ADF - the same imported ADF region from ADF library was rendering correctly. ADF library support formally is available in ADF Essentials, this means we are hitting some bug here.

This proves that there are runtime differences between ADF application running on full ADF and on ADF Essentials. If application runs on full ADF, it doesn't mean it will run on ADF Essentials, it will require additional testing.

UPDATE 26/09/2012: ADF region imported from ADF library works. I did one more redeployment for the main application on Glassfish server - suddenly it works now. I can see ADF region rendered from ADF library:


Probably some parameter was not registered correctly during initial deployment.

21 comments:

mohamedbnh said...

Hello,
I have just import your application test in my jdev but when i deploy the ViewController to a war the size of file is 5mo i would like to know which librarie choosen in the profile of deploy WEB-INF/lib Contributors, because i have test many time to deploy a fusion project to glassfish but always there is a problem.
And thank you.

Andrejus Baranovskis said...

Sounds like you are deploying on ViewController level, you should deploy from Application deployment archive instead (EAR). Select Glassfish deployment profile.

Andrejus

mohamedbnh said...

I have deploy the application but i got this error :

Unable to add application
POST http://localhost:4848/management/domain/applications/application returned a response status of 403

can you explain me what does mean this error.

Andrejus Baranovskis said...

This is wrong URL, it must include application context path, /faces and main page.

Andrejus

mohamedbnh said...

Sorry but i get this error when i deploy my application from jdev to glassfish, and i have test this url

http://localhost:4848/management/domain/applications/application

on my browser and no problem, please can you give me explication and thank you.

Andrejus Baranovskis said...

This means deployment fails, you should check error in Glassfish log.

Andrejus

Anonymous said...

Hi Andrejus,

have you already tried to deploy adf faces demo application (rcf-dvt-demo.war) to Glassfish?

I tried this but without success.
Details see https://forums.oracle.com/forums/message.jspa?messageID=10640574#10640574

regards
Peter

Andrejus Baranovskis said...

Nope - I didnt tried that one. However I tired FOD Demo app - it was not working.

Was throwing errors related to EJB, because they have ADF BC exposed as Web Services (this is not supported).

I saw you are getting error related to DVT Managed Beans, it might be this is trying to invoke some ADF Essentials not supported feature.

You should extract that XML and check what it defines.

Andrejus

Anonymous said...

Hi Andrejus,
have you tried to deploy an application that contains declarative components to Glass Fish.
we have tried the same on Tom cat with no success, so i was wondering if it has the same problem on Glass Fish or not

raman deep said...

hi,

I have to deploy ADF application on glassfisg server that uses bean data control(consuming web server proxy). I am able to sucessfully deploy it on glassfisg but while running it gives java.lang.ClassCastException: oracle.jbo.mom.DefinitionContextAgeable cannot be cast to oracle.jbo.mom.DefinitionContext error. Can you please suggest how to sucessfully deploy this application?

Aurimas Lacitis said...

Hello,

I deployed application according to Shay Schmeltzer's instruction succesfully, but when I run
application (localhost:8080/gfadftest) I get HTTP Status 404 error.
There some warnings in glassfish log:
[#|2013-01-22T23:31:31.985+0200|INFO|glassfish3.1.2|oracle.adf.share.config.ADFConfigFactory|_ThreadID=21;_ThreadName=Thread-2;|Calling ADF Config instance implementation: class oracle.adf.share.config.ADFConfigImpl.releaseResources()|#]

[#|2013-01-22T23:31:31.986+0200|INFO|glassfish3.1.2|oracle.adf.share.config.ADFConfigFactory|_ThreadID=21;_ThreadName=Thread-2;|Calling ADF Config instance implementation: class oracle.adf.share.config.ADFConfigImpl.releaseResources()|#]

etc...

What might be the reason?

Thank You.

Andrejus Baranovskis said...

I think everything is correct.

You need to append correct path to URL:

localhost:8080/gfadftest/faces/main.jsf

Andrejus

fakhri kharrat said...

hi Andrejus,
thanks for the post,

when i run your application an error appears :
oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root


what can be the origin of the error
thnk

Bikram Saikia said...

Hi Raman Deep,

Did you find a solution? I am also facing the same issue.

Thanks,
Bikram

Andrejus Baranovskis said...

This means Glassfish is not configured correctly to run ADF, or you are missing JDBC connection declaration.

Andrejus

Girish Washikar said...

I was able to successfully deploy the app.

I have to create a JDBC resource with name "jdbc/HrDS" in GlassFish Server. (This resource is used by CommonSampleLib and GlassFishTestApp apps). which points to JDBC Connection Pool for HR Schema in XE database.

- Girish

Andrejus Baranovskis said...

Cool. This was my previous suggestion as well.

Thanks for update.

Andrejus

Marc Arbour said...

Hi Andrejus.

I have the same error as Raman has: java.lang.ClassCastException: oracle.jbo.mom.DefinitionContextAgeable cannot be cast to oracle.jbo.mom.DefinitionContext error.

I triple checked my jdbc connection and they are corret. My glassfish server otherwise run adf applications fine but the one I am trying to run.

Do you have any suggestion as to what could be wrong?

Marc Arbour said...

I have found the solution to my problem.

It is posted here: https://community.oracle.com/message/12607236#12607236

Best regards

Marc

Andrejus Baranovskis said...

Thanks for update !

Andrejus

Alexandru Matei said...

Isn't there a way to share more jar files instead of bundling them into the EAR file ?

ViewController WAR is 83 MB and the size of the lib folder for the Application is 31 MB.
Therefore the EAR file is about 114 MB

Isn't there any way to share more .jar fils into the Glassfish lib folder instead of packing them each time in the EAR file?