dev@glassfish.java.net

[Asking]About META-INF/hk2-locator/default

From: Tang Yong <tangyong_at_cn.fujitsu.com>
Date: Thu, 25 Apr 2013 12:41:11 +0900

Hi JWells,
CC: Sahoo,

I have two questions about META-INF/hk2-locator/default file,
eg. for web-glue.jar,

1. in the default file, whether containing metadata generated by
@Inject? That is to say, if some class in web-glue module defines the
following,

@Inject
private JCDIService jcdiService;

Then, whether generating @Inject related info(JCDIService,...) into
META-INF/hk2-locator/default.

As far as I know, I found META-INF/hk2-locator/default seems to only
write @Service related info.

2. in web-glue.jar's META-INF/hk2-locator/default file, the following,

...
[com.sun.enterprise.web.PEWebContainerFeatureFactoryImpl]S
contract={com.sun.enterprise.web.pluggable.WebContainerFeatureFactory}
name=pe

[com.sun.enterprise.web.ServerConfigLookup]
...

1) whether "S" in
[com.sun.enterprise.web.PEWebContainerFeatureFactoryImpl]S means the
entry is @Service info?

2) [com.sun.enterprise.web.ServerConfigLookup] entry has not "S", I want
to know the meaning?

Finally, if META-INF/hk2-locator/default file does not generate @Inject
info, I wish that @Inject info can be added into the file because on
some scenes, I need to introspect glassfish modules(class file) to find
@Inject info, if the @Inject info can be added into
META-INF/hk2-locator/default file, that will avoid redundant things by
pasing the file directly.

Thanks
--Tang

-- 
−−−−−−−−−−−−−−−−−−−−−−
Tang Yong
Senior Engineer
Glassfish Team Developer(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              
−−−−−−−−−−−−−−−−−−−−−−