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.

Tuesday, November 27, 2007

JDeveloper 11g - Create, Edit and Delete operations in ADF Faces af:table component

In this post, I have decided to implement JDeveloper 11g Technical Preview 2 sample application, based on one of my most popular blog post - Create, Edit and Delete operations in ADF Faces af:table component. I already received several requests to provide sample application for similar functionality in JDeveloper 11g, so here it comes.

Developed sample application, provides read-only table with those actions - Delete, Create, Edit, Save, Cancel. Row selected for editing is shown in editable mode and can be updated. Application is based on HR schema that comes with Oracle XE database. Application logic is based on Jobs entity from HR schema.

This sample is developed using the same principle as described in my previous post. I will describe what are the differences in implementation:

1. In JDeveloper 11g CreateInsert operation is not hidden anymore, you can use it directly from Data Control. This operation is used to create new row in table:

2. In From field of af:setActionListener, defined for Edit button, is used access to row - #{bindings.JobsView1Iterator.currentRow}, instead of access to individual column - {row.JobId}.

3. isEnableEditing() method in is changed, new code:

What's the difference here? First thing - since ValueBinding is deprecated, I'm using ValueExpression to access column value in a table. And second - I'm using oracle.jbo.server.ViewRowImpl to hold selected row.

How it works? JDeveloper 11g comes with ADF Faces Rich Client, it gives new level of usability in Web applications - you will notice this immediately. Create functionality is invoked by pressing Create button:

When data is entered, Save button allows to store information into database:

There is no more ugly radio button components for row selection, you can use just your mouse to select any row for editing:

And finally, several words about some of new features available in af:table component that comes with JDeveloper 11g ADF Faces Rich Client. First feature - standard functionality allows to rearrange columns in a table on runtime:

Filter can be used, to execute search directly in the table:

And, when let's say wrong input is provided, nice error message is shown at the same time when new value is typed:

I'm sure, you will like af:table component that comes with JDeveloper 11g ADF Faces Rich Client ;-)

Tuesday, November 20, 2007

Oracle JDeveloper/ADF Real Life Story on Oracle OpenWorld

Yes, that right - I was presenting Oracle JDeveloper/ADF Real Life Story on Oracle OpenWorld in Unconference section. Everyone was free to come and listen hints I have delivered for Oracle JDeveloper/ADF development based on real life experience. Based on feedback received from auditory, I think session was successful.

I have started session with presentation based on this outline:
  • About Oracle ACE Directors
  • J2EE Development - JDeveloper 11g and Oracle ADF (future book)
  • Oracle JDeveloper/ADF in IBM GBS Norway
  • Real Development with JDeveloper/ADF
  • Demo of Sample Applications from
  • Technical Resources
Yes, I'm writing now book about JDeveloper 11g and ADF. This book will based mostly on practical material. I have presented with several slides my current project in IBM GBS Norway and turned to main part of session - Real Development. In this part I was developing Web application with JDeveloper and ADF just on the fly, at the from of auditory. Application development from beginning to testing took for me 45 minutes. And lastly I presented my blog and have talked about technical resources each JDeveloper/ADF developer should know and use in his daily work.

In this post I want to concentrate on application I have developed during real time development. Developed application - is based on standard HR schema available in Oracle XE database, application contains 3 Web pages - for viewing and editing data from JOBS table, and also for viewing data from EMPLOYEES table.

I have developed this application based on those steps:

1. I created Business Components diagram. I was using declarative approach to create Model layer. Jobs and Employees entities were added to the Model declaration:

2. Second step was to show how test created Model layer with ADF BC Test utility that comes with JDeveloper:

3. Next step was to show how to add validation logic. Jobs entity object was chosen, I added and tested validation rule for MinSalary attribute:

4. When Model layer was done, I moved to ViewController and have created there page structure along with navigation:

5. First page I developed was - jobs.jspx. This page contains one read-only table and two buttons according to logic defined in faces-config.xml file.

6. Second page was editJob.jspx. This page provides a form for data from Jobs entity editing:

7. Third page - employees.jspx. Here employees who belong to specified job are listed in the table:

8. And of course I have tested validation logic in editJob.jspx page, it worked good:

However, there was a question from auditory about how to make Back button work in a case when validation error is displayed. Hint - you should set Immediate=true for Back button:

9. Ok, everything works fine, but one thing is not ok. If you have noticed, it is possible to update minimal salary with some value, even higher comparing to salaries of existing employees. That not good, and I have implemented solution for this as well. At first, I have created new read-only View object that select all employees with selected JOB_ID and SALARY lower comparing to provided value:

10. When View object was created, I implemented custom method in Application Module. This method is used to execute read-only View object and to return result to ViewController:

11. In ViewController I have created methodAction declaration for checkEmployeeSalary method and in editJob page backing bean implemented a call to defined methodAction:

12. Now second validation rule is also implemented:

Oracle OpenWorld was great event, with two Larry Ellison keynotes and a lot of technical material in Oracle Develop. I even don't talk about entertainment part, it was amazing. See you next year in San Francisco ;-).

When running sample application, don't forget to add adf-faces-impl.jar and jsf-impl.jar to application's WEB-INF\lib directory.

Thursday, November 15, 2007

Blog on iPod Touch

It's how my blog looks on iPod Touch from Apple :-)

Monday, November 12, 2007

Oracle OpenWorld Unconference - Presentation Time

I have registered today my presentation time at Oracle Unconference:

Session Title : Oracle JDeveloper/ADF Real Life Story
Time : 3PM
Date : Wednesday, November 14
Location : Moscone West 3rd Floor Overlooks
Room : 1

You are welcome, see you on Wednesday ! ;-)

San Francisco - Oracle OpenWorld

Today is my first day in San Francisco, Oracle OpenWorld Conference. It's amazing, city lives with Oracle spirit during conference days.

My day have started with presentation - Integrating Spatial into Enterprise with Standard Frameworks, I have delivered this presentation at Oracle Spatial SIG meeting. Right after it I was participating in Oracle ACE Director briefing. Topics covered there:
  • Oracle Fusion Middleware Platform Overview
  • Grid Enabled SOA. What's New in SOA
  • Oracle Identity Management
  • Oracle WebCenter
  • Oracle ACE Director Roundtable Discussion
  • Oracle Database Briefing

Monday, November 5, 2007

Presentation at Oracle Spatial SIG during Oracle OpenWorld

During Oracle OpenWorld in San Francisco I will participate in Oracle Spatial SIG meeting. My presentation title - Integrating Spatial into Enterprise with Standard Frameworks. It will be focused mostly on demonstrations of my blog content about JDeveloper, WebCenter, and MapViewer. I will show and explain how Oracle Spatial plugs into Oracle Fusion Middleware.

Meeting time: Sunday, November 11th at 10:00 am - 11:30 am
Meeting place: Moscone West, San Francisco, CA
Room: 2008
Session Code: S292934

Friday, November 2, 2007

Calculated Column in ADF Faces af:table Component

It happens that sometimes you need to implement calculated column in ADF Faces af:table column. Value for this column is calculated based on values in other columns. There could be many approaches to achieve this, as one of the most simple I can suggest to add calculated attribute into View object, on which af:table is based.

You can download developed sample application - This sample is based on standard HR schema available in Oracle XE database.

Calculated attribute can be added to View object in two steps:

1. Define new object attribute on View object, just provide name and type:

New attribute will be created as Transient:

2. Generate View Row Class for View object, just by selecting check-box in View Object Editor:

In generated class, edit getSalaryDiff() method and put needed logic here:

When described two steps are done, in Data Control calculated value becomes available and you can use it in your application User Interface layer:

Implemented sample application provides table with calculated value included - difference between maximal and minimum salaries:

When running sample application, don't forget to add adf-faces-impl.jar and jsf-impl.jar to application's WEB-INF\lib directory.

Sunday, October 28, 2007

Central Norway - Lillehammer City

Today I was doing sightseeing trip to Lillehammer city in Norway. This city is located on the north part of largest lake in Norway - Mjøsa. In the city center, through stones and mountains flows Lågen river. It's not so much water now in the river, but it is typical to Norway. Rivers here are full with water on Spring, when snow goes down from mountains. And yes, it's golden autumn here - yellow leafs are on the ground :-).