Oracle case study for Red Samurai Consulting was published and available on Oracle OTN site for JDeveloper/ADF 11g:
Oracle ADF maps to Oracle Forms concepts in numerous instances including declarative validation, declarative list-of-values, built in events, and SQL Queries to name a few, thus, providing Oracle Forms developers with a clear path to migrate their skills to a JEE Framework. This makes Oracle ADF the natural choice for our customers when redeveloping their Forms applications.
Monday, January 17, 2011
Red Samurai Consulting Oracle Case Study
Labels:
ADF,
Case Study,
JDeveloper 11g,
Red Samurai
Sunday, January 16, 2011
WebCenter PS3 JDeveloper Extensions Available
I was searching Oracle OTN and WebCenter home page, didn't found any information about WebCenter PS3 available. Accidentally I saw there are WebCenter PS3 extensions available from JDeveloper PS3 updates screen for Oracle Fusion Middleware Products:
Download WebCenter PS3 extensions for JDeveloper:
WebCenter PS3 provides lots of new exciting features. In my future post I will describe various solutions applied for WebCenter PS3 Portal Framework, Menu Model, Task Flows customizations, etc. Exciting time ! :)
Download WebCenter PS3 extensions for JDeveloper:
WebCenter PS3 provides lots of new exciting features. In my future post I will describe various solutions applied for WebCenter PS3 Portal Framework, Menu Model, Task Flows customizations, etc. Exciting time ! :)
Labels:
ADF,
JDeveloper 11g,
WebCenter
OptUpdate Locking Mode in ADF 11g PS3 and Centralized ADF BC Config
Hey, exciting news - JDeveloper 11g PS3, SOA 11g PS3 and WebLogic 11g PS3 are available. But there are no WebCenter 11g PS3 yet, Ok - we can wait (we expect really good quality release). Download new JDeveloper 11g PS3 - download page. I didn't see anywhere separate download of ADF 11g PS3 runtime for standalone WebLogic deployment, but you can use the same JDeveloper 11g PS3 install wizard for this purpose. In order to get up to speed with new features of ADF 11g PS3, I recommend to read What's New sections from available developer guides - ADF Developer Guide and ADF Web Developer Guide. There are many new interesting features, one of them - additional locking mode (Optupdate). This locking mode works without executing database lock on data change. Previous ADF 11g releases were working with two locking modes - Pessimistic and Optimistic.
Download sample application - OptUpdateADF.zip.
Some of the ADF Business Components configuration settings can be set now from one central place - adf-config.xml file. Before researching new Optupdate locking, let's look into behavior without any locking mode at all. Locking mode - None:
One user is editing FirstName field - saving change:
Update and Commit are done without any locking:
There is another user, who is editing the same record at the same time - changing and saving LastName field:
Even the same record was modified by another user - we still can commit without any warning:
We can change and update even the same field, previously modified by another user - FirstName:
There will be no errors, data will be updated and saved successfully:
Now we change Locking Mode to Optupdate, new Locking Mode available in PS3:
Let's change FirstName field and save:
Data was saved without executing lock, similar as with no locking mode:
Second user work with the same record, updates and saves LastName field:
RowNoFound exception is generated:
ADF reports error about not found row:
In case of Pessimistic or Optimistic lockings, user would be informed about data changed by another user. In this case, user will be forced to refresh VO data, for example by clicking Undo button. It seems like Optupdate locking mode is useful, when there is no concurrency and mostly only single user is doing updates. However, we still want to prevent possible concurrency cases from simultaneous updates (as it happens in no locking mode).
Press Undo button to refresh VO with latest data:
Now this user can change and save data as well:
Let's test how it works when validation error happens. One user is changing foreign key value and gets validation error:
The same as with Optimistic locking, while validation error is not fixed, still other user will be able to change and save data (because lock is not set by the first user):
Download sample application - OptUpdateADF.zip.
Some of the ADF Business Components configuration settings can be set now from one central place - adf-config.xml file. Before researching new Optupdate locking, let's look into behavior without any locking mode at all. Locking mode - None:
One user is editing FirstName field - saving change:
Update and Commit are done without any locking:
There is another user, who is editing the same record at the same time - changing and saving LastName field:
Even the same record was modified by another user - we still can commit without any warning:
We can change and update even the same field, previously modified by another user - FirstName:
There will be no errors, data will be updated and saved successfully:
Now we change Locking Mode to Optupdate, new Locking Mode available in PS3:
Let's change FirstName field and save:
Data was saved without executing lock, similar as with no locking mode:
Second user work with the same record, updates and saves LastName field:
RowNoFound exception is generated:
ADF reports error about not found row:
In case of Pessimistic or Optimistic lockings, user would be informed about data changed by another user. In this case, user will be forced to refresh VO data, for example by clicking Undo button. It seems like Optupdate locking mode is useful, when there is no concurrency and mostly only single user is doing updates. However, we still want to prevent possible concurrency cases from simultaneous updates (as it happens in no locking mode).
Press Undo button to refresh VO with latest data:
Now this user can change and save data as well:
Let's test how it works when validation error happens. One user is changing foreign key value and gets validation error:
The same as with Optimistic locking, while validation error is not fixed, still other user will be able to change and save data (because lock is not set by the first user):
Labels:
ADF,
JDeveloper 11g,
Locking
Monday, January 10, 2011
SOA & E2.0 Partner Community Forum XIII - in Utrecht, The Netherlands
Thanks to Oracle SOA Community (kudos to Jürgen Kress), Oracle technology professionals can participate in SOA and E2.0 Partner Community Forum XIII. During this highly informative event you can learn about partner success stories, participate in an array of break out sessions, exchange information with other partners and enjoy a vibrant panel discussion. Additionally to the SOA and E2.0 Partner Community Forum, you can participate in technical hands on workshops on March 17th and 18th. The goal of these workshops is to prepare you for customer implementations.
I will do presentation about ADF/WebCenter/BPM 11g integration. Please register for this event and see you there in March:
I will do presentation about ADF/WebCenter/BPM 11g integration. Please register for this event and see you there in March:
Sunday, January 9, 2011
ADF 11g Performance Tuning - Select One Choice and Combo Box with List of Values
Blog reader was asking why ADF 11g page load time is slow, in case when page contains multiple heavy Select One Choice components. See comments for this post - Oracle ADF 11g Release 1 - Runtime Page Load Performance Improved !. Also, it seems like people are mixing two things together - Select One Choice and List of Values (LOV). Before JDeveloper 11g R1 (before Fusion Middleware was released), we were experiencing such issue, when List of Values query was executed, immediately on page load. Of course this was causing lots of delays, imagine to execute 20 additional SQL queries for 20 List of Values components available on the page. However, since JDeveloper 11g R1 this issue was fixed and List of Values queries are not executed anymore on page load, only on demand - when user opens LOV component. With Select One Choice is another story, this component must be populated on page load, it will execute database query to bring list data. This means for better page load time, you should use Select One Choice only for those attributes, where returned list contains only few rows. At the end, there is no point to have long Select One Choice list, it will be unusable anyway.
Based on sample application - ChoiceListLOVPerformance.zip, I will describe the difference in execution between Select One Choice and Combo Box with List of Values. All tests are done on local Oracle Enterprise Linux VM (4 GB RAM from total 8, 2 Processor Cores from total 4), all products - Oracle XE and JDeveloper 11g PS2 are installed on the same VM. Application implements Master-Detail relationship (based on standard HR schema - Departments/Employees), I will test how fast Detail screen can be opened, depending on Select One Choice or Combo Box with List of Values usage. Simple Master screen:
Detail screen contains table with two Select One Choice columns. As you can see from Firebug report, first load for this table is done in 5.17 seconds:
On page load, we can identify from the log, both Select One Choice components are generating database queries (as expected). This affects page load time, Jobs query:
Departments query:
If we reopen same screen, for the same Master record, lots of ADF scripts are cached already. Database queries for Select One Choice components are not executed from database anymore on second load, instead - information is retrieved from cache:
Load time for the same screen is 1.59 seconds now. I will move to another Master record:
Select Once Choice queries are not executed anymore, retrieved from cache - load time is quick, only 884 milliseconds:
Another Detail screen with more data is loaded in 1.55 seconds - Select One Choice data is retrieved from cache:
JobId attribute is defined now as Select One Choice:
Will change it to Combo Box with List of Values:
Will change DepartmendId as Combo Box with List of Values as well:
Both attributes are defined now as Combo Box with List of Values:
Initial load for Detail screen is done now in 3.77 seconds, this is much faster comparing to 5.17 seconds when we were using Select One Choice attributes and database queries were executed on page load:
Database query for Combo Box with List of Values will be executed on demand, when user will select new value:
Executed query, query results will be cached for future requests, this means it will not be re-executed:
For Combo Box with List of Values we can define View Criteria to filter retrieved Combo Box elements. If user wants to select other values, List of Values popup can be opened to perform search:
While Select One Choice is relatively light component, it requires database query execution on page load. You may consider using Combo Box with List of Values or just List of Values components for better page on load performance.
Based on sample application - ChoiceListLOVPerformance.zip, I will describe the difference in execution between Select One Choice and Combo Box with List of Values. All tests are done on local Oracle Enterprise Linux VM (4 GB RAM from total 8, 2 Processor Cores from total 4), all products - Oracle XE and JDeveloper 11g PS2 are installed on the same VM. Application implements Master-Detail relationship (based on standard HR schema - Departments/Employees), I will test how fast Detail screen can be opened, depending on Select One Choice or Combo Box with List of Values usage. Simple Master screen:
Detail screen contains table with two Select One Choice columns. As you can see from Firebug report, first load for this table is done in 5.17 seconds:
On page load, we can identify from the log, both Select One Choice components are generating database queries (as expected). This affects page load time, Jobs query:
Departments query:
If we reopen same screen, for the same Master record, lots of ADF scripts are cached already. Database queries for Select One Choice components are not executed from database anymore on second load, instead - information is retrieved from cache:
Load time for the same screen is 1.59 seconds now. I will move to another Master record:
Select Once Choice queries are not executed anymore, retrieved from cache - load time is quick, only 884 milliseconds:
Another Detail screen with more data is loaded in 1.55 seconds - Select One Choice data is retrieved from cache:
JobId attribute is defined now as Select One Choice:
Will change it to Combo Box with List of Values:
Will change DepartmendId as Combo Box with List of Values as well:
Both attributes are defined now as Combo Box with List of Values:
Initial load for Detail screen is done now in 3.77 seconds, this is much faster comparing to 5.17 seconds when we were using Select One Choice attributes and database queries were executed on page load:
Database query for Combo Box with List of Values will be executed on demand, when user will select new value:
Executed query, query results will be cached for future requests, this means it will not be re-executed:
For Combo Box with List of Values we can define View Criteria to filter retrieved Combo Box elements. If user wants to select other values, List of Values popup can be opened to perform search:
While Select One Choice is relatively light component, it requires database query execution on page load. You may consider using Combo Box with List of Values or just List of Values components for better page on load performance.
Labels:
ADF,
JDeveloper 11g,
Tuning
Saturday, January 8, 2011
Fusion Middleware 11g Security - Retrieve Users by Security Groups
I will describe how inside ADF 11g application you can retrieve users assigned to specific security group. My previous post provides information about Oracle OPSS API, this API is used to retrieve security information from WLS Security Provider (it can be Oracle OID or Active Directory) - Fusion Middleware 11g Security - Retrieve Security Groups from ADF 11g. Today I will use information from my previous post and will implement slightly more complex use case with the same Oracle OPSS API.
Download sample application - SecurityGroupsCustomAppRoleUsers.zip. This sample extends previous post functionality and provides list of users assigned to selected security group:
I select another security group, users table is refreshed:
Both tables are based on programmatic VO's. Security groups table row selection event is overridden and invokes Bind Variable setter method for Users VO:
Overridden table row selection method - performs row selection and calls Bind Variable setter method for Users VO:
Setter method gets currently selected security group name and sets it as Bind Variable value for Users VO:
Programmatic Users VO implements executeQueryForCollection method and checks if Bind Variable value is NULL. In case if it is NULL, first row of parent Roles programmatic VO is retrieved to initialize Bind Variable value. Bind Variable is used to filter User VO by selected security group:
Bind Variable value is stored and retrieved from User Data available in Session scope:
Generic VO implementation class contains getUsers method. This method is using Oracle OPSS API to retrieve all users for current security group:
As you can see, first we need to find RoleProfile for current security group. Then we are searching for all direct grantees and retrieving only users (another security group can be grantee as well).
Download sample application - SecurityGroupsCustomAppRoleUsers.zip. This sample extends previous post functionality and provides list of users assigned to selected security group:
I select another security group, users table is refreshed:
Both tables are based on programmatic VO's. Security groups table row selection event is overridden and invokes Bind Variable setter method for Users VO:
Overridden table row selection method - performs row selection and calls Bind Variable setter method for Users VO:
Setter method gets currently selected security group name and sets it as Bind Variable value for Users VO:
Programmatic Users VO implements executeQueryForCollection method and checks if Bind Variable value is NULL. In case if it is NULL, first row of parent Roles programmatic VO is retrieved to initialize Bind Variable value. Bind Variable is used to filter User VO by selected security group:
Bind Variable value is stored and retrieved from User Data available in Session scope:
Generic VO implementation class contains getUsers method. This method is using Oracle OPSS API to retrieve all users for current security group:
As you can see, first we need to find RoleProfile for current security group. Then we are searching for all direct grantees and retrieving only users (another security group can be grantee as well).
Labels:
ADF,
JDeveloper 11g,
Security
Monday, January 3, 2011
Fusion Middleware 11g Security - Retrieve Security Groups from ADF 11g
What to do, when you need to access security information directly from ADF 11g application. If there is a requirement to retrieve security groups or system users from WebLogic Security Provider. Every production system is using some kind of LDAP product to store security groups and system users. From what I saw, in the most of the cases, customers are using Active Directory. WebLogic server is configured with Security Provider to point and consume Active Directory connection, deployed ADF application automatically authenticates against configured Security Provider on WebLogic server. Instead of connecting to LDAP server directly, we can use Oracle Platform Security (OPSS) API and retrieve Security Provider information directly through ADF Security connection.
Please read Oracle Fusion Middleware Security blog, in order to get fundamental information about Oracle OPSS - OPSS Sample Application. I did one step forward and explained how you can use Oracle OPSS API inside ADF BC and implement functional requirement to bring security groups. Download sample application - SecurityGroupsCustomApp.zip. My next blog post will explain how to bring system users for selected security group.
Sample application implements Oracle OPSS API logic inside Model project, this allows to build programmatic VO and isolate complex Oracle OPSS logic from ViewController. I have created VO implementation extension IdentityStoreAccess class, this contains Oracle OPSS API methods to connect and retrieve security groups from WebLogic Security Provider:
All complex Oracle OPSS API logic is isolated inside Model project, this allows to expose it to ViewController through standard Data Control, based on programmatic VO:
VO implementation extension class - IdentityStoreAccess, contains method to retrieve role(-s) by specified pattern using Oracle OPSS API. If pattern is specified as wildcard, all available security groups will be retrieved:
This method is using Oracle OPSS SimpleSearchFiler class with ROLE_NAME SearchParameter object.
IdentityStoreAccess class is defined to override base implementation class of programmatic VO:
RolesView programmatic VO is constructed based on security groups collection retrieved from configured WebLogic Security Provider. Connection with WebLogic Security Provider is established through ADF Security connection:
RolesView VO row is populated programmatically, from security groups collection:
When RolesView VO is being initialized, instead of constructing SQL query, overridden executeQueryForCollection method is retrieving information from WebLogic Security Provider. This information is being used to populate programmatic VO:
Programmatic VO is included into AM and allows to consume alternative data source through standard Data Control, there is no difference in ViewController:
ADF Faces table component brings security groups defined inside WebLogic Default Authenticator Provider (for test purpose only). It will retrieve security groups from LDAP exactly in the same way, without any changes for ADF application:
Nice out of the box features provided by ADF Faces table component - filtering and sorting, can be applied for programmatic VO as well:
The same security groups are defined be WebLogic Security Provider:
Default Authenticator in this example is the only one available Security Provider. You can define LDAP connection, security groups will be retrieved as well:
Please read Oracle Fusion Middleware Security blog, in order to get fundamental information about Oracle OPSS - OPSS Sample Application. I did one step forward and explained how you can use Oracle OPSS API inside ADF BC and implement functional requirement to bring security groups. Download sample application - SecurityGroupsCustomApp.zip. My next blog post will explain how to bring system users for selected security group.
Sample application implements Oracle OPSS API logic inside Model project, this allows to build programmatic VO and isolate complex Oracle OPSS logic from ViewController. I have created VO implementation extension IdentityStoreAccess class, this contains Oracle OPSS API methods to connect and retrieve security groups from WebLogic Security Provider:
All complex Oracle OPSS API logic is isolated inside Model project, this allows to expose it to ViewController through standard Data Control, based on programmatic VO:
VO implementation extension class - IdentityStoreAccess, contains method to retrieve role(-s) by specified pattern using Oracle OPSS API. If pattern is specified as wildcard, all available security groups will be retrieved:
This method is using Oracle OPSS SimpleSearchFiler class with ROLE_NAME SearchParameter object.
IdentityStoreAccess class is defined to override base implementation class of programmatic VO:
RolesView programmatic VO is constructed based on security groups collection retrieved from configured WebLogic Security Provider. Connection with WebLogic Security Provider is established through ADF Security connection:
RolesView VO row is populated programmatically, from security groups collection:
When RolesView VO is being initialized, instead of constructing SQL query, overridden executeQueryForCollection method is retrieving information from WebLogic Security Provider. This information is being used to populate programmatic VO:
Programmatic VO is included into AM and allows to consume alternative data source through standard Data Control, there is no difference in ViewController:
ADF Faces table component brings security groups defined inside WebLogic Default Authenticator Provider (for test purpose only). It will retrieve security groups from LDAP exactly in the same way, without any changes for ADF application:
Nice out of the box features provided by ADF Faces table component - filtering and sorting, can be applied for programmatic VO as well:
The same security groups are defined be WebLogic Security Provider:
Default Authenticator in this example is the only one available Security Provider. You can define LDAP connection, security groups will be retrieved as well:
Labels:
ADF,
JDeveloper 11g,
Security
Subscribe to:
Posts (Atom)























































