Archive for May, 2005
AMIS Query – ADF and JHeadstart – Judgment Day; also: UIX Skins, ADF and WebServices and JHeadstart New Features
May 27th
Yesterday, Thursday May 26th, AMIS organized another of its AMIS Queries. These sessions usually bring together a substantial number of top Oracle & Java Developers from The Netherlands. This session assembled over 30 developers, from most well known Oracle and Java consultancy firms. The agenda covered the following topics:
- ADF Binding Framework – Decoupling Model and View/Controller (by Lucas Jellema)
- Working with WebServices in ADF Business Coponents (by Sandra Muller)
- JHeadstart 10.1.2 – June Patch Release New Features (by Peter Ebell)
- Dinner – on our sun-baked terrace
- Really Customizing the look and feel of Oracle ADF UIX applications (by Steven Davelaar)
- Workshop on all of the above areas, including a preview of the new JHeadstart release
Eclipse and java5
May 26th
Use Eclipse with java5:
- Download a 3.1 Milestone
- Add java5 to the installed jre’s (Window > Preferences > Java > Installed JRE’s)
- Set the compiler compliance level to 5.0 (Window > Preferences > Java > Compiler)
Although it is said that Eclipse must pick up java5 by starting it with eclipse.exe -vm <path -to-jdk1.5-install>binjavaw.exe (you can check that with Help > About Eclipse Platform > Configuration Details) it worked fine for without that setting (maybe because java5 is my system’s default).
For me the third option did the trick.
This is the error message I got before changing that setting:
is not generic; it cannot be parameterized with arguments <string>
Syntax error, parameterized types are only available if source level is 5.0
Google api
May 26th
Like many others, Google provides access to some of it’s services by means of webservices. Just follow the instructions at the Google web api’s site:
- download the developer’s kit
- create an account and get a licence key
- create a program
The developer’s kit contains a wsdl, webservice client libraries and some code examples for .NET and java.
For java, all you need to do is:
import com.google.soap.search.GoogleSearch;
import com.google.soap.search.GoogleSearchFault;
import com.google.soap.search.GoogleSearchResult;
import com.google.soap.search.GoogleSearchResultElement;
...
GoogleSearch search = new GoogleSearch();
search.setKey("key");
try {
search.setQueryString("sql pathetic");
GoogleSearchResult googleResults = search.doSearch();
} catch (GoogleSearchFault f){}
DB utilities – Oracle JPublisher enables you to easily access PL/SQL from Java
May 25th
The tool JPublisher is a little bit unknown. But it is a very handy tool for accessing PL/SQL stored procedures, packages, functions as well as object, collection or reference types from Java. There is no need for writing error prone Java code when you need to access those objects: JPublisher just creates the Java code you need. Lately I used JPublisher to create a Java class for accessing the DDL of database objects. The package DBMS_METADATA contains a GET_DDL function which returns a CLOB containing the DDL you have asked for.
Oracle’s Disappearing Act: Flashback Query
May 25th
Did you ever find yourself in a situation where you accidently deleted a number of records which you shouldn’t have? And to top it off, committed the changes? I did. And I can tell you, it doesn’t give you a nice warm fuzzy feeling inside. A day’s worth of log messages gone, and this was invaluable information.
But what to do?
Read the rest of this entry »
Book Review: Mastering Oracle PL/SQL: Practical Solutions
May 24th

Title: Mastering Oracle PL/SQL: Practical Solutions
Authors: Christoper Beck, Joel Kallman, Chaim Katz, David C. Knox, Connor McDonald
Publisher: Apress
ISBN: 1-59059-217-4
Publication Date: Dec 2003
Website: http://www.apress.com/book/bookDisplay.html?bID=276
More info can be found at the Publisher’s website. The source code is available for download.
Integrating Ant and Checkstyle
May 24th
The Open Source Java code checker Checkstyle can be easily used by Ant to check your Java code.
This is an excerpt from an Ant build.xml file using the Sun Java coding checks:
<property name="checkstyle.home" location="..."/>
<taskdef resource="checkstyletask.properties" classpath="${checkstyle.home}/checkstyle-all-3.5.jar"/>
<target name="checkstyle">
<checkstyle config="${checkstyle.home}/sun_checks.xml" failOnViolation="false" classpathref="classpath">
<fileset dir="${src.dir}" includes="**/*.java"/>
</checkstyle>
</target>
See also the manual of Checkstyle. Please note that JDeveloper has Audit Rules for Java code, but I do not know how to check those Rules with Ant.
Storing your Oracle Reports in the database
May 24th
One can come up with several reasons to store your Oracle Reports output. Especially in cases where it needed to prove to authorities that the document you delivered was not manipulated by the end user.
Consider a pharmaceutical customer, they will need to apply to FDA regulation 21CFR11. Or perhaps even better, Read the rest of this entry »
Create a new entry after doing commit in ADF
May 24th
Imagine this situation: in a call center, the phone rings, an operator creates a new entry in our web application, hangs up and the phone rings again and another new entry needs to be created. In such a case, a rapid insert of new records is wanted and it’s cumbersome to have to click the “New entry” button all the time. At the same time, updating an existing record should not create a new record on commit. Sounds familiar? Read on…
Read the rest of this entry »
How to implement an unique key constraint in ADF BC?
May 23rd
In an ADF project that deals with building a membership administration application for a sporting organization, I ran against the question how I could implement the validation of the uniqueness of an alternative key. For example, an entity organization member has a primary key member_id. However it would be nice when it is avoided that the same person is registered more than once in the system. Let’s assume that the last_name and birth_date combination sufficiently identifies an individual in the context of this sporting club. For an Oracle developer the solution is clear enough: just add a uniqueness contraint to the members table. But when we do not have the availability of this advanced database, it must be implemented in the business tier. Read the rest of this entry »


