dev@glassfish.java.net

Re: Why is universal module not a HK2 module?

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Fri, 14 Mar 2008 18:04:35 -0700

Sahoo wrote:
> We should make every jar produced by us (including this universal jar) a
> module. As Jerome mentioned, making it a module not only leads to
> efficient class loading in HK2 environment, it is sometimes needed to
> avoid ClassCastException in a modular environment. AFAIK, every jar can
> be packaged as a HK2 module irrespective of whether it depends on HK2
> module system or not. There is *no* side effect. If it really does not
> depend on HK2 module system, then it won't have any static dependencies
> on HK2 APIs, but it will only have some HK2 manifest entries. When such
> a jar is used in a non-HK2 environment, the HK2 specific manifest
> entries are simply ignored by the runtime and it is used as a "Plain Old
> Jar." You can use the jar file in javac classpath without any issues.
> When it is indeed used in HK2 environment, HK2 module system would treat
> it as a module.
>
> So, why not turn universal.jar into a HK2 module? You don't have to do
> it, as I am taking care of such things in my workspace - all I need is
> an agreement from you.
>

If there are no side-effects, we should make this an HK2 module.

- Kedar