dev@glassfish.java.net

Re: debugging ClassNotFoundException runtime exception in hk2/OSGi?

From: Richard S. Hall <heavy_at_ungoverned.org>
Date: Wed, 30 Jun 2010 11:04:57 -0400

On 6/30/10 10:54, Bobby Bissett wrote:
> On Jun 30, 2010, at 10:45 AM, Richard S. Hall wrote:
>>> Is there some requirement that two modules can't export the same
>>> package?
>>
>> No.
>
> Thanks, that's a good data point. I see warnings about it in my maven
> output now, so I think I'm not doing it correctly. Rather than decide
> that today is the day I'll finally understand OSGi, we're going to
> move that class back into the api package and break the impl-specific
> code into a new class in impl. Thus, no packages split across modules
> and hopefully OSGi will be happy.

Yes, split packages are a different story. You generally do not want to
split a single package across multiple bundles. This will generally
cause you difficulty, since importers of that package will only get to
see one "part", but not both, unless you explicitly use require-bundle
to reconstitute the whole package...pretty ugly stuff, so in general it
is better to avoid split packages.

-> richard

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>