dev@glassfish.java.net

Re: JSR250 - javax.annotation.Resouce class

From: Bhakti Mehta <Bhakti.Mehta_at_Sun.COM>
Date: Tue, 18 Aug 2009 13:48:29 -0700

Hong,
Please read inline

Hong Zhang wrote:
> Hi, Bhakti
>
> Thanks much for the suggestions!
>
>> You may have to add compiler args see jsr109-impl pom.xml where I
>> made similar changes to take care of jaxws 2.2 and not load jaxws 2.0
>> from jdk
>> Add bootclasspath so that newer jar with changes gets loaded before
>> the rt.jar
>
> I see. Is this the standard way of overriding classes from JDK at
> build time?
>
Yes
>> Also for runtime I have webservices-api-osgi in modules/endorsed
>> maybe the same needs to be done for jsr250
>
> What does it take to put the two jars into the modules/endorsed dir?
> What pom.xml files did you have to change and is there any packager
> changes that Snjezana needs to make?
We have jaxb 2.2 classes which need to be overridden too hence two jars.
Snjezana had suggested to me how to get the jars to modules/endorsed so
she should know how to do with jsr250 too.
>
> So there is already logic at runtime to load any class in the
> modules/endorsed before the JDK classes?
>
In the server side osgi loads the classes from the jars in modules
before rt.jar anyways so nothing else needs to be done.
Atleast for clients we need to set the endorsed dirs so either we can
set to modules/endorsed folder (if they exist on same machine) else
clients can copy the jars from modules/endorsed to jre/lib/endorsed and
that would work too

Regards,
Bhakti
> Thanks,
>
> - Hong
>
>>
>> Hong Zhang wrote:
>>
>>> Hi, Rajiv
>>> When I was trying to compile my changes against the
>>> javax.annotation.Resource class, I found the compiler could not find
>>> the new method "lookup" that you have added to the Resource class in
>>> the v3/javaee-api/javax.annotation module. When talking to Tim about
>>> the mystery, he reminded me there is also a
>>> javax.annotation.Resource class from JDK and the compiler must be
>>> seeing the version from JDK.
>>> How do we solve this problem, at both build time and run time?
>>> I am Ccing dev alias to see if other people have any ideas.
>>>
>>> Thanks,
>>>
>>> - Hong
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>