On 19 Aug 2008, at 06:53, Bela Ban wrote:
First of all: I don't think there's a need to make 1.x
compatible
with 2.x and/or 3.x. The need is there to make 2.x compatible with
3.x.
I don't know about that. There are still a lot of people who are on
AS 4.x and who won't switch to AS 5.0 for a while to come. Which
means they will be stuck on 1.x APIs. See the forum link that sparked
off this thread.
Inline
Manik Surtani wrote:
> After a good nights' sleep and a fresh mind, I've had a rethink and
> have a potential solution. Tell me what you guys think, this will
> apply to both 3.x -> 2.x compat, 3.x -> 1.x compat and 3.x -> 2.x
> compat.
>
> 1. For each release, create a "namespace-safe" package. E.g., for
> 3.0.0, create jbosscache-core.jar as well as jbosscache-core-
> namespace-safe.jar. This would be constructed using jarjar, where
> org.jboss.cache.* is translated to org.jboss.cache.3.* (or
> org.jboss.cache.2.*).
One additional JAR ? -1. jarjar ? -1. That's -2 ...
This won't be in the distro. Jarjar is only needed by ant for the ant
task - I'm expecting an equivalent Maven plugin. So no extra jars in
the distro, although one extra plugin dependency for a full build.
Why a -1 for jarjar?
Sorry, but when I smell complexity, I turn negative... :-)
In relation to the other approach we were considering for an adapter
(use a separate classloader to load 3.x classes) I think this is
simpler. :-)
What about a single adapter, shipped with 3.x, which makes 3.x
compatible with 2.x ? I don't hope there will be a 4.x any time
soon, which break API compatibility again, so this should be a one-
time exercise.
We could but that would mean some sort of package renaming or class
renaming (e.g., o.j.c.Cache -> o.j.c.Cache3 or o.j.c.3.Cache) and
o.j.c.Cache remains 2.x compatible. Either way, very ugly for anyone
who wants to use 3.x APIs directly.
Specifically, interfaces that have changed include:
- Cache
- Fqn
- EvictionConfig
- Region/RegionManager
- EvictionAlgorithm
Cheers,
--
Manik Surtani
Lead, JBoss Cache
manik(a)jboss.org