[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Moving out of the UnifiedClassloaders
adrian@jboss.org
do-not-reply at jboss.com
Fri Jan 11 12:55:42 EST 2008
"scott.stark at jboss.org" wrote : "adrian at jboss.org" wrote :
| | We do have an interface,
| | ...
| | There was a previous discuss on this problem.
| | The issue is basically if we don't use the OSGi version then we have
| | to come up with some complicated code that handles comparisons between
| | the different implementations when doing compareTo().
| | ...
| | Of course, its probably not a real problem in practice since it is unlikely that
| | foo:1.0.0 uses a different version implementation to foo:1.0.1 or foo:2.0.0 :-)
| VersionRange could accept a Comparator to allow for externalization of the Version compareTo.
Ok. It would probably be better to change isInRange()
to accept a comparator and configure it somewhere in the classloader
setup.
But it's one of those N^2 problems in writing comparators between
all the different versions, e.g. our own, maven, osgi, java manifest, jdk7 module system, etc.
Less pluggable (do we know what all the possible parameters will be?),
but probably easier to manage/configure would be to write
some kind of complicated Version concrete class that can handle all the different versions
and always map the other versions into it.
By all the different parameters, I mean some versions take
major/minor/micro while others can take more numbers.
Some do numeric checks while others do alpha numeric checks on
parts of the version.
e.g. is 1.0.1.Final less than 1.0.10.Beta3?
The gotcha is . > 0 alpha numerically
similarly 1.0.1.Final < 1.0.1.RC1 :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119189#4119189
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119189
More information about the jboss-dev-forums
mailing list