Friday, September 28, 2012

My Oracle OpenWorld 2012 Sessions

Oracle OpenWorld 2012 is about to start - very exciting. I would like to share info about sessions I will be speaking on this year. I have finalized technical content for both sessions, all technical demo applications are ready to rock.

1. CON2787 - Oracle Business Process Management/Oracle ADF Integration Best Practices
    Tuesday, Oct 2, 10:15 AM - 11:15 AM - Marriott Marquis - Golden Gate C3

Integration points for ADF/BPM will be presented in this session. You will see a technical demo about how to customize standard Oracle BPM Worklist Task Flow using MDS Seeded Customization. I will present approach to create lightweight ADF UI to display information from Oracle BPM engine using BPM Java API. Generic Task Handler technical prototype will be explained.

My colleague - Danilo Schmiedel will be speaking on this session, he will present BPM best practices.

2. CON2785 - Oracle ADF Implementations Around the Globe: Best Practices
    Wednesday, Oct 3, 3:30 PM - 4:30 PM - Marriott Marquis - Golden Gate C2

I have finalized technical content for this session, agenda:

a. ADF Global Adoption - compare ADF development trends around the globe

b. Customer demo

c. How to Avoid ADF Pitfalls - Red Samurai ADF Performance Monitoring Tool Demo

d. ADF Project Development Time - Explain How to Estimate ADF Development Time

e. ADF Best Practices:

  • Dynamic ADF BC and ADF UI - explain how to generate ADF BC and ADF UI on runtime, to  minimize development time
  • Sharing Session Data in ADF BC

  • ADF Database Connections Usage Tuning

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 - This application contains two JDeveloper 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.

Monday, September 24, 2012

ADF EMG Sunday on OOW 12

Preparing my schedule for OOW. Lots of ADF technical content this year, also very strong focus on ADF Mobile - I feel it will be very interesting conference with lots of networking and chatting about ADF.

On Sunday I'm planning to attend ADF EMG sessions and meet friends and fellow ADF developers:

1. UGF3783 - Oracle ADF Immersion: How an Oracle Forms Developer Immersed Himself in the Oracle ADF World - 9am-10am Moscone South room 305

2. UGF4945 - Deploy with Joy: Using Hudson to Build and Deploy Your Oracle ADF Applications - 10:15am-11:15am Moscone South room 305

3. UGF10463 - A Peek into the Oracle ADF Architecture of Oracle Fusion Applications - 11:30am-12:30am Moscone South room 305

4. UGF10464 - Oracle Fusion Middleware Live Application Development Demo - 12:45-3:45pm Moscone South room 305

See you on ADF EMG Sunday.

Friday, September 21, 2012

ADF Create and CreateInsert Operations for ADF Table

I bet every ADF developer was wondering in his life at least once - what operation to use to insert new row into ADF table - Create or CreateInsert. This one is a must question from developer who starts ADF development. Answer - use CreateInsert operation to insert new rows into ADF table or form. Create operation works with form component only. However, this is not so obvious - I saw such situations when developers where stuck for some time, because they were unable to implement new row insertion (just because of using Create, instead of CreateInsert). It looks like CreateInsert operation calls additional functionality to push newly created record and really display it in ADF table just after operation is completed. But Create operation is missing that part. I will describe in this post with example.

Download test case application - Test case contains simple page, both operations Create and CreateInsert are implemented directly from Data Control:

There is only one page, where I have both ADF form and table. Same Create and CreateInsert operations are applied for both blocks:

Operations are defined in Page Definition file:

Firstly we test Create operation - press Create button for the table:

There is no new row rendered in the table, but new row was inserted only into form component - this is a problem most of new ADF developers are facing. User gets confused - press second time on Create and ADF will show validation errors for missing required fields in the form:

CreateInsert operation behaves much better - press CreateInsert button and you will see new blank row inserted into ADF table. User is ready to type data and commit it. Also new row was inserted into form component - this means CreateInsert works for form and table:

Saturday, September 15, 2012

Enabling WebLogic Administrator Group Inside Custom ADF Application

When building custom ADF applications, where special system access is required - application configuration, monitoring and etc. screens - we want to grant access only to the system administrator. Often to the same administrator, who can access and manage WebLogic instance, typically - weblogic user from Administrators group. This user belongs to Administrators group defined in WebLogic domain by default. I will describe in this post, how to configure this group (same method can be applied for other default groups from WebLogic) with ADF Security for custom ADF application.

Download working sample application with restricted access only for WebLogic administrators -

Firstly this sample defines typical Application Role in ADF Security store - RedSamuraiAdmin:

This role is custom one, we will map it with Administrators role from WebLogic.

Now is the main trick - we can't map our custom RedSamuraiAdmin Application Role with system Administrators role from WebLogic using jazn-data.xml wizard. We can do it manually in jazn-data.xml source directly. When Enterprise Role is mapped with Application Role through the wizard, one security class is assigned:

But Administrators group from WebLogic belongs to different security class:

This means we need to fix correct class name manually in the source of jazn-data.xml:

Once correct role mapping is fixed, we can assign security permission to protected resource in ADF application, main page in this case (main page is granted view access for RedSamuraiAdmin role, this role in turn is mapped with WebLogic Administrators group):

You can test provided sample application with WebLogic admin user:

Protected page will be accessed:

You will receive error, if will test with default security class assigned by the wizard:

Thursday, September 13, 2012

Next Week - ADF Best Practices ODTUG Webinar

I have finished preparation for my ODTUG webinar next week - ADF Best Practices. Webinar will be hosted as planned - next week Tuesday (September 18th). If you are not registered yet, you can complete registration form here for this free webinar - ADF Best Practices, Andrejus Baranovskis, Red Samurai Consulting.

This webinar will cover advanced ADF areas, agenda will be pretty packed. Mainly I will focus around these 7 topics (some of them I may skip, depending on available time) - typical bugs, fixes, workarounds and best practices:

1. Resolving ADF BC Library imports

2. Master-detail performance improvements

3. Session scope access from ADF BC

4. LOV performance improvements

5. Table loading performance

6. Login and ADF security implementation

7. ADF BC activation/passivation and stress testing

Read more about this webinar from here.

Sunday, September 9, 2012

What To Do When ADF Editable Table Misbehaves

You know sometimes its a challenge to get correct behavior for ADF editable table - meaning, to have it as much as possible aligned with smooth user experiences. One of the challenges to control when validation rules are fired - often validation is fired too early or too often (same validation error messages are repeated multiple times). In some cases this can be resolved by setting Change Event Policy = None on iterator (default is Auto PPR), but still this doesn't cover all scenarios. There is special case when ADF editable table is set to support multi-selection. With multi-selection enabled, even setting Change Event Policy to None doesn't help - validation is still fired too early. But there is solution - set Immediate property to True for ADF editable table component - this will allow to skip annoying validation messages when editing data. Validation failure messages will show up on transaction commit - invalid fields will be highlighted in red.

Download test case application, where Immediate property is set to True -

Sample application is tested firstly with default settings for ADF editable table component and multi-selection feature enabled. User creates new row:

As soon as new row is inserted, all values are blank and user needs to type something. User moves mouse cursos to any of the fields from new row - immediately validation fires without reason for empty required fields (this is way too early - user was about to type something, ADF throws validation error in advance):

Switch validation control for editable ADF table by setting Immediate = True:

New row creation behavior is different now - blank row is inserted, and user can start typing data without getting annoying validation error failure message:

Validation is invoked later, when transaction is about to be completed - validation failures are highlighted for each of the attributes:

Thursday, September 6, 2012

Important Hint for ADF BC Check Box Implementation

Sometimes it can be a bit frustrating - small fix can resolve serios problem. I would like to describe example of such small fix - making check-box functionality work in ADF. This topic is related to - custom check box, based on Y/N or 0/1 values. Null value was stored for the checkbox, no matter it was checked or unchecked.

Download fixed sample application - Sample is based on modified Regions table from HR schema - APPROVE column is added with Y/N values:

Initially I was facing such issue, check box value was set:

Transaction was sending NULL value for the check box field to DB:

Eventually this was resolved by spotting "Include 'No Selection' Item" was selected for the choice list defined on check box attribute. Don't ask me, why we need to define choice list for the check box field - its weird, but it works. The thing is with "Include 'No Selection' Item" selected, ADF injects blank value into check box definition and even visually it looks all correct - it fails to work from ADF UI (it works from ADF BC test utility):

Make sure to uncheck "Include 'No Selection' Item", when implementing custom check box:

Test check box implementation again:

It works now like a charm, correct value is updated in DB: