dev@glassfish.java.net

Re: About guava.jar in modules

From: Tang Yong <tangyong_at_cn.fujitsu.com>
Date: Tue, 24 Sep 2013 11:55:43 +0900

Thanks Pavel and JJ's reply very much!

Surely, Jersery 2 depends on guava 14.0.1.

If the ony two modules depend on guava, I want to continue to give my
viewpoints,

1) The ways that Jersey 2 and Weld depend on guava are different.
weld-osgi-bundle.jar embeds guava as inner class, instead, Jersey 2
directly depends on guava in pom.xml.

BTW: for weld-osgi-bundle 2.0.3.Final, it embeds guava 13.0.1.

2) based on 1), while Weld tries to load guava related classes, it will
not find guava from glassfish/modules, and it will use inner guava.
However, while jersery tries to load guava related classes, it will
import classes of guava bundle from glassfish/modules. Deeply, while
glassfish was started, guava bundle will be in resolved state,

...
  106|Installed | 1|GMS Module (4.0.1.b02)
  107|Active | 1|GMS Bootstrap Module (4.0.1.b02)
  108|Resolved | 1|Guava: Google Core Libraries for Java (14.0.0)
  109|Resolved | 1|GlassFish High Availability APIs and SPI (3.1.8)
...

So, I suggest that if possible, whether jersery can also embed guava as
inner class and remove guava bundle from glassfish/modules in order to
improve starting performance?

Thanks
Tang

Pavel Bucek wrote:
> Jersey 2 also depends on guava, so weld is not the only module.
>
> Regards,
> Pavel
>
> On 9/23/13 7:16 AM, JJ Snyder wrote:
>> Hey Tang,
>> Weld has a dependency on guava. I don't know if other modules have this
>> dependency too.
>>
>> JJ
>> On 09/23/2013 05:16 AM, Tang Yong wrote:
>>> Romain,
>>>
>>> I have found that guava.jar is in modules. So, I want to ask you or
>>> others to confirm the following:
>>>
>>> Whether there is only a module which depends on guava.jar or not?
>>>
>>> If being only a module, I suggest removing the bundle from modules,
>>> instead, embedding related classes of guava into the module liking
>>> weld-osgi-bundle, after all, placing guava.jar into modules maybe has an
>>> influence on GlassFish starting performance.
>>>
>>> Thanks
>>> Tang
>>>
>>
>
>
>

-- 
−−−−−−−−−−−−−−−−−−−−−−
Tang Yong
Senior Engineer
GlassFish Committer (OSGi & OSGi-JavaEE)
OSGi Alliance Supporter
Blog: http://osgizone.typepad.com/tangyong/
Nanjing Fujitsu NanDa Software Tec CO.,LTD
http://www.fujitsu.com/cn/fnst
Tel: +86-25-86630566-8310
Fax: +86-25-83317685              
−−−−−−−−−−−−−−−−−−−−−−