[ krysalis-Feature Requests-823241 ] version aware classloader

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.krysalis.devel
Message-ID <[email protected]>
Feature Requests item #823241, was opened at 2003-10-14 06:51
Message generated for change (Comment added) made by tbee
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=423518&aid=823241&group_id=36516

Category: version
Group: None
Status: Closed
Resolution: Out of Date
Priority: 5
Submitted By: Tom Eugelink (tbee)
Assigned to: Adam Jack (arb_jack)
Summary: version aware classloader

Initial Comment:
Ok, I think Krysalis Version is a good idea, but as I 
understand it, it helps finding the problem, not solving it. 

At this time I do not quite understand why it seemingly 
is not possible to write a classloader that (like DotNet) 
will load classes only from a JAR that fulfills version 
rules. So version conflicts in JARs are prevented.

Is there an explanation or has just nobody tried?

Tom



----------------------------------------------------------------------

>Comment By: Tom Eugelink (tbee)
Date: 2004-07-20 05:35

Message:
Logged In: YES 
user_id=26442

Yessss. Interesting, but I cannot seem to get a handle on it. 
There are constraint files, but how are they "used"? I'm 
missing the actual what-does-it-do documentation, there is 
more than enough about how-to-version. Time to experiment. 
Source code download only, I guess.

----------------------------------------------------------------------

Comment By: Tom Eugelink (tbee)
Date: 2004-07-19 19:49

Message:
Logged In: YES 
user_id=26442

correction... hmmmm, maybe I do...

----------------------------------------------------------------------

Comment By: Tom Eugelink (tbee)
Date: 2004-07-19 19:49

Message:
Logged In: YES 
user_id=26442

Could you possibly elaborate a bit? Found depot, but I do not 
quite see what you mean. Thanks!

----------------------------------------------------------------------

Comment By: Nick Chalko (chalko)
Date: 2004-07-19 18:45

Message:
Logged In: YES 
user_id=27898

See Apache Depot

----------------------------------------------------------------------

Comment By: Tom Eugelink (tbee)
Date: 2003-10-15 05:38

Message:
Logged In: YES 
user_id=26442

Nope, it is not what I meant. You suggestion involves 
resources, I'm talking classes. An example might clarify.

Suppose you use log4j version 1.1.3 in an older subproject 
and 1.2.8 in a newer subproject. Assume that the step from 
1.1.x to 1.2.x involved some kind of major change. Both 
subprojects are to be used in a new product you're 
developing. 

Using Krysalis Version you can determine the version each 
subproject is using, however...

The new project must include both log4j jar files. But that 
won't work, since the classloader will simply load from the 
first jar it finds in the classpath. So one of the subproject will 
have to deal with a log4j JAR that will not have the correct 
version.

Now, DotNet allows you to specify in an assembly (similar to 
a jar file) which versions of other jars files it uses. So if a 
class comes from assembly A and requires another assembly B 
with version 1.1.3, the classloaders will take care that the 
appropriate classes are loaded. Another assembly B might 
specify it requires 1.2.8 and the classloaders will load those 
classes for that assembly. Basically log4j would initialize twice.

If Krysalis can determine version and classloader in Java do 
the most complex things, why hasn't Sun developed a 
classloader that solves this problem? It severely limits 
modularisation.

----------------------------------------------------------------------

Comment By: Adam Jack (arb_jack)
Date: 2003-10-14 21:50

Message:
Logged In: YES 
user_id=695675

Not quite what you are asking about, but have you seen:

http://www.krysalis.org/ruper/

It is a step in that direction. 

Thoughts?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=423518&aid=823241&group_id=36516


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.