Archive for April, 2006
Building an RSS Feed Reader in PL/SQL – using dbms_xmlparser, dbms_xmldom and dbms_xslprocessor for parsing and transforming
Apr 29th
This article will demonstrate how we can build an RSS Feed Reader in PL/SQL. We will use DBMS_XMLPARSER to read an RSS feed from an URL and parsethe RSS document, then using the DBMS_XMLDOM package we will analyze the document and then make use of the DBMS_XSLPROCESSOR package to transform the RSS document into a presentable format.
Many websites today publish RSS feeds. These feeds contain news items, the latest article publications, the most recent entries in discussion forums, software releases etc. The information available from RSS Feeds is structured according to a generic (almost) standard structure. That means that we can easily create software that processes RSS Feeds! Of course many RSS Feed Readers are available, for example as plugins for FireFox or other browsers, for Eclipse (created by my colleague Jeroen, see his article soon to be published on the weblog) or just as stand-alone tool.
In this article we create our own RSS Feed Reader, in PL/SQL of all programming languages!
Getting used to Oracle SQL Developer
Apr 28th
It took a few months, but I finally start appreciating the Oracle
SQL Developer developed by Oracle (The Project Formerly Known As Raptor).
There are still some bugs, for instance with debugging through a
firewall (hey, didn’t we have the same problem with JDeveloper?) and
some features are missing, but it’s quite usable. Especially when there
is no TOAD or PLSQL/Developer at the site.
I’ve provided a POAQ (Probably Often Asked Questions) here.
I have the latest release of Raptor. Is there any need for an upgrade?
It
is very advisable. Some bugs are fixed (like not remembering changed
preferences) and the startup speed has improved. You will
loose your saved connections, but you can recover them very easy:
right click "connections", choose import connections, select <raptor_path>\jdev\system\oracle\oracle.onlinedb.10.1.3.xxx\IDEConnections.xml. All connections will be restored.
I don’t like the baby-blue user interface and want a Windows look-and-feel!
Go to Menu|Tools -> preferences -> Environment -> Look and Feel = Windows
Why are my open tabs replaced when I click on another object?
That is because you need to ‘freeze’ a tab with the red freeze view
button at the left upper hand of the tab (a red pin). You can toggle it
on and off, and when it’s frozen it will not be replaced by another
object.
How do I export query results in SQL Developer? In TOAD this was so straightforward!
It’s straightforward here too once you know where to find it. Click on actions (in the upper right corner, next to the filter field). You can select Export
there and choose CSV, XML, SQL Load or SQL insert. Each option provides
a popup with additional options, like copy to clipboard or file. You
can filter out columns or add a where clause too. Just as you were used
in TOAD!
Software Deploying using ANT
Apr 27th
Some time ago a customer of AMIS asked me to setup the automatic deployment of the software for their application. Till then this was done manually, took an awful lot of time and was rather error-sensitive.
The application itself is a multi-tier application with an Oracle database, a Micro Focus COBOL application server and an Oracle Application server for OC4J and Oracle Reports. The deployments contains -among others- SQL-scripts, RDF-files, COBOL binaries, JAR- and EAR files etc. After examining the requirements I remembered ANT. Originally created to ‘make’ JAVA code, but evolved to much more than that, it is capable to run SQL-files against the database, to copy, ftp, remove files on a file system, execute other (system)programs, zip and unzip and interface with several CVS applications.
Better Builds With Maven – Free book about Maven 2
Apr 27th
When I was browsing through some articles on JRoller I found this interesting free book. As far as I know this is the first book about Maven 2. There is a book on Amazon that is released earlier this month but it says nothing about Maven 1 or 2 (and that’s a huge difference!)
Quote from http://www.mergere.com/m2book_download.jsp:
Mergere, Inc. is excited to announce the release of Better Builds with Maven, the ultimate resource to help you unleash the power of the Apache Software Foundation’s Maven project. Better Builds with Maven
is written by Vincent Massol, Jason van Zyl and other key contributors
of the Maven community and combines detailed explanations and code
examples to walk you through improving your software development
process with Maven 2.0.
Better Builds with Maven covers:
Read the rest of this entry »
Parsing RSS and Atom with ROME, easier is impossible
Apr 27th
is a java library to do things with RSS and Atom feeds. Things can be
reading, writing, merging and converting. Because RSS and Atom feeds are a
standard there is one standard Object where every entry in the feed is converted
to (SyndEntry). In this article I’ll describe how easy it is to parse an RSS
feed with
Some people probably have written their
own simple RSS parser, but believe me, this one is easier and can do more.

On Web 2.0, RIA, AJAX and Java Server Faces – 2 May 2006: Presentation and Demonstration by Backbase (16.30 Nieuwegein)
Apr 27th
Who is not raving about Web 2.0, the advent of Rich Internet Applications, the marvels of AJAX and of course the wonderful, productive world of Java Web application development using Java Server Faces. Amsterdam based tool vendor Backbase brings these worlds together. Backbase offers – in a free community edition as well as a commercial package – software that "helps you to create great AJAX applications. Our goal is to support you
with Products and Services to enable you to create Rich Internet
Applications that really make a difference." Backbase has a range of pretty amazing web components – see here for a demo – that include layout controls, a datagrid, charts, sliders, spinners and much more.
Backbase provides JavaScript components as well as The Backbase AJAX Engine, Over 50 out-of-the-box AJAX components (see: Explorer), Backbase JSF Server Extension, Backbase Eclipse plug-in.
On Tuesday May 2nd, Backbase will come to our office (in Nieuwegein) and present & demonstration their product. They will explain how their offering brings Ajax and JSF together. If time allows, we will also do a short hands-on session. If you are interested, please go to our List of Activities and register for this session that starts at 16.30 and includes a free dinner.
JDBC Rowset
Apr 27th
Do you still think the only way to retrieve data from the database is to use the java.sql.ResultSet? Try the new (hum) javax.sql.RowSet. One of the coolest features is to use it in a disconnected manner. Sounds familiar? Take a look at the .NET DataSet, the only
way for .NET developers to retrieve data from the database; why bother converting records to objects
. This article compares the JDBC and the .NET classes.
This RowSet is available since Java 1.4 and JDBC 2.x, but it’s part of the JDBC optional package (javax.sql). The Oracle implementation is available for some time in the oracle.jdbc.rowset package (at least since 9i, but probably even earlier). The latest version implements the mandatory JDBC 3.0 features and also an implementation of the WebRowSet (JSR-114), that offers XML ‘access’ to the content. More information on the OTN JDBC page.
The Next Value – How much higher is my salary than the next in (Dense) Rank – Oracle Analytical Functions
Apr 27th
It is not terribly important. But since I found the solution, I thought I’d share it with you anyway. During our Oracle 7Up workshop on SQL last week we discussed at length the use of Analytical Functions. Part of that discussion is of course the use of the Rank function in combination with Partitions and the Lead function.
One of the queries we specifically looked at was the one that tells us for each Employee how they rank within their own department in terms of their salary. And we threw in the difference for each employee’s salary and the next person on the list’s salary, for good measure.
BPEL Project by Oracle and IBM – Open Source Eclipse BPEL Plugin
Apr 26th
My first experience with BPEL was late 2004 using the Oracle BPEL PM and Designer plugin for Eclipse. Afterwards, I have worked primarily with the Oracle JDeveloper BPEL Designer functionality. Just moments ago I was informed of the existence of the BPEL Project – apparently a joint initiative by IBM and Oracle (unexpected bed-fellows?). The objective of the project is to produce an Eclipse plugin that provides ‘comprehensive support for the definition, authoring, editing, deploying, testing and debugging of
WS-BPEL 2.0 processes.’ Very recently, a new milestone for this project was made available for download. It requires Eclipse 3.2 – for which only Release Candidates are available at this moment.
Find the number of descendant nodes in a SQL query – how many employees work (indirectly) for me? And what do they earn on average?
Apr 26th
Every once in a while you run into a SQL challenge that seems extremely simple at first glance and turns out to be not so very simple when you look a bit deeper. Hierarchical queries are not part of my every day diet, but they occur quite regularly. So I feel comfortable with the Oracle CONNECT BY syntax and the 9i and 10g extensions like SYS_CONNECT_BY_PATH, CONNECT_BY_ROOT, CONNECT_BY_IS_LEAF, CONNECT_BY_ISCYCLE and NOCYCLE (see the article New CONNECT BY Features in Oracle Database 10g by Jonathan Gennick for more details).
The challenge I ran into the other day was deceptively simple; it translated to: query all employees from the EMP table and show for each employee the number of employees that report to them, either directly or indirectly. For KING the answer is simple: all employees report to him, either directly or through the management chain. But how do you write the query for this. Somewhat efficiently.
This same question can be asked about Bills of Materials, Directory Structures and their contents, Nodes in an XML Document…. In this article I briefly discuss how we could fairly easily answer these questions. I do not present a thorough study into the performance characteristics though. I would be happy to hear your thoughts on that.
I also have this nagging feeling that I am doing something the hard way where a very simple way exists that I completely overloop. Again, I would like to hear your thoughts on that too – if you phrase them gently.

