Tuesday 23 December 2008

1% more productive than 2007

In a slightly odd fashion, this is my 101st post for 2008, exactly 1 more post than the total for 2007. That makes me exactly 1% more productive than last year.  Whoo-boy, it's been hard work ;-)

In 2008 the top 5 pages from my blog:
The 1st post hit just under 4800 unique page views in 2008.

What's overly disturbing is only 1 post out of 5 was written in 2008, the rest 2007. So 1% more productive, but 100 posts of pure dribble.  Oh well, it could be obviously worse by 1.

The top 5 posts for 2008 (excluding 2007 content):
The OID post hit 1700 unique page views, written in January.

Of the above list the stand out post is the JAX-WS page, it has leaped up the ranks with just over 1000 unique page views, and I only wrote it in November.

I'd like to say I'm busy writing 2009 content, but in reality, I'm sitting here with a beer and other somewhat Christmas priorities on my mind.

I'd like to wish all readers and your family and friends a safe and happy Christmas and New Years, and I look forward to doing, um, something with the blog, in 2009!

Thursday 18 December 2008

Configuring WLS With MS Active Directory

Following are my notes on configuring Oracle's WebLogic Server 10.3 to use an Microsoft Active Directory server for authentication. Usual disclaimer: your mileage may vary.

For a good starting point as comparison of what options to configure, see the following blogs that consider configuration of WLS for OID or openLDAP:

Frank Nimphius's How-to configure OID for authentication in WebLogic Server
Edwin Biemond's Using OpenLDAP as security provider in WebLogic

Steps

In the WLS console select Security Realms under the Domain Structure, then myrealm, followed by the Providers tab, then Authentication tab.

Select New. In the Create a New Authentication Provider page, enter a name and select ActiveDirectoryAuthenticator from the drop down, then Ok.

Select your new Authenticator, then the Configuration tab -> Provider Specific tab.

Enter the following values:
  • [default] Keep Alive Enabled: disabled
  • User Name Attribute: sAMAccountName
  • Principal: distinguished Name (DN) of the Active Directory LDAP user ie. DN=LdapAdmin,OU=Users,DC=sagecomputing,DC=com,DC=au
  • Host: your hostname
  • [default] All Users Filter: null
  • [default] Users Search Scope: subtree
  • [default] All Groups Filter: null
  • [default] Static Member DN Attribute: member
  • [default] Group From Name Filter: (&(cn=%g)(objectclass=group))
  • [default] Bind Anonymously on Referrals: disabled
  • [default] Static Group DNs from Member DN Filter: (&(member=%M)(objectclass=group))
  • [default] Results Time Limit: 0
  • Credential: ldap user password (as per that of the principal above)
  • Confirm Credential: ldap user password (as per that of the principal above)
  • [default] Group Search Scope: subtree
  • [default] Cache Size: 32
  • User From Name Filter: (&(sAMAccountName=%u)(objectclass=user))
  • [default] Dynamic Member URL Attribute: null
  • [default] Connection Retry Limit: 1
  • [default] Connect Timeout: 0
  • [default] User Dynamic Group DN Attribute: null
  • [default] Static Group Name Attribute: cn
  • User Base DN: OU=Users,DC=sagecomputing,DC=com,DC=au
  • [default] Use Token Groups For Group Membership Lookup: disabled
  • [default] Port: 389
  • [default] Follow Referrals: enabled
  • [default] Propagate Cause For Login Exception: disabled
  • [default] User Object Class: user
  • [default] Cache TTL: 60
  • Use Retrieved User Name as Principal: enabled
  • [default] Dynamic Group Object Class: null
  • [default] SSL Enabled: disabled
  • Group Base DN: OU=Groups,DC=sagecomputing,DC=com,DC=au
  • [default] Cache Enabled: enabled
  • [default] Parallel Connect Delay: 0
  • [default] Ignore Duplicate Membership: 0
  • [default] Static Group Object Class: group
  • [default] Group Membership Searching: unlimited
  • [default] Max Group Membership Search Level: 0
You'll need to change the non-default values to suit your environment.

Ensure to restart WLS.

If you reselect the myrealm with the WLS console, under the Users & Groups tab, Users you should see a list of users derived from the Active Directory server, and under the Gorups tab a set of groups derived from the Active Directory server.

Finally return to the WLS console and select the new authenticator provider, and on Configuration tab and Common tab change the Control Flag poplist to Sufficient.

Tuesday 16 December 2008

JDev 11g new feature: search managed libraries

Ever wanted to know which JDeveloper managed library a particular class is available in?

JDeveloper 11g's Manage Libraries dialog (available from Tools submenu->Manage Libraries) now includes a search dialog to allow you to do just this:


By clicking on the binoculars list, you can also change the search option to search for Jar names, Library name as well as the default Class name.

Friday 12 December 2008

ADF Development Essentials by John Stegeman

In the past it could be said that JDeveloper and ADF hadn't any market penetration because all the available online articles and posts just talked about building applications, with no real consideration of best practices or production deployment considerations.

Over the last year I've noted that this generalisation is no longer true, with a series of excellent articles and posts coming out, such as Simon Haslam's I mentioned in a previous post, and now a new series by John Stegeman.

John Stegeman's ADF Development Essentials series is available from OTN. John's series of articles currently includes practical examples of working with Subversion version control software within JDeveloper, but more importantly how to effectively use it in a team environment and gotchas teams should watch out for. In addition the upcoming parts of the same series will include information on Ant scripting, Unit Testing and Continuous Integration Builds.

The articles are well worth the read for anybody serious about working with ADF applications in a production environment and understand what's involved in serious ADF development. As I've said on the ADF Methodology group before, adopting ADF is just not about building ADF applications, but changing your technical and business environment to improve your software delivery process.

Thursday 11 December 2008

Practical ADF Deployment for Fusion Middleware Admins

Simon Haslam at Veriton has kindly referred me to his UKOUG presentation and ODTUG paper on "Practical ADF Application Deployment for Fusion Middleware Administrators".

Both are well worth the read for anybody looking to finally deploy their JDeveloper ADF application and wants an understanding of best practices and architecture:

ODTUG paper:
http://www.veriton.co.uk/download/Practical_ADF_Application_Deployment.pdf
UKOUG presentation: http://www.veriton.co.uk/download/UKOUG2008_ADF_Admin.pdf

Friday 28 November 2008

JDev11g new feature: Effective Dated Entity Objects

Many data models have the concept of effective dates where each row includes effective_from and effective_to dates. For example an employee's wage may very over time, so we store multiple records each with an effective date range with no overlaps in time (unless we want to pay our employees double of course). Within the database we could store this in a separate table to the employees table, tracking the employees changing wages to a specific time period:

CREATE TABLE emp_wages
(wage_id NUMBER(10) PRIMARY KEY
,emp_id NUMBER(10) CONSTRAINT emp_wages_fk REFERENCES employees(emp_id)
,eff_from DATE NOT NULL
,eff_to DATE
,wage NUMBER(10));

INSERT INTO emp_wages
VALUES (1, 1000, '19/OCT/2005','01/MAR/2007', 50000);

INSERT INTO emp_wages
VALUES (2, 1000, '01/MAR/2007','01/JUN/2007', 60000);

INSERT INTO emp_wages
VALUES (3, 1000, '01/JUN/2007', NULL, 70000);


A potential query based on this data is what was the employee's wages 1st April 2007 with the desired result being record 2.

With JDeveloper 10g a potential solution to this using ADF Business Components was to deliver a default EO/VO based on emp_wages, and within the VO add a bind variable and modify the query such that the data could be queried at a certain date.

JDeveloper 11g introduces the concept of Effective Dated Entity Objects which effectively (no pun intended) does this for you based on property settings. You can find documentation on this within the JDev 11g Fusion Guide under section 4.2.8 and section 5.4.

To turn this facility on do the following in your EO:
  • In your EO identify your eff_from attribute. In the Edit Attribute dialog select the Effective Date checkbox followed by the Start radio button.
  • Ditto for the eff_to attribute, except select the End radio button.
  • With the EO document window open, select the General tab, then within the Property Inspector under the Type category, and change the Effective Date Type property = EffectiveDated.
  • Return to the EO document window, under the Attribute tab you'll see a new transient attribute column SysEffectiveDate.
You next need to turn the facility on for the specific VO you want to support this functionality:
  • Open the VO document window.
  • With the General tab selected, in the Property Inspector set the Effective Dated field = True.
  • You'll note within the VO document window Attribute tab, the EO attribute transient attribute SysEffectiveDate.
On running the Business Component Browser and opening the specific VO you'll be prompted to enter a date for SysEffectiveDate. On entering a valid date (eg. 2007-04-01).....


....the records returned in the result set are filtered to this specific date:


If you don't enter a date for the bind variable, the current date is taken as default.

Returning back to the EO Effective Date Type property, you will have noted in the Edit Property dialog you had the option of selecting either EffectiveDated or Dated. The difference in functionality is best explained by the queries ADF BC undertakes on your behalf:

EffectiveDated query:

SELECT emp_wages.wage_id
,emp_wages.emp_id
,emp_wages.eff_from
,emp_wages.eff_to
,emp_wages.wage
FROM emp_wages emp_wages
WHERE (:Bind_SysEffectiveDate
BETWEEN emp_wages.eff_from
AND emp_wages.eff_to)


Dated query:

SELECT emp_wages.wage_id
,emp_wages.emp_id
,emp_wages.eff_from
,emp_wages.eff_to
,emp_wages.wage
FROM emp_wages emp_wages
WHERE (:Bind_SysEffectiveDate
BETWEEN emp_wages.eff_from
AND COALESCE(emp_wages.eff_to, TO_DATE('12/31/4712', 'MM/DD/RRRR')))

Monday 17 November 2008

Creating JAX-WS web services via a WSDL in JDev 11g

I'm currently working with JDeveloper 11g's facilities for generating JAX-WS Java web services from a defined WSDL file. The following encompasses my notes on getting this running which may be useful to readers. Your mileage may vary.

Goal

Define a single web service operation using JAX-WS, to lodge a data payload with 2 fields and return a data payload of 3 fields. The incoming and outgoing payloads will be based on an XML Schema document. The web service operation JAX-WS Java code will be defined via first defining the WSDL in JDeveloper, then generating the JAX-WS wrappers based on the WSDL.

Steps

The steps we'll undertake in achieving our goal:

1) Setup an Application Workspace and Project
2) Create the XML Schema for the Web Service
3) Create the WSDL file for our Web Service
4) Generate the JAX-WS classes for our Web Service
5) Deploying our Web Service to WLS

Setup an Application Workspace and Project

We first need a JDeveloper Application Workspace and Project to store our work.

Via the New Gallery create a new Application Workspace based on the Generic Application template.


Ensure within step 2 of 2 for the Application Workspace, for the single project the template creates, that you include Web Services as part of the Project Technologies:


Create the XML Schema for the Web Service

Our web service will be "document" based, passing XML payloads back and forwards based on an XML Schema. We need to define the XML Schema and its individual elements for both

In the new project create a XML Schema via the New Gallery -> All Technologies -> General -> XML -> XML Schema option.


Give the XML Schema a name and change the default directory to:

&<app root>/<project name>/public_html/WEB-INF


Modify the XML Schema using JDeveloper's XML Schema design facilities:


Or edit the XML code directly:

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.sagecomputing.com.au"
  elementFormDefault="qualified">
  <xsd:element name="formInput">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="inputField1" type="xsd:integer"/>
      <xsd:element name="inputField2" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="formOutput">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="outputField1" type="xsd:integer"/>
        <xsd:element name="outputField2" type="xsd:string"/>
        <xsd:element name="outputField3" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>


Create the WSDL file for our web service

The WSDL file will define the structure of our web service operation, including data payloads, for consumers of our web service to understand our web service spec, as well as allow JDeveloper to generate the JAX-WS Java code implementing our web service operation.

In our project select the New Gallery -> Current Project Technologies -> Business Tier -> Web Services -> WSDL Document:


Give the WSDL file a name, leave the other fields the default values:


JDeveloper provides a graphical design tool where you can define the parts of the WSDL file, by dragging in components from the Component Palette, or using the available Add and Delete buttons to define each part:


First thing we wish to define with the WSDL file is code to import our XML Schema from the previous step. This is easiest done by inserting the following code into your WSDL file directly between the <definitions> tags, as well as adding the XML Schema as an xmlns attribute of the overall definitions:

<?xml version="1.0" encoding="UTF-8" ?>
<definitions targetNamespace="urn:SageComputingWSDL"
  xmlns="http://schemas.xmlsoap.org/wsdl/"
  xmlns:tns="urn:SageComputingWSDL"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
  xmlns:sage="http://www.sagecomputing.com.au">
  <types>
    <xsd:schema targetNamespace="http://www.sagecomputing.com.au">
      <xsd:import namespace="http://www.sagecomputing.com.au" schemaLocation="../../lodgeForm.xsd"/>
    </xsd:schema>
  </types>
</definitions>


On returning to the WSDL designer, the Import dropdown will now include the XML Schema as an import.


Next we need to define the message payloads for the web service operation, namely both an input and output based on the XML Schema we just imported.

Expanding the Messages option within the WSDL designer and selecting the Add button, we add two messages, ie. FormInput and FormOutput.

For the FormInput, we right click on the object, select Insert inside FormInput -> part. This displays the Create Part dialog where we give the part a name of FormInput, a Reference Type of Element, and select the sage:FormInput element.


We repeat this for the FormOuput, giving the part a name of FormOutput, a Reference Type of Element and select the sage:FormOutput element. The resulting WSDL design for the messages will look like:


Next we define our Port Type supporting our web service operation. By clicking the Plus button on the Port Type option you can name the new port type, for instance: formPortType.

Next right click on the new Port Type, then the Insert inside formPortType option, followed by the Operation selection. This invokes the Create Operation dialog:


Here we define the operation name, that our operation will accept and return a payload (ie. Operation Type = Request Response), and select the Input and Output message types we defined in the earlier step.

On returning to the WSDL designer, selecting different parts of the messages and port types shows you diagrammatically the dependencies:


Next by clicking on the Add button in the Bindings we invoke the Create Binding dialog. This allows us to define the Binding is for the Port Type we just created, which version of SOAP we'll use as well as the binding name and message encoding style.


On returning to the WSDL designer we can now diagrammatically see the dependencies between the Bindings and the Port Types.


Finally in the WSDL designer we create the Service via the Add button on the Services component. Simply we give the Service a name such as SubmitForm.

We then right click on the Service name, select the Insert into SubmitForm option then the port option. This allows us to define the Port name and the Binding that it maps too we created earlier:


Within the Port we must add the URL address of the Port which encompasses the server we'll deploy the web service too, so we right click and select the Insert into soap12:address:


The complete WSDL diagram looks as follows:


Generate the JAX-WS classes for our Web Service

Once we've created our WSDL file, JDeveloper provides a generator that will create JAX-WS based Java code based on what defined in the WSDL file, saving us having to code the Java code by hand.

Invoke the New Gallery -> Current Project Technologies -> Business Tier -> Web Services -> Java Web Services from WSDL option:

In the associated wizard skip Step 1 of 7. For Step 2 of 7 select the "Java EE 1.5, with support for JAX-WS Annotations" option.

In Step 3 of 7 select your WSDL file in the drop down, leave the default values.

In Step 4 of 7:


The Package Name is the Java package where your JAX-WS classes will go. The Root Package for Generated Types it the Java package that will encompass JAXB Java classes that model your XML Schema elements, used by the JAX-WS web service code. Leave the other default values.

Click the wizard finish button.

The generator will create a number of files with the resulting structure in the Application Navigator:


The most interesting of these to look at is the FormPortTypeImpl.java that implements the web services using JAX-WS:

package au.com.sagecomputing;

import au.com.sagecomputing.types.FormInput;
import au.com.sagecomputing.types.FormOutput;
import au.com.sagecomputing.types.ObjectFactory;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding;

@WebService(name = "formPortType", targetNamespace = "urn:SageComputingWSDL", serviceName = "SubmitForm", portName = "formPort", wsdlLocation = "/WEB-INF/wsdl/SageComputingWSDL.wsdl")
@XmlSeeAlso( { ObjectFactory.class })
@javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.DOCUMENT, parameterStyle = javax.jws.soap.SOAPBinding.ParameterStyle.BARE)
@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
public class FormPortTypeImpl {
    public FormPortTypeImpl() {
  }

    @javax.jws.soap.SOAPBinding(parameterStyle = javax.jws.soap.SOAPBinding.ParameterStyle.BARE)
    @Action(input = "urn:SageComputingWSDL/formOperation", output = "urn:SageComputingWSDL/formPortType/formOperationResponse")
    @WebMethod(action = "urn:SageComputingWSDL/formOperation")
    @WebResult(name = "formOutput", targetNamespace = "http://www.sagecomputing.com.au", partName = "FormOutput")
    public FormOutput formOperation(@WebParam(name = "formInput", partName = "FormInput", targetNamespace = "http://www.sagecomputing.com.au")
        FormInput FormInput) {
        return null;
    }
}


Note that the Java method formOperation accepts our FormInput datatype and returns the FormOutput type. Both of these classes have been generated as classes in their own right which we can now use as fully fledged Java classes. As such we can modify our formOperation method as follows:

public FormOutput formOperation(@WebParam(name = "formInput", partName = "FormInput", targetNamespace = "http://www.sagecomputing.com.au")
    FormInput FormInput) {
  FormOutput fo = new FormOutput();
  fo.setOutputField1(FormInput.getInputField1().add(new BigInteger("5")));
  fo.setOutputField2(FormInput.getInputField2().concat(": Welcome!"));
  fo.setOutputField3("This is your reply");
  return fo;
}


Running our Web Service to WLS

Assuming you've already set up a connection to your favourite WebLogic Server and pre-configured WLS domain in JDeveloper, to deploy our application from JDeveloper is simply a case of right clicking the project, then Deploy -> WebServices -> to -> (your server connection name).

Once the application is deployed to WLS, logging into the WLS server console, clicking on the Deployments node, you'll see your application within WLS, which you can then expand to see your actual web service:


Selecting the web service, then the testing tab reveals both the URL of the WSDL file and the ability to invoke the Test Client:


I'm currently unable to get the Test Client working, so instead I used SoapUI to create a new project plugging in the WSDL, selecting my web service, entering values for the generated XML payload with the following result:

Monday 10 November 2008

JDeveloper 11g certification matrices

I stumbled across (what I think is) some new(ish) documentation for JDeveloper 11g today under the Install Notes parent page, which I thought might be useful to some readers.

From the Install Notes page you can access documentation on JDeveloper 11g certified platforms, deprecated features and third party software libraries:

Tuesday 28 October 2008

ESB vs OESB vs ALSB vs OSB vs, um....

Given Oracle's BEA acquisition earlier this year, and various announcements by Oracle around the middleware stack including their 2008 July 1st announcements and various reinforcements at OOW08, there's a lot to learn and keep track of.

(And I thought Christmas was to be a quiet period this year)

I'm currently investigating Oracle's movements in the Oracle Enterprise Service Bus arena, and following my research I thought I'd share my findings for others to use. I'm sure to anyone in the ESB and SOA arenas this is all immediately obvious, but to an outsider looking in there's a lot of information to digest.

Warning: you're mileage may vary on the following information. I'm not an ESB or SOA expert in anyway, thus my research. Please take time to confirm these facts. I'd appreciate if you find
a glaring hole in my understanding that you post a comment so other readers aren't mislead.

ESB/OESB

  • Oracle's traditional Enterprise Service Bus is known as ESB or OESB. On the internet the concept of an Enterprise Service Bus is a rather generic and loosely used term. For Oracle's offerings I'll refer to it as ESB or classic ESB here on.

  • I haven't been able to determine if it was possible to buy ESB by itself, or it only came as part of the SOA 10g suite; it would seem conceivable to me you might want ESB without the SOA wrappings. ESB is not currently listed on the Oracle Australia Shop

  • Checking Oracle's website 23/Oct/08, the Oracle site at times referred to ESB as OSB, a confusion with the future OSB->ALSB platform name (see below). I assume this was a transitional marketing misnomer and to be ignored. However as of 27/Oct/08 given the OSB->ALSB 100-day-release (again see below), the ESB website link has gone, for reference existed here and the Google cached page here,

  • From a conversation with another Oracle ACE Director, my understanding is the classic ESB was not heavily used by the SOA 10g Suite; BPEL could exist mostly without. I guess this implies classic ESB was more of an option in the 10g release which you could make use of.

  • The primary interface for working and configuring ESB is JDeveloper 10g.

  • Within the future FMW 11g platform as part of SOA, classic ESB is mostly removed with a part remaining known as "Mediator", purely remaining for the SOA suite. Mediator within SOA ties existing EDN (Event Delivery Network) and SCA services together.

  • Speculation: it seems odd that Oracle has kept a part of ESB for their future platform, given the adoption of OSB/ALSB (see below). Maybe Oracle considered dropping ESB completely for the upcoming FMW 11g release, but Oracle decided this target was too ambitious for the 2009 deadline? The logical conclusion is ESB will be totally dropped in the future, possibly by FMW 11gR2?

ALSB vs OSB

  • Upon Oracle's acquisition of BEA they obtained BEA's SOA suite known as Aqualogic. Aqualogic like Oracle's own SOA suite included an Enterprise Service Bus platform known as Aqualogic Service Bus. An internet search reveals the commonly used acronym ALSB.

  • ALSB has been re-badged by Oracle as Oracle Service Bus (OSB), and should not be confused with the classic ESB/OESB offerings from Oracle.

  • The latest version of ALSB v3.0 was certified against BEA WebLogic Server v10, not 10.3 (source - see pre BEA acquisitions section).

  • A significant difference for Oracle customers between classic ESB and ALSB is the missing JCA Adapters. Classic ESB included a range of adapters for connecting ESB to different sources and destinations, the most important being for Oracle customers the Oracle database.
OSB
  • OSB will mostly replace classic ESB in FMW 11g and the SOA Suite, except for the classic ESB "Mediator" component.

  • OSB is considered to be a more sophisticated product than classic ESB. The recently published OSB statement of direction from Oracle infers that they were written for different markets, but given that ESB has nearly been removed this would imply that classic ESB is inferior.

  • The current OSB release as of 27/Oct/2008 as blogged by Chuck Speaks most importantly includes a framework for JCA Adapters which was missing from the original ALSB platform (see the ALSB vs OSB section above that discusses the JCA Adapters for more information). Note it's a "framework" allowing for JCA Adapters, not the actual adapters themselves. I've been told that Oracle plans to release a range of JCA Adapters in January 2009 including those for the Oracle database. I'm unsure if that is a "hard-date" from Oracle or an unconfirmed fact; be careful to base any future OSB adoption plans on the date published in this blog. This conclusion seems to be supported by this OTN forum post.

  • Somebody mentioned to me OSB (and ALSB) support raw JDBC calls to a database, though I believe read-only at this time, and I haven't found a reference to this in the documentation. Otherwise I also believe its supports EJB v2.1; of not significant benefit because of the complexity of anything EJB prior to v3.

  • The OSB release is certified against WLS 10.3 as per the following OTN post (thanks to Eddie and Mark for their assistance on confirming that fact).

  • Currently OSB allows the user to configure it via the WLS console or an Eclipse add-on. Future support will be added to JDeveloper, conceivably for the FMW 11g Bulldog release in 2009.

  • At the time of writing, the licensing options for OSB via Oracle Shop Australia are AU$24, Processor Perpetual, or AU$480.00 Named User Plus Perpetual.
Sources of information and references

AMIS: http://technology.amis.nl/blog/3566/the-amis-team-reports-from-oracle-open-world-big-and-small-announcements-guidance-and-tips#more-3566 (see slide 19)

Oracle OSB website: http://www.oracle.com/technology/products/integration/service-bus/index.html

Oracle OSB statement of direction (SOD): http://www.oracle.com/technology/products/integration/service-bus/docs/Oracle-Service-Bus-SOD.pdf

Note the SOD mentions migration paths for existing ESB and ALSB customers that may be of interest to some readers.

Thanks to....

My thanks for assistance with the above summary to Lucas Jellema and Peter Ebell from AMIS, and Eddie Ho at Oracle Australia. Please note any facts above that are wrong or misleading are 99% probable my fault and in should in no way be attributed to these folks.

Sunday 26 October 2008

Down-under events: Lucas Jellema on SOA and SQL Puzzles

I note Lucas Jellema will be down-under early in 2009 to present SOA for Database Professionals and Oracle SQL Inside Out - Challenging Puzzles and Puzzling Challenges under the Oracle University Seminar series. It's great Lucas is heading down our way (though not Perth I see!... we miss out again!!!!) and I highly recommend if you can check out Lucas's presentations. Lucas is a very knowledgeable and enthusiastic Fusion Middleware Oracle ACE Director, well worth a few training dollars to see.

A little bit of a twitter

I'm taking a little break from the blogging gig while I recoup my enthusiasm after finishing the ODTUG-OOW-AUSOUG-AUSOUG conference circuit, and catch up on about a zillion forgotten tasks.

For a change of pace, I'm giving the Twitter lark another go, feel free to follow me along.

Wednesday 15 October 2008

JDev 11g masterclass wrap-up

Today was the last leg of my JDeveloper 11g Masterclass sponsored by OTN and part of the AUSOUG Gold Coast conference series.

The 1 day masterclass has run around Australia, seeing the largest class yet at the Gold Coast. It was a bit of rush last week between AUSOUG conferences to update the JDev 11g TP material to the 11g production release, but it was important to show the students the latest release.


I'm certainly happy with the result, here's some of the feedback:
  • Excellent course without the Oracle marketing spin!
  • Awesome! better, quicker than a drawn out 5 day bore.
  • Perfect for Forms to JDeveloper presentation overview. Pretty impressive stuff.
  • Enjoyable & informative. Good overview and reasonable overview of the tool.
  • Great overview of new features.
  • Yes it was a good overview to what JDeveloper/ADF Faces combination can do.
  • The course satisfied my requirements: spot on!
  • Chris Muir was excellent, thoughtful and knowledgeable.
  • Very good overall overview of Oracle JDeveloper 11g. Enjoyed the workshop today.
I'd like to thank OTN for sponsoring the event series, thanks to AUSOUG for holding the series and organising the logistics (especially AUSOUG's General Manager Burke Scheld), and finally thanks to the delegates for signing up in the first place. It was great to meet you all and share my passion.

Thursday 9 October 2008

JDev 11g: ADF Faces RC: new component af:noteWindow

I'm currently having a bit of fun hunting around the JDev 11g production release for features that weren't in the earlier TP releases. Today I stumbled across the af:noteWindow tag within ADF Faces RC.

The af:noteWindow tag displays a speech bubble popup similar to the tooltips on other components. The following screenshot shows the af:noteWindow displayed via a mouseOver af:showPopupBehavior tag:


The following code demonstrates how I achieved the above:

<af:panelGroupLayout layout="horizontal">
  Contact
  <af:spacer width="10" height="10"/>
  <af:outputText value="SAGE Computing Services">
    <af:showPopupBehavior
      popupId="sagePopup"
      triggerType="mouseOver"/>
  </af:outputText>
  <af:spacer width="10" height="10"/>
  for more information.
  </af:panelGroupLayout>
</af:panelGroupLayout>
<af:popup id="sagePopup">
  <af:noteWindow>
    <af:panelGroupLayout layout="vertical">
      <af:image source="/sageWeb2.0LogoSmall.gif"/>
      <af:group>Contact enquiries@sagecomputing.com.au.
      </af:group>
    </af:panelGroupLayout>
  </af:noteWindow>
</af:popup>


According to the documentation the af:noteWindow must be located as the direct child within a af:popup tag.

I guess the primary benefit of this component is to display help text inline within a page.

Wednesday 8 October 2008

Another Aussie Oracle ACE Director - Richard Foote

I'm very happy to hear that Richard Foote has been voted in as the next Australian Oracle ACE Director. Given Richard's rich history with Oracle, user groups, presenting, his blog and his recent educational tours, the award has been due for sometime. In particular I admire Richard's long and well thought out blog posts which challenge assumptions and promote discussion, unlike my disjointed ramblings, ah, posts, no rambings, ah forget it.

So it seems we have an Oracle ACE Director in Perth, Brisbane, and 2 in Canberra. Can it really be the 2 biggest Australian Oracle capital cities Melbourne and Sydney have no ACE Directors? Ah, that's why the 2 biggest Oracle offices are located there, to make up the fact for they're missing ACE Directors! ;-P

Good work Richard.

Perth AUSOUG leg over, Gold Coast to go

Yesterday concluded the AUSOUG Perth 2 day annual conference. This is probably the best conference of all to catch up with my local peers and colleagues. It seems each year I'm having to remember more and more names and faces at the Perth event which is great; it feels much like a highschool reunion of sorts (and apologies to those whose name I forgot - given I celebrated my 33rd birthday yesterday, old age is my excuse ;-)

Once again Connor McDonald took line honours on the best speaker award, and Tim Hall runner up. I know Tim was pretty chuffed with the award and I'm particularly happy I had the chance to originally invite him down for the AUSOUG conference, because the members obviously liked what Tim had to say..... not as much as Connor, but nearly ;-) (and also another great endorsement for the Oracle ACE Director program).

I thought the DBA corner was particular strong this year, what with (in no particular order) Connor, Tim, Penny Cookson, Alex Gorbachev, Guy Harrison, Barry Matthews (the rumour is Barry actually sold 4/7 an Exadata server ;-) and more presenting. I couldn't understand a word they were talking about, but I am a "developer" anyway. As Alex identified on his blog the local DBA audience is small, but they appreciate real technical content from people who are excited about presenting the latest database concepts, and I think it shows the top 2 papers were taken by DBAs.

I also caught up with David Peake of Apex fame, had a punch up out back of the convention centre over Apex vs ADF, which I lost, and now I'm an Apex convert (insert slightly bruised smiley face here ;-( David is on a somewhat mad dash around the world presenting Apex topics; and I thought my trip from OOW was bad enough, David's is just nuts. However jet lag or not, David's presentations ran well and were well attended; especially popular in the local market. Brenden Anstey's Apex/JDev showdown was a popular topic, showing there's life in this classic debate yet, and I was happy he took time out to present given his current silly work schedule.

The SAGE Computing Services crew were in full presentation force again this year, with Penny Cookson and Eddie Harris introducing Apex reporting solutions, Ray Tindall a security smack-down with Oracle, Scott Wesley on PL/SQL conditional preprocessor code (or how to insert malicious code), and myself on database based web services (of which I had a full room which was pretty good IMHO - though it's so hard to fit a 1hr OOW presentation in 45mins so it was very rushed). For such a small company I think we punch way above our weight at these events. Yet I think we mostly get a buzz out of seeing familiar friends and work colleagues each year who are keen to hear what we have to say and to share war stories, so that's pretty rewarding in itself (everybody say: awwwwwwwwww). We'll get around to putting the presentations up on the website soon.

I worked out by the end of next week I'll have done about 5.5 days (5 x JDev 1 day masterclasses, 4 x 45 min presentations, + 1hr online eTraining event) members facing presentations to AUSOUG this year, which is a pretty reasonable effort if you ask me, especially given the amount of effort behind the scenes to prepare such. I'd be really happy to hear of some new topic ideas for next year from you the reader along the JDev/Oracle developer lines, so if you have a few ideas shoot me an email please.

Next I'm off to the AUSOUG Gold Coast conference to do pretty much the same thing again, + the addition of my JDeveloper masterclass this time with a Queenslander accent. Most annoyingly JDev 11g went production yesterday, so I'm rushing to update the masterclass notes before my trip. Oracle, you could have at least waited another week! Oh well, no rest for the wicked, or Oracle ACE Directors for that matter.

If you're going to the GC conference, please come up and introduce yourselves, I'd love to have a chat. See you at GC!

(and yes, the post title was deliberate ;-)

Monday 29 September 2008

ADF Methodology Group post OOW08

Now that I'm flying back from OOW08, I've a chance to pen a few words about the ADF Methodology Group at the Unconference.

I was very privileged to be a part of the first live ADF Methodology Group meeting. As blogged by Sten and Avrom, we were very lucky to have 40 odd people turn up to help contribute to the first meeting, including day-to-day expert ADF programmers, Oracle ACEs and ACE Directors, and Oracle staff themselves. Thanks to everyone who attended, beginners and experts alike, and those who contributed directly and indirectly.

The success of any such group is always a sum of the great contributions from the parts, and there was enough active discussion to let us know what we're doing is going to help each other and new people to the group in running successful ADF projects. While the OTN Forums are great for talking about technical facilities, solving bugs and understanding JDev + ADF features, there's far more to discuss in order for an ADF project to succeed, and this is where the ADF Methodology Group fits in. What's the best way to test an ADF app, what infrastructure do you need, what should be part of your estimates, and so on.

I encourage anyone who is interested in JDeveloper and ADF to join the Google Group to discuss these sort of high-level discussions beyond the pure technical that all parties need in adopting new technologies, and to put effort into the Oracle Wiki page for the benefit of all.

We're already talking about holding our next meeting at the ODTUG conference next year, and hopefully we'll see even more attending the OOW session in 2009, including yourself.

Thanks again to all for your great efforts.

Phew, now I'd better go and do some paying work ;-)

Friday 26 September 2008

Link to my OOW presentation

Thanks to everyone who attended my presentation at OOW08. It can be downloaded here.

Wednesday 24 September 2008

OOW08: I think it's end of day 3

After than a less than amusing 3 hours sleep last night, day 3 of OOW08 was on the agenda. Today was some impressive presentations by the JDev PMs. Even though I've been searching the JDev 11g stack carefully for new features, Steve Muench revealed a massive (no over exaggeration) set of new features in ADF BC I hadn't yet found, Frank Nimphius a range of new security features to fit into WLS, and Juan Ruiz demonstrated the new ADF desktop integration (ADFdi) for Excel, a feature that potentially is going to make BI Publisher redundant as a reporting solution for ADF if the JDev team can in combination squeeze out a MS-Word equivalent.

It's so obvious there's a massive Fusion Apps development hiding somewhere behind the scenes at Oracle. The JDev team are pumping a huge amount of new and improved features into the ADF stack, and it's not because of the Enhancement Requests logged on the JDev OTN forum ;-)

I had a chance to sit in on Robert Nocera's Forms to JDev Unconference session, and in fact I bumped into Grant Ronald from Oracle UK who said all his Forms conversion presentations have been full. It seems Forms conversion is on the tip of everyones' tongues at Oracle Develop, given there are a number of solutions at OOW this year. What a shame the Apex crew are overselling theirs. Have you thought about telling people you can't convert the PL/SQL guys?

Tonight was the Oracle ACE Dinner, a relaxing event to talk to a diverse set of "really" qualified and interesting people. It's such a rare chance to meet so many dedicated people from around the world. Once again thanks to Oracle for organising this, it makes for a great OOW experience.

Like yesterday, Oracle Australia cornered more Australians at OOW today, and you can see Marcel Kratochvil interviewed on YouTube.

Today I did hear a rumour that Oracle has committed to Oracle 11g XE in the future, I'll need to confirm the fact though. Could this be Larry's big X announcement on Wednesday? (teehee) The 11g XE release will be a relief for all us presenters who use it to present. I suspect we'll need to wait till OOW09 though.

Wednesday sees the ADF Methodology kick off at the Unconference. We've 30 odd people registered which is great. Afterwards I'll be in the OTN Lounge for the Oracle ACE Office Hours between 12-1pm, and then squeezing in some more JDev sessions, followed by the Appreciation event.

No rest for the wicked (as much as you can call an Oracle "programmer" wicked).

Tuesday 23 September 2008

OOW08: Day 1, or is that 2? I forget

Monday blurred. I missed the keynote (not my thing anyway), bumped into a number of Oracle staff and fellow ACEs and had a good chat (blah blah blah Doug ;), presented at 11:30 (I think it went well – no tomatoes), hit some good sessions (the new JDev DVT features are "way-cool", and I learned how SQL Dev is actually going to improve Apex in a way that vanilla-Apex fails), attended a whirl-wind Asia-Pacific (APAC) reception after-hours (um, what's with all the Aussies wearing suits?), and had dinner with user group colleagues to discuss some very interesting issues (SOA what?). Unfortunately I missed the OTN Night. Doh!

Tomorrow is purely tracking sessions I wish to attend, bugging Oracle staff for answers, then the Oracle ACE dinner which will be fun. Somewhere in there some prep for Wednesday's ADF methodology group.

Anyway, mostly a post about nothing, mainly for the people at home, who think this is a lark and I spend most of my time at the pub.

And just to prove I actually am in San Fran at OOW, you can catch me on YouTube or via the Red Room blog. Thanks to Gareth and Chi for organising this.

Usual disclaimer: I'm at OOW08 under the overly generous Oracle ACE Director program.

Monday 22 September 2008

OOW08: Day -1: Jet Lag = 1, OOW = 1

Oops, forgot to post about Saturday in San Fran at OOW08.

One of the things I like to do when visiting another country is sit down and read some local newspapers to get a feel for what's happening locally. Though American news filters through the syndicated news channels back to Australia, the pure breadth of coverage is not there.

Of course the news in the States right now is all doom-and-gloom about the economy and Wall Street. Both papers I browsed were 75%, if not 95% about the economic crisis, with a large focus on stocks, federal intervention, politics and the blame game. I was surprised by the inclusion of The Wall Street Journal story As Times Turn Tough,New York's Wealthy Economize. "Oh boo hoo poor American rich people, you can't afford a nose job, I feel so sorry for you." It took me most of the day to find a story that considered the impact on the average American thanks to Time publishing Forget Wall Street. What about the rest of us?

Of course it's also a fascinating time with the race for the American Presidency, from both inside the States and out. One thing I've always found odd as an Aussie travelling to other countries is how patriotic other countries are, and in turn how much the general population is willing to visibly show their preference for political parties. Across from the hotel I'm staying at somebody has placed an Obama for President poster 8 stories up on a balcony nobody can see, and yesterday I spotted this poster near China Town. I just can't in living memory remember somebody in Australia putting something similar up, like a "I Love Kevin" poster, or a glowing picture of Little Johnny's glowing mug.

Of course OOW is far away from the local economic and political issues.

Saturday afternoon proved a great day to catch up with fellow Oracle ACEs and bloggers, Doug Burns, Tim Hall, Lucas Jellema, Marcel Kratchovil, with much speculation about the big OOW announcements.

Given that I've just sat in on the Sunday ACE Director meeting where some of the announcements have been either made or hinted at, it's a fun game to think back to our discussions yesterday to see how correct they were. Some of the announcements are completely embargoed until the keynotes so we can't talk about them. And as I have such poor memory of what we can/can't talk about, I'll keep mum till each keynote .

Monday's my Back to Basics Web Services presentation and the start of the Oracle Develop sessions I'll attend. Should be an interesting day as long as the jet lag doesn't kick in.

Disclaimer: I'm at OOW08 as part of the Oracle ACE Director program.

Saturday 20 September 2008

OOW08 Day -2: Jet lag = 1, OOW = 0

14,726 kms later (9,150 miles) I've touched down in San Fran for OOW08. Once again the epic battle between jet lag and OOW rages on. Today jet lag definitely wins with no sign of sleep on the plane. However over the next week the excitement of OOW will throw itself at jet lag, and we'll see who comes out triumphant.

All in all a rather silly post to let others at OOW know I've arrived and keen to catch up, so drop me an email.

Oh, and if anybody would like to recommend a good coffee joint San Fran downtown besides the usual franchises please let me know. Is it even possible to get a "flat white" in the USA?

Thursday 18 September 2008

JDev 11g ADF BC – New feature "Static List View Objects"

Following on from the Property Sets and Declarative View Object posts, another new feature in ADF Business Components in JDeveloper 11g is the "Static List View Object".

To create a Static List View Object, via the View Object Wizard you select the "Rows populated at design time (Static List)" option:


You then define the individual attributes of the VO yourself similar to a programmatic VO:


Then manually create the actual rows and attribute values yourself, hardcoded:


It's even possible to import the data at design time from the Import button on this same screen using a CSV file.

The key advantage of the Static List View Object is it's suitable for small datasets that never change. A great example would be gender values (M = Male, F = Female) or statuses (O = Open, C = Closed), or in Australia where the Australian State values are set at 8 (ACT, NT, NSW, QLD, SA, TAS, VIC, WA) and unlikely to change anytime soon (ignoring the obligatory "come-the-revolution" quotes ;).

Prior to the static list, in 10.1.3 one "hack" way to create a static VO was to create a R/O VO with a SELECT statement similare to following to load in some hard coded values:

SELECT 'a hardcoded value' FROM DUAL
UNION ALL
SELECT 'another hardcoded value' FROM DUAL


This was a kludge and required a database roundtrip to return the values. Simply not ideal.

With the new 11g feature, there's a valid argument that such data should be in fact stored in a database table anyway. Yet it's really upto you as the well-informed-programmer to decide what would be suitable for a Static List VO as separate to a normal R/W or R/O View Object. Note Oracle recommends in their JDev 11g documentation that the Static List is only suitable for 100 rows or less, otherwise use a database derived VO anyway.

I've also found Static List VOs suitable for stub VOs in creating ADF Faces RC web page mockups for demonstration purposes, where the database tables have yet to be designed. We instead create some dummy data Static List VOs, some web pages based on those VOs, and it looks like the pages are showing real data. A key problem with this approach though is if you then need to transform the Static List VOs into real database VOs, it's a pain in the butt, because you need to delete the Static List VO and all its dependencies, create the new database derived VO, and then plug this correctly back into the web page and bindings. Hint hint Oracle, a "transform" VO facility would be neat.

Note that Static List VOs are a great candidate for the new Shared Application Module feature, of which Avrom Roy-Faderman has recently posted about in part 1 and part 2.

Tuesday 16 September 2008

10 things we probably wont see at OOW08

As I prepare for my next trip to San Fran under the overly generous Oracle ACE Director program, I thought I'd post 10 things we (probably?) wont see at OOW08:
  1. Streakers
  2. Sessions on "how to deal with your pain-in-the-butt DBA"
  3. Larry's keynote rendition of the great oom-pah Chicken Dance
  4. An exhibitor recommending their neighbour's solution over their own
  5. Tom finally proposing a Developer-DBA hug-a-thon (awwww, give me a hug Tom!)
  6. Oracle running on the EeePC (Oracle XEeePC, or ZeepC)
  7. Oracle's 2nd standard presentation disclaimer slide replaced with "Our word is your guarantee – or your money back"
  8. Out the door queues to get into the "OCI API in detail" session
  9. Oracle announcing in its latest round of acquisitions, it accidentally bought itself (apparently Oracle was a great acquisition opportunity as Oracle had great database market share and now Oracle owns 107% of the database market)
  10. Oracle staff wearing the new corporate tartan shirts (black on black doesn't count as tartan)
And just for the record, I started writing this post after last year's OOW. Incredibly trite humour like this takes a long time to prepare.

Sunday 14 September 2008

JDev 11g ADF BC – New feature "Declarative View Objects"

Following on from my Property Sets post, another new feature in ADF Business Components for JDeveloper 11g is the "Declarative View Object".

To create a Declarative View Object, you need a View Object based on an Entity Object, and under the Query page of the View Object Wizard or Editor, you set the SQL Mode to Declarative:


On switching a View Object to the Declarative SQL Mode option you'll notice the Wizard/Editor hides the SQL Query from you, instead providing an interface to modify the Where clause by selecting and/or constructing View Criteria, and selecting View Object attributes to participate in the Order By clause.


The key to Declarative View Object is they calculate the SQL statement to execute at runtime from the underlying Entity Object's database table and attribute database columns. With the previous Normal and Expert modes, the SQL query was effectively defined at design time by the programmer. The Declarative VO approach reminds me of how Oracle Forms works, in the fact that Oracle Forms uses the Block-table and Item-column mappings to construct the SQL statement at runtime; there is no complete SQL query you can look at design time in Forms.

The main advantage of Declarative mode is it removes the need to understand SQL queries, including the Where and Order By clauses. The query is now effectively hidden from the programmer.

I can hear a million Oracle programmers asking "why would we want to do that?" Taking the broad idea that not all programmers are born equal, and not all programmers know SQL, moving to a Declarative approach will assist such non-SQL-savvy programmers, as well as beginners or business users in working with ADF.

Another advantage is this approach uses the new 11g VO View Criteria feature in specifying the filtering Where clause. The View Criteria feature is a powerful one as it allows the programmer to name each Where clause essentially, and reuse that Where clause throughout the program, potentially in combination with other named View Criteria. For an example of this reuse have a look at how the new LOV controls in ADF Faces Rich Client support the defined View Criteria.

Obviously Declarative View Objects aren't for everyone, but they provide an interesting new feature extending the declarative programming concept in JDeveloper. Soon there wont be much programming left to actually do!

One caveat I need to state with this post, and I forgot previously with the Property Sets post, is this feature is currently available in the JDev 11g Drop 6 release (and potentially TP4) that the Oracle ACE Directors have access to. There's the possibility it wont be in the production release, but maybe we'll know for sure in a week or so.

Wednesday 10 September 2008

JDev 11g ADF BC – New feature "Property Sets"

"Property Sets" are a new addition to ADF Business Components (ADF BC) in JDeveloper 11g. Property Sets are related to the extensible Custom Properties framework definable on EO & VO attributes, as well as at the EO, VO and & AM levels. If you're not familiar with the power and usage of ADF Business Component extensible Custom Properties look at my previous post I rest my case: Converting ADF BC EO/VO attributes to upper and lower case with custom properties or Avrom Roy-Faderman's post The Power of Properties.

Property Sets allow us to define a set of Custom Properties, essentially key value pairs, and then apply them to the ADF BC objects, without having to manually create each key value pair manually ourselves.

If we take a rather simplistic example, we could define a new Property Set "Alpha", with 2 properties "Beta" and "Charlie" as follows:

Then for example, we can select an attribute out of an EO or VO, and change the Property Set value to our new Property Set:

To prove the Custom Properties apply at runtime, without coding, within the Business Components Browser, we can right click on the attribute in question, and you can see a small information box that shows the runtime properties of the field, including the Property Set key value pairs we created.

This is obviously just a small new feature within JDeveloper 11g, but yet again a declarative productivity booster to stop the programmer having to waste time inputing values.

Tuesday 9 September 2008

Is JDev 11g ready to replace Designer's table modeller?

There's been a few announcements recently that the upcoming version of SQL Developer will include database table modelling features. It seems to be a little know fact outside of JDeveloper circles that JDeveloper has had "offline" table modelling for sometime. The 11g release has expanded upon this feature set to include more options, that in turn make it (more of) a viable option to replace Oracle Designer physical database modelling.

(I suspect the upcoming SQL Dev modelling features just come from JDev anyhow, but I can't confirm this).

In particular in the 11g release we now see that offline database objects have support for normal tables, external tables, index organised tables, temp tables and so on through the radio group at the top of the screen:

In addition for normal tables when selecting the Storage Options button under the Table Properties subnode, we now have the full gamut of storage clause options for the table we're creating:


I know of a few Oracle sites that are holding onto Oracle Designer purely for its physical database modelling features only. Through the latest release of JDeveloper we can see there is the potential to drop Designer all together and go for the free JDeveloper. Now only if those sites could drop Oracle Forms too ;-)

Sunday 7 September 2008

Alternative OOW08 show badge Mikons

Justin Kestelyn through Matt Topper had the excellent idea of adding Mikons to the OOW show badges for 2008. I thought I'd propose some of my own, because as Justin says, Mikons negate the need for minor chit-chat when meeting new people at OOW.

Imagine all the minor chit-chat you're going to avoid wearing these beauties! ;-) Maybe you'd like to propose some of your own.

Like last year, it's a rather slow blogging time while I prepare for OOW and the AUSOUG conferences in October.

Saturday 6 September 2008

Splotlight on me about a spotlight on me

A small post to spotlight the fact that the OOW team published a spotlight on my upcoming OOW session.

Friday 5 September 2008

How to convince others to adopt ADF & JDeveloper

Thanks to efforts on the ADF Methodology Google Group, I'm happy to announce that we've published a page on the Oracle Wiki entitled How to convince others to adopt ADF & JDeveloper.
This page is a colloboration of the group's members of which I'd like to thank for their kind efforts.

For those interested, the following blurb gives you an idea of what's covered in the Wiki page:

In attempting to convince others to adopt ADF, a brief-and-to-the-point discussion on the salient points of ADF are key. However care needs to be given to focusing on the needs, concerns and skillsets of the audience as much as the features to successful sell ADF & JDeveloper. The following [page] expresses bullet-point ideas to convince Oracle Forms Programmers, Java programmers, and management to adopt ADF & JDeveloper at their organisation.

The page then goes on to cover:
  • How to convince "Oracle Forms programmers" to adopt ADF & JDeveloper
  • How to convince "management" to adopt ADF & JDeveloper
  • How to convince "Java programmers" to adopt ADF & JDeveloper

I hope you find the contents interesting and useful in convincing others to adopt ADF & JDeveloper.

Tuesday 2 September 2008

A method for adopting OraFormsFaces for JDeveloper

Recently I had the luck of trying out Wilfred van der Deijl's excellent OraFormsFaces, a bridging tool that allows Oracle Forms sites to embed Forms within a JDeveloper JSF application and more importantly allows them to communicate with each other through standard Forms globals & parameters, and JSF EL expressions and events. Overall my client was impressed, especially thanks to Wilfred's kind assistance on sorting out some of the tricky parts of their Oracle Forms implementation.

I highly recommend organisations should look to OraFormsFaces to move beyond the analysis paralysis of where to move next after Oracle Forms. On adopting OraFormsFaces you will instead realise that rather redeveloping your entire legacy Oracle Forms system in JDeveloper or whatever technology, an expensive and risky task because you have many man years and dollars wrapped up in your legacy system, instead you can integrate Oracle Forms with JDeveloper, leaving JDeveloper for new subsystems.

As thanks to Wilfred, we'd like to publish documentation, on a method for adopting OraFormsFaces. We hope this will be useful to others out there looking at adopting OraFormsFaces in the near future.

Please note the following documentation is draft, your mileage may vary, and it should be read hand-in-hand with the OraFormsFaces documentation.

A method for adopting OraFormsFaces

The following describes a prescribed approach to adopting OraFormsFaces at your organisation in achieving the following goals:
  • Minimize risk by identifying technical issues early
  • Run OraFormsFaces in both an Oracle Forms Builder and OAS environment
  • Reduce the learning curve for staff by breaking the adoption into manageable sections
  • Identify approaches to integration for your specific legacy Oracle Forms system
The prescribed approach to achieve these goals:

1. Test the basic OraFormsFaces integration between a running JDeveloper JSF page and a compiled Forms Builder fmx.

This step will test you have correctly installed and/or configured:
  • The OraFormsFaces Oracle Forms support files
  • The OraFormsFaces JDeveloper support files and configured JDeveloper appropriately
  • A JDeveloper application workspace with the required web.xml settings
  • That the JDeveloper Embedded OC4J can communicate to the Oracle Forms Standalone OC4J
  • The local Oracle Forms formsweb.cfg file with the new OraFormsFiles entries
  • The local Oracle Forms Standalone OC4J can pick the formsweb.cfg options up
  • Your browser to run with the Sun JVM
To achieve this test, as per the OraFormsFaces guide, setup a standalone development PC with Oracle Forms 10gR1/R2, JDeveloper 10g/11g. Create a test JSF page with an embedded OraFormsFaces forms component, calling a test dummy Oracle Form of your devising.

2. Test passing values from a JDeveloper JSF page to a Form's parameters and global constructs, and the Form returning values to a JSF page.

This step will test the data value passing between JSF and Oracle Forms using OraFormsFaces, including:
  • JSF can pass values to a Form named parameter and named global (proven by Forms being able to receive and display those values in a text area)
  • Forms can pass a value back to JSF bean (proven by JSF showing the bean value in an inputText control)
  • Forms can execute a JSF command control
To achieve this test, extend the first step to get the JSF page to pass globals and parameters to the Oracle Form, and the Oracle Form to pass globals and parameters back to the JSF page. Do the following:

a) In your form create a block and 3 text items: p_some_param, g_some_global, p_some_jsf_value.

b) Also in the form add 2 buttons: update_jsf_page, exit_button.

c) In the when-new-form-instance-trigger add the following code:

IF :parameter.p_some_param IS NULL THEN
  :some_block.p_some_param := 'NULL';
ELSE
  :some_block.p_some_param := :parameter.p_some_param;
END IF;

BEGIN
  IF :global.g_some_global IS NULL THEN
    :some_block.g_some_global := 'NULL';
  ELSE
    :some_block.g_some_global :=
      :global.g_some_global;
  END IF;
EXCEPTION
  WHEN OTHERS THEN
    :some_block.g_some_global := 'DOESN''T EXIST';
END;

DECLARE
  v_some_jsf_value VARCHAR2(100);

  tableParams offParams.typeParams;

BEGIN
  tableParams := offParams.getParameters;

  v_some_jsf_value :=
    offParams.getParamValue(
      tableParams, 'someJsfValue');

  IF v_some_jsf_value IS NULL THEN
    :some_block.p_some_jsf_value := 'NULL';
  ELSE
    :some_block.p_some_jsf_value := v_some_jsf_value;
  END IF;
END;


d) On the update_jsf_page button add the following when-button-pressed trigger code:

offParams.setParamValue('someJsfValue',
  :some_block.p_some_jsf_value);
offInterface.execJSFCommand('someCommand');


e) On the exit_button add the following when-button-pressed trigger code:

exit_form;

f) Finally in the Oracle Form create a Form level parameter p_some_param, a String 30 characters in length.

In your JSF page add the following code:

<af:form>
  <off:form clipApplet="false"
            formModuleName="ORAFORMSFACESDEMO"
            height="480" width="640"
            showDevControls="true">
    <off:formParameter
      formParameterName="p_some_param"
      value="A param value"/>
    <off:formParameter
      globalName="g_some_global"
      value="A global value" />
    <off:formParameter id="someJsfValue"
      value="#{someBean.someJsfValue}"
      valueChangeListener="#{someBean.someValueChangeEvent}"/>
    <off:formCommand id="someCommand"
      action="#{someBean.someAction}"/>
  </off:form>
  <af:outputText value="#{someBean.someJsfValue}"/>
  <af:commandButton text="Submit"/>
<</af:form>


g) Add a backing bean to the ViewController (name: someBean, class: view.SomeBean, scope: request) with the following code:

package view;

import javax.faces.event.ValueChangeEvent;

public class SomeBean {
  public SomeBean() { }

  String someJsfValue = "A JSF Value";

  public void setSomeJsfValue(String someJsfValue) {
    this.someJsfValue = someJsfValue;
  }

  public String getSomeJsfValue() {
    return someJsfValue;
  }

  public String someAction() {
    return null;
  }

  public void someValueChangeEvent(ValueChangeEvent event) {
    int fish =1;
  }
}


On running the JSF page, you should see the Forms app embedded with the 3 values populated from the JSF OraFormsFaces parameters (ie. A param value, A global value. You should be able to update the value in the form, press the Update JSF Page button and see the value reflected in the JSF page outputText control, and vice versa.

It would also be good practice for developers to improve their understanding of the interaction of OraFormsFaces with JSF at this point to place breakpoints on each of the bean methods above, run your JDeveloper in debug, and watch the interaction of the above methods.

3. Extend the last step by trying to clip off the Forms menu and borders such that only the data contents of the form page show.

4. Test passing values from a JDeveloper JSF page to an actual Oracle Form from your legacy system, which requires both named parameters and global variables:

This step will help you:
  • Understand how to identify parameters and globals in your Oracle Forms that OraFormsFaces will need to pass, as well identifying the actual parameters and globals and what values to pass.
  • Run your first real embedded Oracle Form to see if it will work within OraFormsFaces.
  • As extension of the last point, this will help you identify any problematic code that may need to be rewritten.
To achieve this test:

a) Identify the legacy system Oracle Form.

b) Embed the OraFormsFaces code into the Oracle Form as per the OraFormsFaces developers' guide.

c) Create a JSF OraFormsFaces page that passes in the relevant parameters and globals.

5. Test passing values from an actual legacy system Oracle Form to your JSF application.

This will step will help you:
  • Understand how you will need to generically modify existing code to pass values back to JSF.
  • Identify how different Forms programmers have traditionally passed values around your legacy system (though no exhaustively).
To achieve this test:

a) Identify the legacy system Oracle Form.

b) Embed the OraFormsFaces code into the Oracle Form as per the OraFormsFaces developers' guide.

c) Modify the existing Form to return values to the JSF page.

6. Once you are happy with the previous sections all done within Forms Builder, developers should attempt to move to an OAS environment testing their previous successes to ensure that the OAS is configured correctly to run OraFormsFaces.

7. If your legacy Forms applications uses embedded JavaBeans, for each Form embed it in a JSF OraFormsFaces page and test the form both in the Forms Builder and OAS environment, specifically exercising the JavaBean code. This will help identify any issues with the JavaBean called within the OraFormsFaces engine.

8. As an extension of the previous test, potentially the entire legacy Forms systems can be embedded and called from the one JSF OraFormsFaces page both in Forms Builder and the OAS environment. For testing purposes every legacy Form could be embedded with the OraFormsFaces code, then the main menu called form the JSF page, and regression testing undertaken to identify any issues.

9. By now you should have 3 documents you can produce:

a) Detailing how to setup your local Forms Builder environments to run with OraFormsFaces such that new developers and/or network admins know how to configure the development environment correctly.

b) Detailing how to configure your OAS to run with OraFormsFaces as per the developers' guide and any other configurations you need to do to suit your environment.

c) Detailing issues of where your current Forms application will need to be rewritten to work correctly within OraFormsFaces.

10. Finally at this point you're in a position how you wish to use OraFormsFaces for future development. There maybe a new subsystem you wish to implement within JDeveloper that needs to integrate with your existing legacy Forms system. There maybe a part of your existing system that you wish to redevelop in JDeveloper to make it easier for your users to use, but must still fit into your existing legacy Forms system. Considering any part of this last step is immature until you've gone through the previous steps to judge how well your system will integrate with OraFormsFaces.