Hello,

(environment: Windows 2000 and Windows NT 4 sp 6 with Unify ServletExec 3.0
and Sun's JDK 1.2.2_5)

We are deplyoing two web applications which use the same code for their
"backend" (almost everything but the JSP and image files), but we want to
keep them as separate self-contained products.  So for that goal we put
each package's copy of all .class files under its own WEB-INF/classes
directory.

We encountered two problems which I'm not sure if they are related or not:

1. Both packages use a locally writen small LockFile class which uses
   Win32 calls through JNI to lock files.  When one of the applications
   loads this class (as a result of access to one of its JSP interfaces)
   then the other application is accessed, the second application would
   fail to load its own copy of LockFile complaining that "the other
   application" already loaded this DLL.

   So I figured it treats the already-loaded LockFile class as "not the
   same" because it was loaded from a "foreign" classpath component, but
   fails on the DLL which IS the same file.  We got around this
   by putting a single copy of LockFile in ServletExec's global "classes"
   directory.

   The take-way I got from this is that the WEB-INF/classes of each web
   application is "private" to this application alone, which sounds
   reasonable to me.  Is this true?

2. The other problem we encountered yesterday is that we updated the
   .class files of one of the web applications (but not the other), and
   in the process changed a few method names.  This caused the un-updated
   web application to complain about missing methods.  Updating the JSP
   file to call the new method names from the classes directory of the
   updated web application fixed the problem.

So now we are confused - are the WEB-INF/classes directories of each web
application available to all web applications on the same servlet engine
or not?  How can I manage separate versions of class files for each
web application?

Either way, how do others tuckle deployment of multiple web applications
on a single servlet engine?  And what about use of JNI in servlets?

Thanks,

--Amos Shapira
WebCollage

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to