Arun Gupta, Miles to go ...

Arun Gupta is a technology enthusiast, a passionate runner, and a community guy who works for Sun Microsystems.
« Previous day (Jul 21, 2007) | Main | Next day (Jul 23, 2007) »

http://blogs.sun.com/arungupta/date/20070722 Sunday July 22, 2007

Metro on Tomcat 6.x

Rama described how to run JAX-WS samples with Tomcat 6.x. JAX-WS is part of Metro - the Web services stack in GlassFish. Another key component of Metro is WSIT (aka Project Tango) that provides Secure, Reliable, Transactional and Interoperable Web service. Read more about Project Tango in this 26-page article.

A stable version of Metro is integrated in GlassFish V2 and the latest nightlies of stand-alone bundle are also available. The stand-alone bundle comes with an install scipt (wsit-on-tomcat.xml) that allows it install on Tomcat 5.x. I followed the steps in Rama's blog to install Metro on Tomcat 6.x. But first, a little bit of explanation and then the actual code fragments.

Tomcat's classloading mechanism has changed slightly between 5.x and 6.x. The first change is that Tomcat 5.x used to have shared/lib directory to share classes across all web applications. This directory in turn used to be specified as value of shared.loader property in  conf/catalina.properties. In Tomcat 6.x, the property still exists but it's value is set to nothing and shared/lib directory no longer exists in the default installation. I see the motivation behind this change as it keeps the Tomcat installation directory clean and any shared resources can still be specified in conf/catalina.properties. But this means that wsit-on-tomcat.xml script, that copies the files in shared/lib directory, will work on Tomcat 5.x only. In order for this script to work on Tomcat 6.x, the value of shared.loader property need to be changed to include Metro jars.

Now, the code fragments! The value of shared.loader property in Tomcat 5.x is:

shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

And in Tomcat 6.x is the value of this property is:

shared.loader=

If Metro is installed in c:\metro then changing its value to:

shared.loader=file:///c:/metro/lib/*.jar

will enable Tomcat 6.x to host Secure, Reliable, Transactional and .NET 3.0-Interoperable Web services. And this mechanism will work for Tomcat 5.x too, so changing the value of this property in Tomcat 5.x installation to:

shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar,file:///c:/metro/lib/*.jar

instead of copying the files in shared/lib will be sufficient as well.

The second change in Tomcat's classloading mechanism is required if you are using Java SE 6. Tomcat 5.x used to have common/endorsed directory which no longer exists in Tomcat 6.x. Java SE 6 is bundled with JAX-WS 2.0 and Metro needs JAX-WS 2.1. So if you are using Java SE 6 then copy webservices-api.jar in c:/jdk6/jre/lib/endorsed directory. Read Endorsed Directory Mechanism for more details.

Several screencasts are available that show how to develop Secure, Reliable and Transactional and Interoperable Web service. All the screencasts use NetBeans IDE but if you are more of a command-line user then follow this entry that shows how to develop a reliable endpoint and invoke it from WCF and vice versa.

Technorati: metro webservices wsit jax-ws glassfish tomcat

del.icio.us | furl | simpy | slashdot | technorati | digg |
|

Week 23 - Improved PR on Rancho by > 2 minutes

Mon: Rest
Tue: 3.5 miles
Wed: Rest
Thu: 7 miles
Fri: Rest
Sat: Rest
Sun: 9 miles

Last week before the race and I improved my PR on Rancho PG&E by more than 2 minutes. The first parking lot was full even at 7:10am. Anyway, I mostly ran uphill with a total of 45:10 (2:14 better) and a total of 1:14:13 (2:52 better) after stopping at the main parking lot. I'm feeling good but am traveling this week so lets hope everything stays on course!

Here are good reads of this time:

  • Peanut Butter - A Great Runners Food - Packed with vitamin E, niacin, folic acid, protein, fiber and monounsaturated ("good") fats, peanut butter just might be the best runner's food on the planet.
  • Eat Smart on the Road - Whether you're driving cross-country or just to a nearby state for a race weekend, these five tips will help you eat right along the way.
  • Try a 'Three-Lap' Workout - Running 1200's (three times around the track) is a great, often-overlooked way to boost your aerobic capacity. Start with these five workouts.
  • Strength Train in Sun (with video) - Outdoor circuit workouts, or sessions that alternate running and resistance exercises, are a perfect way to build strength.
With a 5:30am start wave on 7/29, it's exactly less than 7 days for my race to finish!

Technorati: running fitness runninglog

del.icio.us | furl | simpy | slashdot | technorati | digg |
|
« Previous day (Jul 21, 2007) | Main | Next day (Jul 23, 2007) »

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.