dynamical class loading

2005-10-12 Thread dumbQuestionsAsker _

can somone give me an information?
I want to know if it is possible to past and load classes into 
web-inf/classes path without beeing forced to reload the whole webapp ?


_
10 Mo pour vos pièces jointes avec MSN Hotmail ! 
http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR



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



RE: dynamical class loading

2005-10-12 Thread Allistair Crossley
this is a complex answer that *probably* only the Tomcat devs can answer of 
someone knowledgable about the JVM and class loaders, so don't expect too many 
users to answer. 

i believe from my limited knowledge that you cannot reload single classes in a 
tomcat web application as a whole class loader is associated with a web 
application. i believe the problem is more to do with the JVM although I 
*believe* WebLogic manages it. perhaps if a dev has time to explain they will.

Allistair.

 -Original Message-
 From: dumbQuestionsAsker _ [mailto:[EMAIL PROTECTED]
 Sent: 12 October 2005 09:11
 To: tomcat-user@jakarta.apache.org
 Subject: dynamical class loading
 
 
 can somone give me an information?
 I want to know if it is possible to past and load classes into 
 web-inf/classes path without beeing forced to reload the 
 whole webapp ?
 
 _
 10 Mo pour vos pièces jointes avec MSN Hotmail ! 
 http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: dynamical class loading

2005-10-12 Thread dumbQuestionsAsker _

Thank you for your answer.
You told me that it has more to deal with JVM, I tried using a 
URLClassLoader unsuccessfully, that's why I asked.


Have a nice day(or night).
@++


From: Allistair Crossley [EMAIL PROTECTED]
Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
To: Tomcat Users List tomcat-user@jakarta.apache.org
Subject: RE: dynamical class loading
Date: Wed, 12 Oct 2005 09:16:12 +0100

this is a complex answer that *probably* only the Tomcat devs can answer of 
someone knowledgable about the JVM and class loaders, so don't expect too 
many users to answer.


i believe from my limited knowledge that you cannot reload single classes 
in a tomcat web application as a whole class loader is associated with a 
web application. i believe the problem is more to do with the JVM although 
I *believe* WebLogic manages it. perhaps if a dev has time to explain they 
will.


Allistair.

 -Original Message-
 From: dumbQuestionsAsker _ [mailto:[EMAIL PROTECTED]
 Sent: 12 October 2005 09:11
 To: tomcat-user@jakarta.apache.org
 Subject: dynamical class loading


 can somone give me an information?
 I want to know if it is possible to past and load classes into
 web-inf/classes path without beeing forced to reload the
 whole webapp ?

 _
 10 Mo pour vos pièces jointes avec MSN Hotmail !
 http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR


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




FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK
Disclaimer:  The information contained within this e-mail is confidential 
and may be privileged. This email is intended solely for the named 
recipient only; if you are not authorised you must not disclose, copy, 
distribute, or retain this message or any part of it. If you have received 
this message in error please contact the sender at once so that we may take 
the appropriate action and avoid troubling you further.  Any views 
expressed in this message are those of the individual sender.  QAS Limited 
has the right lawfully to record, monitor and inspect messages between its 
employees and any third party.  Your messages shall be subject to such 
lawful supervision as QAS Limited deems to be necessary in order to protect 
its information, its interests and its reputation.


Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.

/FONT


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



_
Une chance par jour de gagner un voyage au soleil avec Magic Search ! 
http://www.magicsearch.fr



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



Re: dynamical class loading

2005-10-12 Thread David Delbecq
Hi,

I used dynamic class reloading on a commercial J2EE server and, believe me,
it brings far more problems than it solves.

First, when you dynamically reload a class here is what can happen:

webapp start under classloader instance x
webapp instanciate class A and store in session
session.setAttribute(someKey,someA)
class A has changed on disk, classloader reload it using a special class
loader
and marking this class to be handled by this new classloader (y)

now this code
A someA = (A)session.getAttribute(someKey)
will through a ClassCastException because
A.getClass() != session.getAttribute(someKey).getClass()
while
A.getClass().getName().equals(session.getAttribute(someKey).getClass().getName())

is true :)

All code involving static method/static variables is subject to such
breakdown.
More funny, you can end up in some condition instanciating old version
of classes.

Thrust me, when dynamically classloading, half of code breaks like this
most of time,
sometimes silently, and you end up crazy, trying to debug a code which
in fact is
not bugged.

If your webapp is particulary slow to start and you need faster
development, better take a look at unit testing
of deactivate parts of your webapp when debugging!

dumbQuestionsAsker _ a écrit :

 can somone give me an information?
 I want to know if it is possible to past and load classes into
 web-inf/classes path without beeing forced to reload the whole webapp ?

 _
 10 Mo pour vos pièces jointes avec MSN Hotmail !
 http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR


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



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



RE: dynamical class loading

2005-10-12 Thread Allistair Crossley
 Thrust me, when dynamically classloading, half of code breaks 
  ^^
*rotfl* this has made my afternoon


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



Re: dynamical class loading

2005-10-12 Thread David Delbecq
Allistair Crossley a écrit :

Thrust me, when dynamically classloading, half of code breaks 


  ^^
*rotfl* this has made my afternoon


  

Nice one indeed :D

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