Raymond, thank you for the pointers.  I have made a little progress this
a.m. creating a new project -- starting from scratch.  Favorable result so
far -- maybe I'm off and running to find the problem I've generated.  I
will definitely check out your pointers as well.

Thanks much.


On Sat, Sep 17, 2022 at 8:35 AM Raymond Augé
<raymond.a...@liferay.com.invalid> wrote:

> My suspicion is that either:
> A) you have the "shared" bundle's activator in an exported package, and it
> is detected (from the classpath) as the activator (via an imported package)
> in every other bundle (less likely).
> B) every bundle that consumes the "shared" bundle dependency, is
> accidentally slurping in the activator (package) and detecting it as its
> own activator impl (more likely).
> A test you could try to discover what's happening is to print the bundle
> from the BundleContext passed to the activator `start(BundleContext)`
> method and also the classloader of the BundleActivator instance being
> called.
> System.out.println("=====> THE BUNDLE: " + bundleContext.getBundle());
> System.out.println("=====> THE CLASSLOADER: " +
> getClass().getClassLoader());
> We can take it from there.
> On Fri, Sep 16, 2022 at 7:13 PM Chuck Davis <cjgun...@gmail.com> wrote:
> > I am attempting to refactor a project into bundles which number 16
> > presently.  I have a "base" bundle that all others depend on.  The
> > activator of that bundle is getting called for every other bundle that
> gets
> > activated.  Is this to be expected?  It seems to me the framework should
> > only call the activator a single time.  I have been unsuccessful finding
> > the reason and it means I cannot do setup in the activator because it
> gets
> > called 15 times.  Any insight would be helpful.  Thanks.
> >
> --
> *Raymond Augé* (@rotty3000)
> Senior Software Architect *Liferay, Inc.* (@Liferay)
> OSGi Fellow, Java Champion

Reply via email to