[jbosscache-dev] PojoCache annotations and marker interfaces

Brian Stansberry brian.stansberry at jboss.com
Fri Feb 2 17:27:01 EST 2007


FYI on a issue related to the 2 different jar versions:

Starting in 1.4.0 when the 2 jar versions appeared, we (aka me) began
checking both versions of the jar into the relevant release's lib dir in
repository.jboss.com.  This was not correct -- by doing that I put both
jars on the AS build classpath. The build would only copy
jboss-cache.jar into the AS distribution, but both would be on the
classpath during build.

4.2 is JDK 5 based, so now jboss-cache-jdk50.jar is pulled into the
distro. The other shouldn't be on the classpath during build, as having
it there masks errors. Unfortunately, AFAICT the only way to not have it
be on the classpath is to not have it in the repository.  So, beginning
with 1.4.1.SP1 I'm not going to put the jboss-cache.jar in the
repository anymore.

This is cleaned up in 2.0 where the PojoCache and standard cache stuff
are in separate jars. No more having two jars with the same stuff except
a few differences. :)

jbosscache-dev-bounces at lists.jboss.org wrote:
> Kabir Khan wrote:
>> At the AOP-level, the flavour of JBoss AOP deployed determines if we
>> look for annotationc'ed interfaces (jdk 1.4), or real annotations
>> (jdk 5), so there is not a lot that can be done in this regard at
>> present... 
>> 
> 
> I'm not sure I follow. In the 4.2 testsuite I had a
> jboss-aop.xml that included prepare expressions and
> SubjectImpl mixin introductions with pointcuts for both
> @org.jboss.cache.aop.AopMarker (the marker interface) and
> @org.jboss.cache.aop.annotation.PojoCacheable annotations.
> Different test classes used each approach. For the classes
> that used the marker interfaces, I first used annotationc.
> Then aopc was run against all the classes.
> 
> This all worked fine until I found that the AS build had both
> flavors of jboss-cache.jar on the classpath. When I fixed
> that, then annotationc failed because the marker interfaces
> weren't on the classpath anymore.
> But when all the classes were there, it all worked fine.
> 
>> If you have some suggestions for aopc, please send them my way :-)
>> I've been thinking of tidying it up before we get AOP 2.0.0.GA out
>> 
> 
> Sure; will do. Sorry for the rant. The missing classes thing pissed me
> off and aopc got some spillover venom.
> 
> - Brian
> 
>>> -----Original Message-----
>>> From: jbosscache-dev-bounces at lists.jboss.org
>>> [mailto:jbosscache-dev-bounces at lists.jboss.org] On Behalf Of Brian
>>> Stansberry Sent: 02 February 2007 20:24
>>> To: jbosscache-dev at lists.jboss.org
>>> Subject: [jbosscache-dev] PojoCache annotations and marker
>>> interfaces 
>>> 
>>> I see that in 1.4.x, we have this lovely situation:
>>> 
>>> jboss-cache.jar includes the o.j.c.aop.(InstanceOf)AopMarker marker
>>> interfaces. jboss-cache-jdk5.jar also includes the
>>> o.j.c.aop.annotation.(InstanceOf)AopMarker annotations, but does not
>>> include the marker interfaces.
>>> 
>>> Thus, in AS 4.2, if I want to support both annotation styles for
>>> FIELD granularity replication, there is no JBC jar that I can
>>> integrate to allow it. I'd like to support both, since it seems user
>>> friendly to support the different methods the PojoCache examples
>>> use. (Note: we're deprecating the redundant
>> o.j.web.tomcat.tc5.session.AopMarker marker
>>> interfaces, so good support of the standard PojoCache markers is
>>> even more important.) 
>>> 
>>> If 1.4.1.SP1 isn't in QA yet (I saw another fix this AM) can we fix
>>> this? I see no reason not to include the marker interfaces in the
>>> jboss-cache-jdk5.jar. It's not like they don't work in JDK 5 or
>>> something. 
>>> 
>>> This isn't critical, but this whole area is really user unfriendly
>>> (don't get me started on the atrocious aopc) and doing what we can
>>> to make it easier is a good thing.




More information about the jbosscache-dev mailing list