M
mj.kelleher
I have 2 separate Web applications that load the exact same JAR file
JF1 - which contains class X.
I am running Tomcat ver 5.0.28 with JDK 1.4.03
I also have an in-memory Object cache that is available to both WebApp
A and WebApp B. That is, the one instance of this cache is available
to both applications.
Web Application A loads this JAR file JF1, creates an instance of X and
puts this instance into the cache.
WebApplication B starts up, and loads this JAR file JF1, then after
startup is finished, retrieves the instance of class X via the method:
'public Object getInstance(final String sKey)'
When WebApp B tries to cast this Object back to an instance of class X,
I get a ClassCastException. I do a System.out.println of
'obj.getClass().getName()' on the Object and it is in fact an instance
of Class X. Altho the JVM is not recognizing it as such.
Both Web Applications use the same exact JAR file JF1 (a 3rd party JAR
file).
Does anyone have any ideas how to overcome this problem?
The way the applications are constructed, I cannot simply take JAR file
JF1 and drop it into shared/lib because one of the Web Applications is
un-modifiable to me, and I doubt my sys-admin would agree to the
change.
JF1 - which contains class X.
I am running Tomcat ver 5.0.28 with JDK 1.4.03
I also have an in-memory Object cache that is available to both WebApp
A and WebApp B. That is, the one instance of this cache is available
to both applications.
Web Application A loads this JAR file JF1, creates an instance of X and
puts this instance into the cache.
WebApplication B starts up, and loads this JAR file JF1, then after
startup is finished, retrieves the instance of class X via the method:
'public Object getInstance(final String sKey)'
When WebApp B tries to cast this Object back to an instance of class X,
I get a ClassCastException. I do a System.out.println of
'obj.getClass().getName()' on the Object and it is in fact an instance
of Class X. Altho the JVM is not recognizing it as such.
Both Web Applications use the same exact JAR file JF1 (a 3rd party JAR
file).
Does anyone have any ideas how to overcome this problem?
The way the applications are constructed, I cannot simply take JAR file
JF1 and drop it into shared/lib because one of the Web Applications is
un-modifiable to me, and I doubt my sys-admin would agree to the
change.