Friday, July 17, 2009

Oracle ADF BC Deployment and Imported Libraries

Last year July, I was writing about ADF BC sharing through JAR libraries across entire application. It works the same in current JDeveloper 11g release, however during deployment on standalone WebLogic server I have noticed some problems. When application with imported ADF BC libraries was deployed, shared ADF BC components were not found on the classpath and page wasn't loaded. For more info about importing shared ADF BC libraries you can find in my previous post - Import Functionality in Oracle ADF BC.

I have tried to deploy my previously developed application directly from JDeveloper 11g to standalone WebLogic server:


However, after application was successfully deployed and when I have tried to access it, I got oracle.jbo.NoDefException for lt.andrejusb.model.shared.entities.Countries entity:


This Entity Object should come from imported ADF BC library:


But for some reason shared package wasn't included into EAR. When I have extracted EAR package, I didn't found it there:


But as usual, solution is easy. If you have application with shared and imported ADF BC libraries, make sure you didn't forgot to set dependencies properly. In order shared package to be included into deployment WAR and then EAR archives, make sure you have set dependencies in ViewController:


In my case, ModelShared wasn't set with dependency, it's why this package wasn't included. I have set dependency and redeployed - got shared package included now:


Now application with shared and imported ADF BC components works just fine as well when it is deployed on standalone WebLogic:


Download sample application prepared for deployment - ADFBC_Import_Deploy.zip.

Tuesday, July 14, 2009

Red Samurai Consulting - First Project Reference

On Oracle JDeveloper / ADF Customers list, MedNet International Ltd. (MNI) project profile with credits to Red Samurai Consulting was listed today.

Customer - MedNet International Ltd. (MNI), is doing Oracle Forms 6i re-write project to Oracle Fusion 11g. I'm happy to be a part of this project and provide Oracle Fusion 11g consulting.

I will describe technical aspects of Oracle Forms to Oracle Fusion 11g conversion during my Oracle OpenWorld 2009 session on Oracle Develop track - Oracle OpenWorld San Francisco 2009.

Sunday, July 5, 2009

Improving Performance in ADF Applications - Page Load Time in CRUD Forms

This February I was blogging about how to improve performance in Query type forms - Improving Performance in ADF Applications - Page Load Time in Query Forms. It came time to revisit this topic again, and describe performance tuning in CRUD type applications. Especially, because Oracle JDeveloper 11g Release 1 became available this week. In this release runtime performance improved significantly - Oracle ADF 11g Release 1 - Runtime Page Load Performance Improved ! We are able to run our forms against large data sets without any delay, as it was before. In this post I will describe one of potential designes, how CRUD type applications can be implemented, in order to minimize performance overhead completely.

Download sample application - CRUDPerformance.zip, it contains logic I'm describing in this post.

If you open View Object tuning section, you can see there among other options - No Rows (i.e. used only for inserting new rows). This option means, View Object will not generate any Select statements and will not query database:


In other words, main form query will not be executed and form will be opened only for insert mode - page load performance will be optimal because no initial communication with database. That's sounds exactly what we need, however then how use same form for data editing, if we can only insert. Answer is simple - we can do this also. We should keep in mind, that when No Rows option is set, this means MaxFetchSize is set to 0. This means, on runtime when needed we can programatically change it to -1, it will allow to retrieve data from database then using same View Object. I have implemented MaxFetchSize change in Application Module class:


When form will switch from insert to edit mode and back, I will call this method accordingly.

In ViewController, I have used ADF Task Flow with fragments - default activity is Create action Method Call. It create new row and opens form without database query. There is also fragment for data editing:


On runtime it looks like this, form is opened in insert mode without database query:


I can type data and store it to database:


When record is successfully inserted, form is returned back to data insert mode:


User can press Edit button and navigate to data editing mode. When this button is pressed, action method is called where Rollback is invoked in order to remove new empty row and change MaxFetchSize parameter value to query database:


Data editing fragment is opened with Query Criteria on top and it prevents default query execution:


I can put parameter and find newly entered record, can modify it and save changes to database:


When Create button is pressed in this fragment, action method is call as well and it puts View Object into No Rows mode:


Finally, data insert fragment is opened again:


Spanish Summary:

Andrejus en esta entrega, nos brinda un tip para mejorar la performance de los mantenimientos con ADF. Para ello, realiza configuraciones a nivel de View Objects que evitan un acceso innecesario a la base de datos en los procesos de Creación, Actualización y Eliminación de datos.

Friday, July 3, 2009

Oracle ADF 11g Release 1 - Runtime Page Load Performance Improved !

Since yesterday, when Oracle Fusion Middleware 11g became available, I have done quite extensive testing on previously known ADF problematic areas.

Cool thing is that page load time even for complex pages is much faster now on runtime. Its because previously on page load, SQL queries for all available LOV components were sent to database. So, if page contains 20 LOV components, means 20 SQL statements were sent to database, it was killing performance especially when working on larger datasets. Now its fixed, and on page load SQL queries for LOV components are not pre-executed anymore - only main SQL statement is executed. Means - page load performance improved significantly.

In my next post I will describe how to tune your ADF application design in order to get high performance in CRUD applications.

Wednesday, July 1, 2009

Oracle Fusion Middleware 11g Release 1 - Performance Improved !

Today is a great day - Oracle Fusion Middleware 11g Release 1 became reality ! I remember, 3 years ago when Fusion development was started, not all my colleagues were sure that it will be finished successfully ! But today we can see a proof - we have Release 1 of working product !

I'm excited to see in Oracle Fusion:
  1. Oracle WebLogic Suite 11g
  2. Oracle SOA Suite 11g
  3. Oracle Identity Management 11g
  4. Oracle WebCenter Suite 11g
If speaking more technically and about my current project, I can see potential use of those major new feature areas:
  1. Oracle Metadata Services (MDS)
  2. Oracle ADF Desktop Integration
  3. Oracle SOA Suite
  4. Oracle WebCenter Framework and Services
  5. Oracle Team Productivity Center (TPC)
I can see that Entity Objects in ADF Business Components support now Business Events, that is pretty cool because we can integrate our Model logic with SOA composites through standard events.

And finally, I have noticed - JDeveloper 11g Release 1 IDE performance is greatly improved, that cool news. I have tested and tool seems to work now more predictable and dialogs are opening with better response, thats good work. Also, performance bug described in my previous post is fixed - JDeveloper 11g IDE Performance Problem - Reproduced.

Friday, June 26, 2009

Oracle ADF and International Characters

My team is developing application in Oracle ADF with internationalization support. When we did preliminary tests, we have noticed that we can't save local characters to database, entered characters simply were transformed to code representation. Our database character set is not UTF-8, but local. We were lucky to find very elegant solution - just to change content type charset of our pages. We have changed it to UTF-8, inside our JSPX pages, and ADF automatically transforms it to database character set. This means, same approach works when we have UTF-8 charset in database, or any local charset as well.

You can download my sample application - ADFInternationalChars.zip, where you can test how it works on your database.

Let's say we have simple form:


And type text in local language for First Name field, this time in Russian. When user will want to store this record and will invoke Commit, local language characters will be transformed to unreadable form by default:


I saw people are asking related questions quite frequently on OTN forums. Actually solution is simple, we just need to change page content type charset from default one:


To UTF-8 charset:


This will allow to accept local characters on JSPX page and to transfer them through ADF Business Components to database. And now Russian text is saved to database without problems:


And if to check database, here is this text stored:


Finally, its important to mention, that if your database is installed with UTF-8 support, you can store all local characters. But, if you have database with specific character set, you can store only this specific charset from JSPX pages. Its good thing you dont need to modify your JSPX pages in both cases, just declare UTF-8 for page charset encoding. My database is installed with UTF-8 charset:

Friday, June 19, 2009

Quick Hint for ADF Faces Rich Client Performance Tuning

In this post I want to write about quick hint applicable for ADF Faces Rich Client performance tuning. This hint was found by my colleague - Sasha Stojanovich, we are working in the same project. I think it will be useful for community as well.

We have discovered, that we can disable ADF Faces Rich Client animation functionality globally, just by adding one line in trinidad-config.xml file:
  • animation-enabled = false
If you really don't need animation effect, this will help greatly when rendering LOV popups, drawing data tables and etc. By disabling animation, artificial delay of components rendering is removed and this allows to achieve better UI performance.