DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30561>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30561

NamingService doesn't correctly start/stop 

           Summary: NamingService doesn't correctly start/stop
           Product: Tomcat 5
           Version: 5.0.27
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


1/ When you start the NamingService for the first time, with no
Context.INITIAL_CONTEXT_FACTORY property, everything works fine. The default
value is null.

2/ When you stop the NamingService, the property is then "", and not null.

3/ If you want to restart the NamingService, the "oldValue" isn't null and so
it's used. So, the NamingService doesn't start.

This is my solution, in the start method:

oldValue = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
if (oldValue != null >>>>>>>> && oldValue.length() > 0 <<<<<<<<<) {
   oldIcValue = oldValue;
} else {
   System.setProperty(Context.INITIAL_CONTEXT_FACTORY, Constants.Package 
     + ".java.javaURLContextFactory");
}

Now, when you start + stop + start the NamingService, the service works fine.


Frederic

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to