javax.naming.NameNotFoundException: Name Pack322 is not bound in this Context

2004-08-12 Thread Sherman Mohler
I am trying to declare a unique (text based) realm for one of  my 
webapps. The XML in /conf/Catalina/localhost/cubscout.xml looks like this:

---
Context path=/cubscouts docBase=Cub
   Resource name=Pack322Database auth=Container
 type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
   /Resource
   ResourceParams name=Pack322Database
 parameter
   namefactory/name
   valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
 /parameter
 parameter
   namepathname/name
   valueconf/pack322-users.xml/value
 /parameter
   /ResourceParams
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
debug=0 resourceName=Pack322Database/
/Context
-
I get the startup error: javax.naming.NameNotFoundException: Name 
Pack322Database is not bound in this Context

It is worth noting that when I move the Resource into the server.xml 
as a GlobalNamingResources element everything works.

Any suggestions would be greatly appreciated.  

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


Re: Why tomcat NT service get killed when the user log off

2000-11-19 Thread Sherman Mohler

You say this is a problem with Java 1.3. Will Java 1.2 work correctly ? I am
about to install and start testing TomCat, and was about to use 1.3 ...

Regards,

-- Sherman Mohler


Nacho wrote:

 Brett can you contributeyour solution to this problem tojakarta??

 or at least send me thesources or binaries :-) is the better  more
 elegant solution to this problem i've seen,

 if you can contribute this i'll be glad to commit it to tomcat 3.3 and
 4.0

 of course giving you credits as the rules mandate ;-)

 Saludos ,
 Ignacio J. Ortega

 -Mensaje original-
 De: Brett Bergquist [mailto:[EMAIL PROTECTED]]
 Enviado el: jueves 16 de noviembre de 2000 1:01
 Para: [EMAIL PROTECTED]
 Asunto: RE: Why tomcat NT service get killed when the user log off

 Zhiping, even though jk_nt_service is being used to launch Tomcat, there
 is a bug in the Java 1.3 runtime under Windows that causes any java.exe
 process to be terminated when the user logs off. The bug is that a
 console control handler is setup inside of the java runtime that detects
 the CTRL_LOGOFF_EVENT that is sent by Windows to each process when the
 user logs off and the handler inside of Java 1.3 is terminating the
 process when this occurs. This is the correct operation for a normal
 application running but not the correct one for a service.

 There is a couple of packages around, one being located at
 http://www.kcmultimedia.com/javaserv another at
 http://www.eworksmart.com/jnt that handle the CTRL_LOGOFF_EVENT. I tried
 a couple of these and while I found that they indeed to stop the
 application from being terminated by the CTRL_LOGOFF_EVENT, I found that
 they interferred with the normal shutdown of Tomcat. That is, using
 these packages, I was not able to shutdown Tomcat cleanly, which caused
 the servlets to not have their "destroy" method invoked.

 The reason that this occurs is because the way that these packages work
 is that they invoke the Java VM using the JNI interface. When Tomcat is
 to be shutdown, the same JNI interface is used to invoke a shutdown
 method. The problem occurs because the way that Tomcat (3.x) is shutdown
 is by using the APJ interface to send the existing Tomcat instance a APJ
 shutdown message (through a TCP connection in fact). These packages send
 the APJ message using the JNI interface, but when call returns, they
 assume that Tomcat is ready to be shutdown and they then tear down the
 Java VM running the Tomcat process. In reality, the Tomcat process has
 not yet received the APJ message through its socket interface and as
 such has not shutdown cleanly and does not give the servlets a chance to
 have their "destroy" method called.

 Because my application needs to have the servlet's "destroy" method
 called when Tomcat shuts down, I solved this problem by using the source
 to "java.exe" launcher as a starting point and then modified it to
 install a console control handler that ignores the CTRL_LOGOFF_EVENT. I
 called this new launcher "javaex.exe". I then used jk_nt_service and
 changed the configuration file references of "java.exe" to "javaex.exe".

 I hope this helps.

 -Original Message-
 From: Zhiping Wei [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 15, 2000 5:38 PM
 To: '[EMAIL PROTECTED]'
 Subject: Why tomcat NT service get killed when the user log off

 Please Help!!!
 This is for tomcat 3.2 beta 7 on Windows NT/2000. Tomcat is registed as
 an NT service using 'jk_nt_service.exe' (under Systemlocal account).
 It's starts fine but if I log off the windows, tomcat get killed which
 is not suppose to be. Could anybody tell me why this happen and how to
 fix it.
 -- Zhiping (ext: 307)




Multiple IIS redirectors for SSL/non SSL Servlets

2000-11-19 Thread Sherman Mohler

I would like to somehow map TomCat to IIS more than once, so that I can have
one virtual directory that I can put "require secure channel" (for credit
cards) and another for normal processing (for performance). I have searched
the archives, and while I have seen several similar requests but no
solutions. I have tried to map the "jakarta" directory in muliple times
under other virtual directories (e.g. /secured/examples/... v.s
/unsecures/examples/...) but this didn't work.

Any suggestions?  Thanks!

-- Sherman Mohler