Archive for December, 2005
How to use weak ref cursors and bulk collects into a table of objects to clean up data
Dec 30th
The problem I was facing was simple. You have a table with data. The data in that table should be validated. Invalid rows should be deleted. For each deleted row an entry in a logfile should be created. The validation of the rows could be performed by expensive queries. The simple solution would like:
for r_rec in c_badrows
loop
.... write data to the logfile
end loop
delete from mytable where ...
This way the query to lookup the bad rows has to be performed twice.
Read the rest of this entry »
Oracle Raptor – Using Snippets (and adding User Defined Snippets) for quicker SQL and PL/SQL coding
Dec 30th
The new Raptor tool for Database Development contains a feature called Snippets. Snippets are predefined fragments of SQL or PL/SQL code that you can easily include in a piece of SQL or PL/SQL you are editing. The Snippets are collected in various categories, presented in a Snippets Window from where they can be dragged and dropped into the Editor window. In this article I will show how you can add your own snippets to the set of predefined ones.
Read the rest of this entry »
My highlights of JavaPolis 2005
Dec 29th
A few weeks ago I visited the second and third conference day of JavaPolis in Antwerpen. I haven’t been to JavaPolis before, and I was excited to see how many people were attending. The location (a movietheater) was great, with large rooms and very comfortable chairs. Although some presentations were so popular that it was hard to get in and out of the rooms, once in, there was plenty of space.
Many presentations are already covered by my colleague’s at this blog, so I’ll give a short overview of my personal highlights.
JDeveloper at the Frappr (GoogleMap) community.
Dec 29th
As Frank Nimphius pointed out in his blog, a JDeveloper group has been started at Frappr. Come out and show yourself with a photo and your (current) location on GoogleMaps or discover other JDeveloper users around the globe.
Oracle releases Raptor – free tool for Database Development (SQL, PL/SQL, database object browsing)
Dec 29th
Project Raptor, announced and demonstrated at Oracle Open World, this Fall, has now been released (sort of, as it is still an early adopter release). A free download (60Mb) is available, for Windows or other platforms that run a JDK.
Project Raptor is a new, free graphical tool that enhances productivity and simplifies database development tasks. With Project Raptor, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, as well as create and save your own. Raptor is direct competition for tools such as TOAD and PL/SQL Developer and joins the ranks of other free tools such as SQuirrel and many others. Note: Raptor is not open source.
For those of us that have done database development and PL/SQL editing using the facilities in JDeveloper, Raptor will feel familiar. While it has been extended and is more focused than the database oriented functionality in JDeveloper, much of it has been taken from there. An overview of all features can be downloaded here: Feature Matrix

An Early Adopter release is now available for download for Windows and Linux. Project Raptor can connect to any Oracle Database version 9.2.0.1 and later. Support for this release is provided via an OTN Discussion Forum. Go to the Raptor Project Page on Oracle Technology Network.
Read the rest of this entry »
Using GlassFish Reference Implementation of EJB 3.0 Persistence with JDeveloper 10.1.3EA
Dec 28th
In a previous article -Getting Started with EJB 3.0 Persistence out-of-container using the Reference Implementation (GlassFish) – I have introduced GlassFish, the official Reference Implementation for EJB 3.0, and how the EJB 3.0 Persistence implementation from GlassFish can be used. In this post, I want to focus on using GlassFish’s EJB 3.0 Persistence Implementation with Oracle JDeveloper 10.1.3 (EA). We will see how to set JDeveloper up to get it working and then we will see how to take advantage of some of the JDeveloper wizards for generating stub code and EJB 3.0 meta-data to quickly get us going. For instructions on the downloading and installing GlassFish, please see the post mentioned above. For downloading and installing JDeveloper 10.1.3EA, go to the JDeveloper Homepage on Oracle Technology Network.
Read the rest of this entry »
Getting Started with EJB 3.0 Persistence out-of-container using the Reference Implementation (GlassFish)
Dec 26th
In this article I will report on my very first steps with EJB 3.0 Persistence in a J2SE application – that is: outside the context of the J2EE Container. In a previous post, EJB 3.0 Reference Implementation with teeth – Open Source EJB 3.0 by Sun and Oracle (Report from JavaPolis), I have introduced EJB 3.0 – based partly on the presentation by Mike Keith, Co-Specification Lead for JSR-220 (EJB 3.0) and member of the Expert Group for JSR-244 (JEE 5) and Architect for Oracle TopLink and the EJB Container in OC4J – the J2EE Application Server from Oracle.
In this post, I will download and install GlassFish – the Reference Implementation for EJB 3.0. Next I will write the almost simplest J2SE Application that will make use of EJB 3.0 Persistence to communicate with a relational database. I will run this application ’stand-alone’ – not in context of any container, neither Web Server/Servlet Container nor J2EE (EJB) Container. In a subsequent post, I will talk about running the application from Oracle JDeveloper 10.1.3 EA (Early Adopter’s Release) – in such a way that there are only dependencies on GlassFish, not on any proprietary Oracle classes.
Following my first careful steps, you should be able to get EJB 3.0 Persistence up and running for yourself in less than two hours.
The steps are:
- Download and Set Up Java 5 (JDK 5.0/JRE 5.0)
- Download and Set Up GlassFish
- Create Entities – POJOs with annotations that link them to database objects
- Create a Business Service class that provides Entitiy Services (like an out-of-container Session Bean)
- Create a Client that leverages the Business Service to do stuff
- Run Application
JavaPolis 2005: Some more comments
Dec 22nd
Some of my colleagues have posted their comments to JavaPolis 2005 on our weblog already. See the AMIS Technology blog for these weblog entries. I’ll add my comments to these where appropriate in this entry.
JavaPolis 2005: what’s hot and what’s not?
Dec 22nd
As a first recap of my five days at Javapolis, here are my thoughts on trends, past, present and future of the Java platform. Expect to see more in-depth articles soon. Read the rest of this entry »
Three interesting announcements – EJB 3.0, Eclipse WTP and a new database: H2 (source included, Java)
Dec 21st
Just browsing through my RSS feeds-reader, I stumbled across three very interesting announcements:
- JSR-220, the Enterprise JavaBean 3.0 specification, has reached Proposed Final Draft status. Programmers should expect that implementations should start to solidify now, although minor changes can still occur. It was predicted by Mike Keith in his presentation at JavaPolis (see my previous post on this talk and EJB 3.0 Persistence in general):EJB 3.0 Reference Implementation with teeth – Open Source EJB 3.0 by Sun and Oracle (Report from JavaPolis)
- The Eclipse Foundation today launched the Eclipse Web Tools Platform (WTP) 1.0. Release 1.0, which is an upgrade of the original 0.7 release and is built on top of the Eclipse 3.1.1 maintenance release, achieves two major goals in the WTP roadmap: It defines the WTP application programming interface (API) and remains current with the underlying Eclipse platform. See the homepage of the Eclipse Web Project: http://www.eclipse.org/webtools/main.html
- The creator of Hypersonic SQL has written a new database engine: H2.
It’s is written in Java, is free, source code is included. Available as
Java library and as native executable (GCJ). JDBC and (partially) ODBC
APIs are supported. Embedded and client/server mode, disk based or
in-memory operation, a web console application is included. Clustering
is supported as well. (source: TSS)


