As promised, I'm posting video recording for my OOW'10 Oracle Develop session. Thanks so much to my colleague, who had lots of patience to hold camera for entire hour ! Thanks to everyone who have attended Developing Large Oracle Application Development Framework 11g Applications session, enjoy and see you next year on OOW !
Thursday, September 30, 2010
Wednesday, September 29, 2010
Advanced MDS Management for Oracle ADF 11g and Oracle WebCenter 11g Applications
MDS functionality in Oracle Fusion 11g is really cool, and it makes Oracle ADF very competitive comparing to other development frameworks. You can read about personalization and customization support - Applying Personalization and Customization in Oracle ADF 11g and Oracle WebCenter 11g. However, most of the customers are asking, how they can manage MDS metadata repository effectively. In the current release of Oracle Fusion 11g, we don't have MDS metadata repository browser, its not easy to track who and when did MDS personalizations or customizations. Because of lack of MDS browser/editor, people sometimes can see a risk to implement systems with MDS functionality, no one wants to have black box as part of IT infrastructure. I have provided this feedback to Oracle Product Managers, I'm sure in the future we will have MDS browser/editor tool. I will explain, what functionality we can use today, for MDS repository management.
As a sample application for this post, I will use one application from my OOW'10 session - MDSManagement.zip. This sample contains WebCenter 11g application and two separate applications with ADF Regions, these regions are consumed from WebCenter 11g Composer component.
I'm deploying sample application on standalone WebLogic server, with WebCenter framework libraries installed. Also I have created my own MDS repository in database - mds-customapp. I'm using this repository for current blog post article:
First I will test WebCenter personalization scenario and login into application as user john:
You can use WebCenter Composer to add one of available custom ADF Task Flows - Employees Graph:
Graph is rendered fine, personalization information is stored in MDS repository:
Let's do MDS test now - I will refactor Employees Graph ADF Task Flow path and redeploy the same application. This should break my application for user john personalizations. It will happen, because MDS will store old ADF Task Flow path and will fail to load it from refactored application - we will see it now. This is valid real life scenario, it might happen that we will need to do refactoring for custom ADF Task Flow:
We can refactor it into another folder and redeploy application:
Now when we try to open redeployed application for user john, it breaks and generates exception - funny one (its because this user have personalized refactored ADF Task Flow):
I'm sure you saw this exception while developing applications with WebCenter Composer - oracle.adf.share.exceptionViewScopeException. This exception may happen, if MDS repository metadata is out of synch with application structure, its what happened in my example.
Now we need to open Oracle Enterprise Manager and navigate to MDS repository screen for our sample application:
The main goal is not to break personalizations of other users, so we don't want to clear entire MDS repository, but we want only to remove corrupted personalizations of user john. Because we don't have MDS browser/editor, its a bit complicated, but still possible. I will describe MDS repository recovery for specific user through series of steps:
1. MDS export
We need to know MDS repository structure, in order to know it - we need to export MDS repository and browse it folder structure. Export MDS repository into archive file:
Export is done successfully - 3 documents were exported:
2. MDS Labels
It is a good practice to create MDS label. This will allow us to revert MDS repository in the future, if there will be a need. However, it reverts complete repository for every user, so its not really useful in practice, when multiple users have different personalizations - these personalizations will be lost. Anyway, its a good practice to create MDS repository back up, before changing it - let's do it.
You should open Runtime MDS Browser (its not really a browser, just set of MDS commands, we can't see real MDS repository structure):
Go to Operations tab and select createMetadataLabel command:
Provide meaningful name and create MDS label:
You can invoke listMetadataLabels command to see all labels available:
List of labels we could revert in the future:
3. MDS repository structure
We don't want to revert our MDS repository blindly to initial MDS label and loose all users personalizations. We want only to clean broken personalization for one user - john. So, we need to know what MDS documents we should delete. Because there is no MDS browser, we need to check this manually through exported MDS folder structure. There are two places available with user john personalizations. First one is page definition:
And then page itself:
Remember both paths, you will need them for the next step.
4. WLST Script for MDS Management
In previous step, we have identified two MDS documents to be deleted. Will run WLST command - deleteMetadata, to delete them. Need to provide three parameters - application name, server and document to be deleted names:
Make sure you delete both documents related to user john:
MDS repository was cleaned up, now application should work for user john as well. Of course all user john personalizations are lost, but at least we didn't lost every user personalizations:
In my next post, I will describe how you can use MDS labels to revert your MDS repository in case of global system failure.
As a sample application for this post, I will use one application from my OOW'10 session - MDSManagement.zip. This sample contains WebCenter 11g application and two separate applications with ADF Regions, these regions are consumed from WebCenter 11g Composer component.
I'm deploying sample application on standalone WebLogic server, with WebCenter framework libraries installed. Also I have created my own MDS repository in database - mds-customapp. I'm using this repository for current blog post article:
First I will test WebCenter personalization scenario and login into application as user john:
You can use WebCenter Composer to add one of available custom ADF Task Flows - Employees Graph:
Graph is rendered fine, personalization information is stored in MDS repository:
Let's do MDS test now - I will refactor Employees Graph ADF Task Flow path and redeploy the same application. This should break my application for user john personalizations. It will happen, because MDS will store old ADF Task Flow path and will fail to load it from refactored application - we will see it now. This is valid real life scenario, it might happen that we will need to do refactoring for custom ADF Task Flow:
We can refactor it into another folder and redeploy application:
Now when we try to open redeployed application for user john, it breaks and generates exception - funny one (its because this user have personalized refactored ADF Task Flow):
I'm sure you saw this exception while developing applications with WebCenter Composer - oracle.adf.share.exceptionViewScopeException. This exception may happen, if MDS repository metadata is out of synch with application structure, its what happened in my example.
Now we need to open Oracle Enterprise Manager and navigate to MDS repository screen for our sample application:
The main goal is not to break personalizations of other users, so we don't want to clear entire MDS repository, but we want only to remove corrupted personalizations of user john. Because we don't have MDS browser/editor, its a bit complicated, but still possible. I will describe MDS repository recovery for specific user through series of steps:
1. MDS export
We need to know MDS repository structure, in order to know it - we need to export MDS repository and browse it folder structure. Export MDS repository into archive file:
Export is done successfully - 3 documents were exported:
2. MDS Labels
It is a good practice to create MDS label. This will allow us to revert MDS repository in the future, if there will be a need. However, it reverts complete repository for every user, so its not really useful in practice, when multiple users have different personalizations - these personalizations will be lost. Anyway, its a good practice to create MDS repository back up, before changing it - let's do it.
You should open Runtime MDS Browser (its not really a browser, just set of MDS commands, we can't see real MDS repository structure):
Go to Operations tab and select createMetadataLabel command:
Provide meaningful name and create MDS label:
You can invoke listMetadataLabels command to see all labels available:
List of labels we could revert in the future:
3. MDS repository structure
We don't want to revert our MDS repository blindly to initial MDS label and loose all users personalizations. We want only to clean broken personalization for one user - john. So, we need to know what MDS documents we should delete. Because there is no MDS browser, we need to check this manually through exported MDS folder structure. There are two places available with user john personalizations. First one is page definition:
And then page itself:
Remember both paths, you will need them for the next step.
4. WLST Script for MDS Management
In previous step, we have identified two MDS documents to be deleted. Will run WLST command - deleteMetadata, to delete them. Need to provide three parameters - application name, server and document to be deleted names:
Make sure you delete both documents related to user john:
MDS repository was cleaned up, now application should work for user john as well. Of course all user john personalizations are lost, but at least we didn't lost every user personalizations:
In my next post, I will describe how you can use MDS labels to revert your MDS repository in case of global system failure.
Wednesday, September 22, 2010
Red Samurai Oracle Awards 2010
Today was exceptional day ! Red Samurai got three Oracle awards in one single day:
1. Oracle Fusion Middleware Innovation Award Winner 2010
For successful Oracle ADF 11g and Oracle WebCenter 11g implementation in Texas A&M University. And for innovative blogging approach started 5 years ago - technical blogs with sample applications !
2. SOA Partner Community for Outstanding Contribution across the World 2010
For projects delivered in USA, Africa, Middle East and Europe - SOA Partner Community Awards 2010.
3. 2010 Enterprise 2.0 Blazer: Enterprise 2.0 Leader Award
More pictures will come next week, after busy OOW 2010.
1. Oracle Fusion Middleware Innovation Award Winner 2010
For successful Oracle ADF 11g and Oracle WebCenter 11g implementation in Texas A&M University. And for innovative blogging approach started 5 years ago - technical blogs with sample applications !
2. SOA Partner Community for Outstanding Contribution across the World 2010
For projects delivered in USA, Africa, Middle East and Europe - SOA Partner Community Awards 2010.
3. 2010 Enterprise 2.0 Blazer: Enterprise 2.0 Leader Award
More pictures will come next week, after busy OOW 2010.
Wednesday, September 15, 2010
On My Way to San Francisco Oracle Open World 2010
I was busy with preparations for Oracle Open World 2010 session - Developing Large Oracle Application Development Framework 11g Applications. I want to introduce session flow and topics I will talk/demo about.
First part of this session will be dedicated to production project with ADF 11g deployment. I will connect through VPN and show how cool ADF 11g production application works and looks !
I will talk about ADF 11g architecture and implementation best and bad practices.
Third and main part will be focused on technical samples and examples. Will be explained how to control Passivation/Activation life cycle in ADF BC through Application Module Pools:
You will see how to avoid NullPointer exceptions like this one:
Then I will move to database connection pool management and related ADF BC properties explanation:
It will be explained how to develop applications with reusable libraries and dynamic regions, for both - Model and ViewController layers:
Reusable libraries developed for OOW'10 session - Common ADF BC, Reusable JSF Toolbar, Two Custom Applications with ADF Regions:
One of the ADF Regions:
I will tell you tips and tricks related to ADF Regions and will explain how its better to implement Web 2.0 portal type applications.
Next demo will be for Dynamic Dashboard application - frequently used pattern in Web 2.0 portals:
You will learn how to catch exceptions effectively, when using Oracle UI Shell template:
Finally it will be demonstrated how ADF Contextual Events Framework can be used in combination with Oracle WebCenter to provide communication between two independent regions:
Regions will be added through Oracle WebCenter Composer, personalization and customization will be explained:
Special thanks and credit goes to my colleagues in Germany, with whom I had pleasure to work on ADF/BPM/WebCenter coaching recently - lots of great ideas came from there !
See you very soon in San Francisco !
First part of this session will be dedicated to production project with ADF 11g deployment. I will connect through VPN and show how cool ADF 11g production application works and looks !
I will talk about ADF 11g architecture and implementation best and bad practices.
Third and main part will be focused on technical samples and examples. Will be explained how to control Passivation/Activation life cycle in ADF BC through Application Module Pools:
You will see how to avoid NullPointer exceptions like this one:
Then I will move to database connection pool management and related ADF BC properties explanation:
It will be explained how to develop applications with reusable libraries and dynamic regions, for both - Model and ViewController layers:
Reusable libraries developed for OOW'10 session - Common ADF BC, Reusable JSF Toolbar, Two Custom Applications with ADF Regions:
One of the ADF Regions:
I will tell you tips and tricks related to ADF Regions and will explain how its better to implement Web 2.0 portal type applications.
Next demo will be for Dynamic Dashboard application - frequently used pattern in Web 2.0 portals:
You will learn how to catch exceptions effectively, when using Oracle UI Shell template:
Finally it will be demonstrated how ADF Contextual Events Framework can be used in combination with Oracle WebCenter to provide communication between two independent regions:
Regions will be added through Oracle WebCenter Composer, personalization and customization will be explained:
Special thanks and credit goes to my colleagues in Germany, with whom I had pleasure to work on ADF/BPM/WebCenter coaching recently - lots of great ideas came from there !
See you very soon in San Francisco !
Tuesday, September 14, 2010
Quick Start Guide to Oracle Fusion Development - Review Process
Today I have received my review copy of Grant Ronald's book - Quick Start Guide to Oracle Fusion Development:
Review process have started, expect my detailed feedback during coming weeks :)
Review process have started, expect my detailed feedback during coming weeks :)
Friday, September 3, 2010
WebCenter Composer and Resource Catalog with Multiple ADF Task Flows
I have described, what should be done in order to include custom ADF Task Flow into WebCenter Composer, check previous blog post - How To Include Custom ADF Task Flow Into WebCenter Composer Catalog. Today I will go one step forward and tell you how to use multiple ADF Task Flows within WebCenter Composer instance. Generally it all works by default, but there is one tricky thing you may face and then you will think it doesn't work. It works, let me introduce problem and solution.
Lesson learned - make sure Application Module names are unique, don't blame WebCenter Composer :)
Today post is based on sample application - webcentercomposer.zip. This example contains two separate applications with custom ADF Task Flows and one main application with WebCenter Composer.
We can see three ADF Task Flows are available from Resource Catalog. Let's add Employee Search first, all works well so far:
Next we add Quick Employee Search - still all is fine:
Its turn to add the last one available - Departments and Employees. Oops - we get error now:
Two from three were added successfully and we failed on last one. What should be the reason? Let's check application log:
It says that View Object wasn't found. Well, obviously View Object is available, its something else here. In 9 from 10 cases of such strange errors, its something with naming conventions. Before checking how naming conventions are implemented, let's clean my customizations and reset page to initial state - press Reset Page button in WebCenter Composer:
Page should be reset:
Let's see naming conventions now. Main application contains com.redsamurai.main root package - thats good enough:
Application with custom ADF Task Flow contains com.redsamurai.emplsearch root package - good enough as well:
Another application with custom ADF Task Flow contains com.redsamurai.masterdetail root package - also looks good:
If all looks good, where is the problem then? Actually, what I have discovered in current WebCenter release, you can't have two different Application Modules with the same name (even from different package) and use Data Control from these Application Modules in WebCenter Composer. Probably when multiple Application Modules are implemented in the same application, you always give different names. But in case of separate applications, it can happen that different teams will pick up same name, even accidentally or may be not. Then you will get into trouble.
Now we will do a bit of refactoring - will rename Application Module and give unique name:
I work now on MasterDetailApp, will give MasterDetailModule name:
Ahhh..., refactoring for some reason is not working - I can't rename Application Module, it gives error:
Okej, not a big deal - will be fixed in next release of JDeveloper 11g. We can work around this and run Replace All in Files wizard to rename Application Module:
Now we have it renamed to MasterDetailModule (make sure you rename Application Module usages in ViewController project as well):
Repeat same thing in EmplSearchApp, rename Application Module to EmplSearchModule:
Don't forget to redeploy both applications and generate ADF Libraries.
When Application Modules have unique names, all works well - all three ADF Task Flows can be added dynamically from WebCenter Composer Resource Catalog:
User can customize and personalize (read more about this - Applying Personalization and Customization in Oracle ADF 11g and Oracle WebCenter 11g) his page and navigate through Employees lists:
All three ADF Task Flows are available:
Lesson learned - make sure Application Module names are unique, don't blame WebCenter Composer :)