Sunday, December 23, 2007

Oracle Fusion Middleware 11g Technology Preview 3 - whats included?

Probably almost everyone have noticed Christmas gift from Oracle - JDeveloper 11g Technology Preview 3.

What new things are inside this gift? :-)

Those things are:

1. WebCenter development - Oracle WebCenter 11g Technology Preview 3

2. SOA development - Oracle SOA Suite 11g Technology Preview 3

3. New tools to build extensions to JDeveloper

4. A list of new coding features in JDeveloper, like Show Whitespace Characters, Quick Javadoc for methods, Quick Outline, Code Peek and others.

5. Subversion support is improved with Branch/Tag, Switch and Merge files, projects and applications versioned in an SVN repository. Also support for Versioned Properties including svn:ignore is added.

6. Database development inside JDeveloper 11g is improved with ability to generate Database Reports. Its possible now to perform dependency analysis of offline database object references. Database modeler is enhanced with ability to model materialized views.

7. In JDeveloper 10g it is possible to run application from JDeveloper only on embedded OC4J. In 11g its possible to specify external OC4J, that will be used to run applications from JDeveloper.

Full list of JDeveloper 11g new features - Oracle JDeveloper 11g Technology Preview 3 New Features.

Two new tutorials are added on JDeveloper 11g OTN page:

1. Introduction to ADF Data Visualization Components - Graphs, Gauge, Maps, Pivot Table and Gantt

2. Examining ADF Business Components New Features

JDeveloper 11g documentation is updated as well, it comes with JDeveloper archive. Alternatively you can download it from JDeveloper 11g - Technology Preview page.

Merry Christmas and Year in Blogosphere

At first, I want to say thanks for all my blog readers. Its almost one year since my first post in blogosphere - Why I'm here? I believe, experience I was sharing during this year, was useful and helpful for readers. Today I want to give some statistics collected during this year.

Blog - received 30,558 visits from 140 countries. JDev/ADF Samples list - received 12,850 visits. So, in total I have 43,408 visits collected by Google Analytics. ClustrMaps service gives 46,603 for and 18,684 for respectively. So, truth is somewhere in the middle probably, in any way next year I will try to double those number by providing even more clear and focused samples based on practical cases.

Visitors map for generated by Google Analytics:

Pageviews are constantly growing. However, traffic is always down on weekends, this means most of visitors use resources on my blog during work time - sounds logical :). Again generated by Google Analytics:

Most of visitors are coming from Search Engines, second place belong to Referring Sites and Direct Traffic is on third position:

Wish Merry Christmas everyone !

Wednesday, December 19, 2007

Oracle Magazine Peer-to-Peer column

My profile is published in Oracle Magazine January/February 2008 edition - Favorite Things. Profiles of Oracle ACE Director - Chris Ostrowski and Oracle ACE - Jacco Landlust are published also.

If you have a second, you are welcome to read :-)

Oracle Spatial and TopLink 11g

This spring I was blogging about Oracle Spatial object type oracle.spatial.geometry.JGeometry support in TopLink Essentials JPA - Oracle Spatial and TopLink Essentials JPA. But time dont wait, and we already have TopLink 11g that comes with Oracle JDeveloper 11g Technical Preview 2. In TopLink 11g support for JGeometry object type is much simplified and can be used in more convenient way.

Developed sample application -, contains Model and ViewController projects. In Model part, TopLink 11g is used to build persistence layer. In ViewController part, User Interface is developed with ADF Faces Rich Client. In order to run developed sample application you need to have Oracle MapViewer demo dataset MVDEMO in your database. You can download dataset from OTN and install it into your database as separate schema.

So, what are the main changes comparing to my previous post. Main news - support for Oracle Spatial object type oracle.spatial.geometry.JGeometry mapping and querying is provided out of the box by TopLink 11g. However, its important to know that this support is available with TopLink libraries and not with TopLink Essentials. What you need to do is to:

1. Configure a StructConverter with annotation on any of your entities. This configuration is performed only once for all entities.

@StructConverter(name = "JGeometry", converter = "")

2. For any attribute that you want to map to a type converted by specified StructConverter, @Convert annotation must be used:

private JGeometry location;

You can find this configuration I have done in Cities entity:

And in fact, its everything related about what developer should care when converting oracle.sql.Struct to oracle.spatial.geometry.JGeometry. Simple, isn't it? :-)

Sample application contains the same logic as one developed previously, queryCitiesSpatially() method in Session bean receives 4 parameters from Client and invokes named query - Cities.sampleQuery:

Named query Cities.sampleQuery is defined in separate class - Cities_SessionCustomizer. This class implements SessionCustomizer and creates expression with SDO_RELATE spatial operator. Class code:

Class with named query should be declared as Session Customizer Class in persistence.xml:

In ViewController project I have used ADF Faces Rich Client that comes with JDeveloper 11g, really amazing thing. One important thing related to ViewController, when I developed everything and was trying to Run application, I got exception - oracle.spatial.geometry.JGeometry class not found. It was quite strange to me, since I have added this library in Model project. Solution was to put sdoapi.jar into this directory - jdevstudio1111\lib\java\shared\oracle.toplink.ojdbc\

Developed User Interface part looks pretty cool. You can enter values and get result for spatial operator in table below:

In Cities data table you can notice Detach button, this button allows to open table in separate window. However, its not pop-up functionality, its function provided by ADF Faces Rich Client. This function allows to have in the same window several screens:

I think, such simplified Oracle Spatial object type usage in Object-Relational mapping, can greatly improve Spatial integration into enterprise systems.

Tuesday, December 18, 2007

Oracle Always Rocks !

This song was performed at Oracle OpenWorld 2007, after Larry Ellison and Safra Catz keynote - Sunday Night Live—30 Years Behind The Scenes at Oracle. It Rocks :-)

Monday, December 10, 2007

JDeveloper 11g and ADF Task Flow Parameters

People probably could think - ADF Task Flow is cool thing, but what it give us in daily life. How it can be applied in our projects? In this post, I will try to answer this question. I will describe two key features, you can start to use ADF Task Flow based on this functionality. ADF Task Flow contain many important things, but those two I think can be used in every project.

First thing - in JDeveloper 10.1.3 there is problem if application contains some 100 or more pages, page flow becomes complicated and diagram is not functional:

Logical solution is to split page flow into separate pieces, but its not so easy in 10g. But, in 11g it becomes very easy - ADF Task Flow provides unbounded and bounded task flows. This means you can split page flow into separate parts and reuse those parts. One rule - called task flow can be only ADF bounded task flow, it can be called from ADF unbounded or bounded task flow. Bounded task flow contains one single entry point and can have many exit points.

Second thing - ADF Task Flow is not limited with only page flow splitting, it allows to pass parameters between separate parts of task flow. So, ADF Task Flow gives much more than just splitting into groups.

Developed sample application - is based on standard HR schema, Departments and Employees entities. Unbounded task flow contains selectDepartments page and call to separate bounded task flow. Bounded task flow contains employees page and Task Flow Return component, this component allow to return to calling ADF Task Flow.

When I was creating this application, I have used Fusion Web Application (ADF) as a template for developed sample application. Empty unbounded task flow was created automatically - adfc-config.xml. My next step was to create bounded task flow - task-flow-definition.xml:

Bounded task flow will accept parameter - #{pageFlowScope.DepartmentId}, so I have defined it in Input Parameters Definition part:

In Property Inspector for Employees page, in Page Parameters section should be defined mapping between input parameter - #{pageFlowScope.DepartmentId} and paremeter that will be used in Employees page - #{pageFlowScope.departmentId}:

And last thing related to bounded task flow, as Task Flow Return component outcome name I have used word - back.

Unbounded task flow contains selectDepartment page, call for task-flow-definition bounded task flow and navigation between those components. selectDepartment page is used to choose department and with showEmployees Control Flow Case call employees page from separate task flow to display Employees associated with selected department:

One important thing - you should not forget to declare Input Parameter for bounded task flow call component. In Property Inspector, put value - #{pageFlowScope.DepartmentId} for departmentId parameter:

And..., actually we have developed two separate task flows with calls and parameter passing. How it works? Just run selectDepartment.jspx page, select any Department and press Employees button.

When Employees button is pressed, associated af:setActionListener saves #{bindings.DepartmentId.inputValue} into #{pageFlowScope.DepartmentId}. Page from separate task flow is opened with Employees working in selected Department:

Available Back button invokes Task Flow Return component and user is returned to unbounded task flow where selectDepartment page is available.

You may be interested to read my previous post about ADF Task Flows in JDeveloper 11g - ADF Task Flows in JDeveloper 11g.