A Techno Blog, mainly about Java

JDO 2.0 Queries – Part 1

JPOX supports JDO 2.0, here is some info on the JDO 2.0 queries.

September 28, 2004 Posted by | JDO | Leave a comment

Dont Give Up

Interesting story of continue to try and try again

September 28, 2004 Posted by | Weblogs | Leave a comment

1 for Java?

Sun Proposes Single Persistence model. But, what about Hibernate?

September 27, 2004 Posted by | EJB | Leave a comment

publishing of code ,etc

Here are a few links:
Java2html: “converts Java (and other) source code (complete files or snippets) to HTML”

Forrest for web publishing

September 25, 2004 Posted by | Web Design | Leave a comment

Properties file setting location

I had a relative path for locating my properties file. It worked fine inside of WSAD, but when you apply code into websphere, it does not know the path. So I used the tip on this page:
Dump your properties file in /WEB-INF/classes
InputStream inputStream = getClass().getResourceAsStream(“file.props”);
props.load( inputStream );
Howver, this page says it best as far as what you place in quotes for the getResourceAsStream call.

September 24, 2004 Posted by | Patterns & UML | Leave a comment

JSF Good

JSF Good! Says Rick Hightower.

JSF vs Struts:
Struts uses the Front Controller Pattern and Command Pattern.
JSF uses the Page Controller Pattern. Although there is a single servlet every faces request goes through, the job of the servlet is to receive a faces page with components. It will then fire off events for each component and render the components using a render toolkit.

September 24, 2004 Posted by | JSF | Leave a comment

Enterprise Java Beans

I just picked up Richard Monson-Haefel’s EJB bookwhich covers EJB 2.0, but here is an related article Developing Your First EJBs, Part 2

Access the actual Bean which live in the EJB container via the Home Interface
and the Remote Interface.

Home Interface (extend javax.ejb.EJBHome) : life cycle methods

Remote Interface (extend javax.ejb.EJBObject) : business methods of
the bean

Call back methods: notification methods that are invoked when certain events occur

Entity Bean (like what id done by JDO or Hibernate): represent data in a database

Session Beans:

Interesting, EJB and JDO.

September 24, 2004 Posted by | EJB | Leave a comment

Linux-like environment for Windows

I went to and downlaoded their product so that I could do the “exceed like” thing on my win2k machine. After the install (net,x11,shell), launch the icon which brings up a xterm. To access your drive execute ls /cygdrive
startX &
which brings up a x window.
ssh -X -l db2inst1 server_name

September 23, 2004 Posted by | Linux | Leave a comment

JAXB Validator

Good example at Bob’s place

Info from JAXB doc

A great intro:

I am interested in validator for unmarshalling, I did this:
//class MyHandler – implements class ValidationEventHandler
//contains method handleEvent
MyHandler veh = new MyHandler();

jaxb interest list

last one

September 22, 2004 Posted by | XML | Leave a comment

Web Services learning

tutorial on web services

ws by apache

prez by ibm

September 22, 2004 Posted by | SOA | Leave a comment

Struts n JSF stuff

JSF vs Struts info

Faces info by James Holmes

September 22, 2004 Posted by | Struts | Leave a comment


I saw the O’Reilly “A Developers notebook” on JDK 5.0, but have not picked it up yet. In the meantime I came across an other experience part 1 and part 2

September 22, 2004 Posted by | J2EE | Leave a comment

Tiles Page for Struts

A link to Cedric’s (From Struts in Action) Tiles page.

Speaking of Struts in Action, I noticed there is another Struts book from Manning coming out titled Struts Recipes.

September 19, 2004 Posted by | Struts | Leave a comment

What is DynaActionForm?

“Suppose we have lots of JSP pages with forms that we want to validate. We could write an ActionForm with getter/setter pairs for each of the JSP pages, but, if we had 20 pages, we would have to write an ActionForm for each one. This is inconvenient. Instead, we can create a single DynaActionForm. A DynaActionForm can be reused in any number of Actions. A DynaActionForm will list all possible properties with their types that can appear on a Jsp page. “

September 19, 2004 Posted by | Struts | Leave a comment

Hibernate with WAS

I did Hibernate with WAS and DB2 here. I will have to see how dead on I was now with this article from IBM

September 19, 2004 Posted by | Hibernate & ORM | Leave a comment

An Introduction to Java Map Collection Classes

An Introduction to Java Map Collection Classes – jsr 166

Hashtables and hashmaps

api presentation

September 17, 2004 Posted by | J2EE | Leave a comment

Rich internet applications

Th server side item on this topic

September 15, 2004 Posted by | Web Design | Leave a comment

Strut lessons

Struttin it [lessons and articles]

Speaking of Struts, their was a java world article on Struts best practices that was discussed at the server side.

Stuts is a competing technology with JSF, but Dion says Death of/Long live Struts

Nice tutorial on dynamic forms.

September 15, 2004 Posted by | Struts | Leave a comment

Struts multi select

After reading up on struts including reading parts of the Struts in Action book, I was looking for an example which had all types of inputs for a typical form (radio, select, multiselect, etc). Most examples with Struts show the typical user name and password logon example.

Best I found is here. However, it does not cover multiselect.

In the Sandbox struts forum, there was this.
Then there was Advanced Forms Handling in Struts 1.1.

In the end, I was looking for the type for storing my multiselect input:

Here is how I did it:
import org.apache.struts.action.*;
public class aForm extends ActionForm {
protected String [] username;
public String [] getUsername () {return this.username;};
public void setUsername (String [] username) {this.username = username;};

September 13, 2004 Posted by | Struts | 5 Comments

New Fall TV

Shows I like:
The Apprentice

apprentice views

arm chair critic

September 13, 2004 Posted by | Television | Leave a comment

More Patterns linkage

Patterns Central

Gang of Four The authors of the DesignPatternsBook came to be known as the gang of four

related links:
Schmidt’s Tutorials]
Programming Language Technologies and Paradigms
SD Best Practices
Java Resources

Enterprise Patterns

UI Patterns

September 11, 2004 Posted by | Patterns & UML | Leave a comment

Link Blast 2

Ebay developer page

Amis Technology Center blog

Integrating struts with jsf

Eclipse plugin for Cloudscape

Java Threads

Thread deadlocks discussed on Artima blog

Java Memory leaks

JavaOne Online

September 10, 2004 Posted by | J2EE | Leave a comment

JDO 2.0 with JPOX reccommendation

JMX and JDO 2.0: “If you’re looking to start working with JDO 2.0, I’d recommend JPOX (also see JPOX with Spring or Tapestry). Unfortunately, their implementation still requires you to “enhance” your classes at build-time”

September 9, 2004 Posted by | JDO | Leave a comment

WSAD – set workspace dir

C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2>wsappdev -setworkspace C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\ecl

September 9, 2004 Posted by | SW Tools | Leave a comment

Garden State

I recently saw the movie Garden State[blog] and enjoyed it.

He returns home after the death of his mom. She was paralazed years ago when the main character (Zach Braff) was a youngster in a freak accident.

September 9, 2004 Posted by | Movies | Leave a comment

Paging in J2EE

Or known as Page Iterator.

[article] : Pagination is a key part of Web site design, both from the UI perspective (to manage limited screen real estate) and from the server perspective (to process large result sets efficiently, without causing resource spikes or servicing delays).

The Pager Tag Library is the easy and flexible way to implement paging of large data sets in JavaServer Pages (JSP).

threads : Page by Page iterator does not solve DB bottlenecks?, Paging in JSP, J2EE + data caching and iterating page by page

New one

September 7, 2004 Posted by | J2EE | Leave a comment

Servlets – example1

Servlet model which others will extend:

public abstract class AbbyServlet extends HttpServlet {

protected void forward(HttpServletRequest httpservletrequest,
HttpServletResponse httpservletresponse,
String s) throws ServletException, IOException {
RequestDispatcher requestdispatcher = getServletContext().getRequestDispatcher(s);
requestdispatcher.forward(httpservletrequest, httpservletresponse);

protected void checkSession(HttpServletRequest httpservletrequest,
throws specSessionException, specHttpSessionException {
try {
specSession ssession = null;
if(httpservletrequest.getSession() == null)
throw new specHttpSessionException();
ssession = getspecSession(httpservletrequest);
if(ssession == null)
throw new specSessionException();
catch(IllegalStateException illegal1) {
throw new specSessionException(illegal1.getMessage());

protected specSession getspecSession(HttpServletRequest httpservletrequest) {
HttpSession httpsession = null;
try {
httpsession = httpservletrequest.getSession();
catch(Exception exception) {
System.out.println(“SESSION ERROR: getSession(): ” + exception.getMessage());
if(httpsession == null) return null;
Object obj = null;
try {
obj = httpsession.getValue(“theSession”);
catch(Exception exception1) {
System.out.println(“SESSION ERROR: getValue(): ” + exception1.getMessage());
if(obj instanceof specSession)
return (specSession)obj;
else return null;

protected void setspecSession(specSession ssession, HttpServletRequest httpservletrequest) {
HttpSession httpsession = httpservletrequest.getSession();
httpsession.putValue(“theSession”, ssession);


September 4, 2004 Posted by | Servlets & JSP | Leave a comment

Java Tutorials


Exadel Java Topics

JDO, Struts, Java 1.5 etc.

September 1, 2004 Posted by | Hibernate & ORM, J2EE, JDO, Struts | Leave a comment


I am learning struts now. Reading the book Struts in action by Ted Husted. [ppt]

I am a little late to the Struts party, but it is a MVC like architecture.

Here is a nice overview on it.

Example workflow

Here is a tutorial by IBM

With WSAD 5

Struts install

JUG presentation
example with hibernate

J2ee masslight
J2ee masslight Forms Processing

java pro

Struts Howto with Tomcat
Best Practices

September 1, 2004 Posted by | Struts | Leave a comment