You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Dudley <sc...@telesoft.com> on 2009/12/04 00:51:38 UTC

Tomcat 5 vs 6 Context useNaming Behavior

We have a legacy application that's been running on the 5.5.X versions 
for several years.  This application manipulates the JNDI context in 
such a manner that would now be considered "unusual".  In a nutshell, 
it's because the application framework was written concurrent with and 
prior to development of current standards.  The application instantiates 
the context, creates and binds it's own JDBC pool, etc. with no relevant 
edits to any of Tomcat's configuration files.

As long as useNaming is set to false for the <Context> in 5.5.X, this 
works splendidly.  In 6.0.20, no matter the setting (true/false), we get 
the same Exception as when useNaming is set to true in 5.5.X:

    javax.naming.NamingException: Name comp is not bound in this Context

Relevant snippet:

    System.setProperty("java.naming.factory.initial", 
"com.telesoft.naming.BasicInitCtxFactory");
    Context context = new InitialContext();
    context.rebind("java:comp/env/appName",this.appName);

Is there a known/related useNaming bug or have I missed some new 
configuration nugget?

Many thanks in advance.

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


Re: Tomcat 5 vs 6 Context useNaming Behavior

Posted by Scott Dudley <sc...@telesoft.com>.

Caldarale, Charles R wrote:
>> From: Scott Dudley [mailto:scott@telesoft.com]
>> Subject: Tomcat 5 vs 6 Context useNaming Behavior
>>
>> We have a legacy application that's been running on the 5.5.X versions
>> for several years.
>>     
>
> Under what JVM?  And platform?
>   
I've tested under both Windows (2000) and a couple of current Linux 
variants both running a current 1.6 VM - same behavior.  5.5.X works, 
6.X doesn't.
>   
>> The application instantiates the context, creates and binds 
>> it's own JDBC pool, etc. with no relevant edits to any of 
>> Tomcat's configuration files.
>>     
>
> What does it do with exceptions during the context instantiation?
>   
They're thrown and reported - er go the exception excerpt included in my 
post.
>   
>> In 6.0.20, no matter the setting (true/false), we get
>> the same Exception as when useNaming is set to true in 5.5.X:
>>     
>
> What JVM for 6.0.20?
>   
As mentioned earlier, current 1.6 release.
>   
>> Is there a known/related useNaming bug or have I missed some new
>> configuration nugget?
>>     
>
> Can't say.  Can you post your server.xml and relevant <Context> element?
>   
http://sdudley.com/files/server.xml
http://sdudley.com/files/accountaccess-dev.xml

You'll see we use a custom ClassLoader, FileDirContext, and 
LifecycleListener but like XML JNDI configuration, don't want to make 
them part of this conversation as they're not relevant.

I'm simply trying to find out why useNaming works in 5.5.X and not 6 and 
hoped someone was already aware of the answer.  In the meantime, I'm 
already looking through the source and doing some testing on my own.

Thanks.
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>   

-- 
Scott Dudley
Senior Developer

Telesoft Corp. | 3443 N. Central Ave., 18th Floor | Phoenix, AZ, 85012

*o:* (602) 308-1115* *| *f:* (602) 308-1300 | *w:* www.telesoft.com 
<http://www.telesoft.com/?utm_source=signature&utm_medium=email&utm_campaign=signature>

<http://www.telesoft.com/?utm_source=signature&utm_medium=email&utm_campaign=signature> 
<http://www.telesoft.com/sites/default/files/go/signature.html>


RE: Tomcat 5 vs 6 Context useNaming Behavior

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Scott Dudley [mailto:scott@telesoft.com]
> Subject: Tomcat 5 vs 6 Context useNaming Behavior
> 
> We have a legacy application that's been running on the 5.5.X versions
> for several years.

Under what JVM?  And platform?

> The application instantiates the context, creates and binds 
> it's own JDBC pool, etc. with no relevant edits to any of 
> Tomcat's configuration files.

What does it do with exceptions during the context instantiation?

> In 6.0.20, no matter the setting (true/false), we get
> the same Exception as when useNaming is set to true in 5.5.X:

What JVM for 6.0.20?

> Is there a known/related useNaming bug or have I missed some new
> configuration nugget?

Can't say.  Can you post your server.xml and relevant <Context> element?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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