Monday, April 10, 2006

How to deploy a web application based on Struts 1.2, Spring 1.2 and Hibernate 3 on Geronimo 1.0?

As with all web deployment, we need a web.xml and a container specific deployment descriptor in which we specify the resources, references etc.

Below is myapplication 's 'geronimo-web.xml' for geronimo 1.0.


org.springframework



antlr


/amstooldemo
false



jdbc/amsDBtest2
geronimo.server
geronimo
null
user/database-pool-amsds/1/car
JCAManagedConnectionFactory
amsds


Why hide the Springframework classes?
Since geronimo has deployed a different version of Spring to its server classpath, and its visible from my web application which has a conflict with myapplication Spring version. Therefore, we need to hide the Springframework classes from myapplication and use the Spring classes from myapplication's WEB-INF/lib.

Why hide the Antlr classes?
Similar to spring jar files, ANTLR classes are deployed in geronimo. Since Hibernate uses different version, we need to hide the ANTLR classes from myapplication.

What and why is false ?
This is geronimo's way to specify the classloader to stick to the J2EE specs or not. If false, dont stick to J2EE specs, if yes, stick to specs.

Here I have specified false, which means this application as its may fail to deploy in another web container without modification. The only advantage I see is we can reduce the jar files in myapplication. But there is a major disadvantage, i.e myapplication are dependent on servers classes and myapplication is not isolated. In a production environment where you have many web application using different versions framework will be better off sticking the J2EE specs, ie set to true and include all jars into WEB-INF/lib to isolate your application from others. I set the context-priority-classloader to true but myapplication had failed deploy in geronimo. I think there are some issues in this area with geronimo.

How to link datasources from web.xml?
Use the as shown above. I have done it this way to allow my application to look for datasource within the application and in server's context.

Hope all this makes sense. Please let me know if there are any errors.
PS. It seems blogspot does not accept xml as it is. If anyone needs the geronimo.xml, put a comment with your email.


Friday, March 10, 2006

Software Development Life Cycle

Software Development Life Cycle @ Non-fosys and every where else....









More of my family photos
















Here are some more photos of my daughters and family.

My Dog Snoopy


Guess how old is this guy? He is trying to take a bite at me while photographing him.

Colleauges from SITA SAP






Hey look who is this? Future Non-fosys team photo. Haha!
















This is a photo from my office window, you can see a lake called 'Lotus Pond', you can also see my very small car.

Me and my colleagues at SAP FKOM







Hey Guys, these are my colleauges from SAP FKOM.
From left to right: William, Myself, Lakshmi, Chimoy

My two beautiful daughters



These are my daughters Maria and Leah

This page is powered by Blogger. Isn't yours?