Re: MapListener update

2009-07-15 Thread Mark Thomas
> --- Original Message ---
> From: jim ma 
> To: Tomcat Users List 
> Sent: 15/07/09, 03:48:51
> Subject: MapListener update
> 
> Is this change to fix an issue ?

It is called *open* source for a reason. Did you look at the svn history for 
the file in question? The same info is available by searching the archives of 
the dev list.

Search the archives of this list and you might find a few useful hints too.

> Could you also point to me where can I find the Tomcat6.x document about
> difference with Tomcat5.x if there is ?

There is no such document. The best you'll get is the change log.

 for example architecture , execution
> etc.

Broadly, no fundamental difference. At the detail level, lots of changes, 
mainly bug fixes and improcements.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



MapListener update

2009-07-14 Thread jim ma
Hi ,

When I update my code for embedding tomcat 5.x to embedding 6.x, a null
pointer exception blocks me .
I dug the code , I found it cause by the
org.apache.catalina.connector.MapperListener difference :

Tomcat5.x
---
/**
 * Register host.
 */
private void registerHost(ObjectName objectName)
throws Exception {
String name=objectName.getKeyProperty("host");
if( name != null ) {
String[] aliases = (String[])
mBeanServer.invoke(objectName, "findAliases", null, null);
mapper.addHost(name, aliases, objectName);
if(log.isDebugEnabled())
log.debug(sm.getString
 ("mapperListener.registerHost", name, domain));

}
}

Tomcat6.x
-
/**
 * Register host.
 */
private void registerHost(ObjectName objectName)
throws Exception {
String name=objectName.getKeyProperty("host");
if( name != null ) {
Host host = (Host) ServerFactory.getServer().findService(
domain).getContainer().findChild(name);
String[] aliases = host.findAliases();
mapper.addHost(name, aliases, objectName);
host.addContainerListener(this);
if(log.isDebugEnabled())
log.debug(sm.getString
 ("mapperListener.registerHost", name, domain));

}
}


Is this change to fix an issue ? Or Tomcat6.x totally change the host name
looking up mechanism .
Could you also point to me where can I find the Tomcat6.x document about
difference with Tomcat5.x if there is ? for example architecture , execution
etc.

Thanks in advance .

Jim Ma