Archive for June, 2008

PL/SQL Table-to-Java Bean (and Data to Java Bean Manager) generator – useful for data driven demos without database

The other day, I sat preparing for a demonstration of a data driven Java Web application. I preferred to be able to present the demo without actually having to use the database – as it takes a lot of time to start and too many resources from my hard press laptop. I only needed several dozens of records to show in the web pages, nothing too serious.

I decided it would be convenient to have a quick way of creating Java Beans from my table definitions (very much like many JPA tools & frameworks can do) and generate code that will instantiate a series of objects based on those bean definitions with the same data that also live in my database. I can then shutdown the database, yet continue working with data in my Java application. This article introduces a PL/SQL package that will do this for me.

The result of running this package for tables EMP and DEPT looks like this – and allows me EMP & DEPT based demonstrations without the need for a database up and running!

 

.... Read the rest of this entry »

BEA available on Oracle E-Delivery

I have no idea when they made it available but, while searching on Oracle E-delivery for a complete Oracle BPA package, I saw that a lot of BEA software can be downloaded via Oracle’s E-Delivery channel.

It look like it concerns all BEA software packages, although I don’t know their full product stack by heart.

Bea Products 

 

It’s time to play…(and re-learn what has been lost)

;-)

Quering RSS Feeds The XMLDB Way

Actually this is old stuff (2006), but it got lost in a comment section. I think this can still be useful to some and I also post this here for prosperity.

Somewhere in 2006 my colleague Lucas Jellema wrote a post on the AMIS Technology site about querying rss feeds from the database. My colleague Anton Scheffer and I commented on that article with our XMLDB functionality mindset.

Later on in 2007 Lucas wrote another useful post called "Querying RSS feeds in SQL…". Peter Wolf commented that he had also written a very nice blog post about using XMLDB functionality while Integrating Yahoo Pipes into APEX.

I think this is still useful stuff to a lot of us, although you should keep in mind that the table(xmlsequence(extract())) construct will be, in time, out lived by the XMLTABLE function. Also XMLTABLE supports XPath V2, the table(xmlsequence(extract())) doesn’t. The XMLTABLE function is available from Oracle database version 10.2.

I reconstructed my statement in the comment section from the post in 2006 and "solved" the small puzzle that I couldn’t solve at that time. Of course, especially via XQuery, there are more good solutions, but the following is a first step.

Anton’s example that is still very useful from database version 9.2.0.3 up to 10.1 (if not only remembering the "old" Oracle 9.2 syntax).

Read the rest of this entry »

OEM GC 10.2.0.4 Upgrade Connect Issues

Here a small post that hopefully will help some people in the future that are stuck with the same issues. I am still missing some info, but I discovered the workaround for the following "symptoms".

FACT’s

I have a VMware environment in which I can play with Oracle BAM and OEM Grid Control on Windows 2003. My current OEM Grid is 10.2.0.3. Because 10.2.0.4 is already out for a while I decided to upgrade my current 10.2.0.3 release. I checked and verified all prerequisites needed before the upgrade. Because I once upgraded the OEM from 10.2.0.1 to 10.2.0.3; and my initial install at that time was an "out of the box" install, no extra steps needed to be done before I could start with the upgrade to 10.2.0.4.

Now it comes….... Read the rest of this entry »

Integrating Flashback in ADF Web Applications – providing the historic perspective

When we were doing the APEX vs. ADF session at the last day of the ODTUG Conference yesterday, Dimitri showed a nice feature in APEX that allows you to use Oracle Flashback Queries to look not just at table data as it is right now, but also as it used to be in the recent past. That inspired me to see how easy it would be to do something similar for an ADF application. As an example of what you can do, I will create a simple web page in this article that will show an editable table with Employee records and below that a read only table that can show the data as it is right now, or as it was at some specific time in the last. Through a dropdown list, the user can select from which point in time the data should be retrieved. It allows for quick inspection of changes in data and could serve as a basis for recovering data.... Read the rest of this entry »

ADF “Function Result Cache” – how to speed up calls to deterministic WebServices

The 11g release of the Oracle Database gave us the PL/SQL Function Result Cache. This feature can help speed up performance in calling PL/SQL functions by caching function When you invoke a function has been set up to use a result cache, the PL/SQL engine will check whether the cache already contains a result for the set of input parameter values for this current call. If so, the result is retrieved from the cache and returned to the invoker. If the result is not yet in the cache, it will be put there as the function completes execution. This of course means that for frequently called functions that take some time to execute, substantial performance gains can be achieved.

I was thinking about this feature while working with ADF and WebServices. I have been using with this nice temperature conversion service – Fahrenheit to Celsius for example – and it did the job very well. However, the call to web service took anywhere between 2 and 6 seconds – way too long for an interesting user experience. And given the fact that this web service is a deterministic one – same input will always return the same response, if I would have something like a client side result cache that I could first inspect for a non-expired result for this current input, I may be able to at least prevent some slow service calls and replace them with very fast cache accesses.

This article describes how to set up WebService calls from ADF with a crude attempt at ResultCache implementation..... Read the rest of this entry »

ODTUG 2008

The ODTUG Kaleidoscope conference in New Orleans has just finished with the Apex vs ADF session of Lucas Jellema and Dimitri Gielis. They both demonstrated that you can create a fully functional and appealing application within a day. They made it very clear that is was not a shoot-out. Both frameworks have their strengths and their own playing fields and they can even be viable alternatives for each other. With once in a while a teasing remark it was real fun and a  last session.
In my opinion ths year’s ODTUG was definitely worthwhile. Last year we were a bit disappointed because it seemed that the conference was not innovative enough and remained stuck with the ‘old’ Oracle toolset. This year was much better, lots of sessions about Apex, BI, ADF, the newly aquired Essbase, PL/SQL and much more. It was even a bit frustrating that many ADF sessions were about or used JDeveloper 11g, although quite stable, is not yet released and nobody would say anything about a release date.
I was especially happy with the many sessions that were dedicated to good practices, tips and trics and things they don’t teach you in the courses and demos (by Kenton Ho). I think these kind of sessions truly show the ODTUG Kaleidoscope’s identity. The other aspect is the unformal and easy atmosphere. It is extremely easy to speak to anybody, from participants to speakers and the experts in the field. In addition, New Orleans is a real nice place to stay and Bourbon Street is hard to forget ;-) .

My highlights :

  • Kenton Ho with ‘Our first ADF/JSF based product: What they didn’t teach you in the courses and demos’. He is a good speaker and provided us with 10 (and more) good practices and tips on ADF development from their own experiences.
  • Dan Norris with ‘Oracle identity management – The total identity solution. A subject I am not familiar with and it was great to get a clear picture of all aspects of identity management like user management, authentication and single sign on, role management, access management etc. etc. Oracle provides a complete solution, mainly based on products that they have aquired in recent years.
  • Steven Feuerstein with ‘Weird PL/SQL’. Unrivaled as a speaker, he shared his notions about funny aspects of PL/SQL, for example about Oracle’s exception numbering that is both negative and positive at the same time.
  • Éric Marcoux with ‘Managing Oracle Forms, PL/SQL and ADF source files in a single environment’. He presented about their experiences with improving the development process, amongst others with maven based continuous integration, a subject I am heavily interested in and which forms a key component in the AMIS software factory (or a bit friendlier ’software studio’).
  • Steven Davelaar with ‘Beyond drag and drop: ADF Faces advanced techniques’. Great presentation about complicated stuff like the pagelifecycle, the immediate property, partial page triggers and the difference in behaviour between the disabled and rendered property of ADF Faces components.
  • Paul Dorsey with ‘Thick database techniques for Fusion (and other) Web developers’. He claims that putting business logic (and more) in the database and reducing the middle tier to its bare minimum improves a webapplication by factors. It’s scales better, uses less resources, increases development productivity and reduces the amount of code. His method relies heavily on hiding the complexity in database views with instead-off triggers and pl/sql collections. It is certainly a very interesting and viable approach, but somehow I don’t think the debate is over yet.

.. and ofcourse my own presentation ‘ADF development: live from the trenches‘. In which I share my / AMIS’s experiences with ADF development, like naming conventions, code examples, things to avoid, the importance of unit-testing and continuous integration etc. etc.

I can’t wait for the ODTUG Kaleidoscope next year, probably in Monterey on the west coast.

ZoomIt – great presenter’s aid

One of things to learn during conferences is about the tricks used by fellow presenters to make their presentations better fun. One of the nicest things I picked up was a tool used by Duncan Mills (Oracle), called ZoomIt. It is a tool that will allow you to quickly enlarge the portion of the screen where the cursor currently is located by using a shortcut key. It is fairly lightweight tool that is easily installed. It can be downloaded from http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx.

Once you have installed the tool it can do:

  • zoom in (and out again)
  • allow you to draw lines, circles, rectangles etc. to emphasize elements and areas on your page
  • allow you to type on the screen

Some examples:.... Read the rest of this entry »

News, questions and Rumours from the ODTUG conference – APEX, SQL Developer, BEA, WebCenter, Forms,…

Any conference with a large crowd of developers, passionate about their work and the tools they work with, is of course a breeding ground for speculations, rumours, frustrations, honest questions and subtle attempts at manipulation. The Oracle Development Tools User Group Conference – ODTUG 2008 Kaleidoscope – currently underway in New Orleans is certainly no exception to that rule. And here we have an interesting group of primarily developers who have been working with Oracle technology sometimes for as long as 20 years. Much longer than the average Oracle sales person or product manager has even been with Oracle. These developers typically love the tools even more than their points of contact within Oracle. And now they have the opportunity to spout their grievances, proclaim their devotion, share their worries and fears and hopefully be reassured.

 Later today, I will be informed of a number of upcoming developments. Alas, that information will be confidential, not for me to share on the blog. At the time of writing the blog, I have know no official knowledge – that I cannot share – and am therefore at liberty to share some of the rumours – as well as some of the actual news..... Read the rest of this entry »

Rapid PL/SQL Web Service Client development (using soapUI and utl_http)

I have written about similar topics on several occasions. But now I feel an urgent need to do so again.  As with the use of the wonderful soapUI tool and a fairly well refactored piece of PL/SQL, you can create PL/SQL code calling into SOAP WebServices in no time at all. They can be external, maybe even public web service, or the front ends of internal services deployed to an Enterprise Service Bus or a BPEL engine. Thanks to standards such as WSDL, SOAP and XML it all works in the same way.

In this article I will show how I:

  • locate a temperature conversion service in the public domain
  • use soapUI to rapidly test call this service, meanwhile getting examples of the required request message structure as well as the returned response message structure
  • extend a piece of reusable PL/SQL code to call the service and process the response

This allows me to create a PL/SQL Function convertFahrenheitToCelcius( p_fahrenheit_temperature in number) without knowing the first thing about adding/subtracting 32 and multiplying/dividing by 9 and 5. In less than 7 minutes. And being in New Orleans where the weather report speaks of temperatures in the 80s and 90s, I have a serious need to do this conversion before picking my garb for the day..... Read the rest of this entry »