Ok so weaving is limited to r6.. not good news. I'm working on the JSP case. But I'm going to look at the equinox jsp bundles to see if that can work for us.
Thanks, - Ray On Mon, Jun 9, 2014 at 10:36 AM, Thomas Watson <[email protected]> wrote: > By wire admin I assume you don't really mean the WireAdmin service [1]. > That service is completely on top of the framework and not related to > bundle wiring. > > Here I assume you mean the bundle wiring API [2]. First I will tell you > how it can be done, but then I want you to give the reason you need to do > this, because there likely is a better way to accomplish what you need. > > The only way you can dynamically add package imports is to use a > WeavingHook [3]. For each bundle class load your WeavingHook.weave method > will be called with a WovenClass object. The WovenClass object has a > method getDynamicImports [5] that allows a hook to add more dynamic imports > to the bundle as needed. The intended purpose of this method is to allow a > weaving hook to add more package imports that may be needed by the code > that is being woven into the class. But you obviously can choose to do it > for any other reason you want to. Keep in mind the dynamic imports added > by weaving hooks are not persistent and have to be redone each time a new > class loader is created for the bundle (i.e. on framework restart or bundle > refresh). > > Tom > > [1] > http://www.osgi.org/javadoc/r5/cmpn/org/osgi/service/wireadmin/package-summary.html > [2] > http://www.osgi.org/javadoc/r6/core/org/osgi/framework/wiring/package-summary.html > [3] > http://www.osgi.org/javadoc/r6/core/org/osgi/framework/hooks/weaving/WeavingHook.html > [4] > http://www.osgi.org/javadoc/r6/core/org/osgi/framework/hooks/weaving/WeavingHook.html#weave(org.osgi.framework.hooks.weaving.WovenClass) > [5] > http://www.osgi.org/javadoc/r6/core/org/osgi/framework/hooks/weaving/WovenClass.html#getDynamicImports() > > [image: Inactive hide details for Raymond Auge ---06/09/2014 09:04:21 > AM---Is it possible to use wireadmin to add new package imports t]Raymond > Auge ---06/09/2014 09:04:21 AM---Is it possible to use wireadmin to add new > package imports to bundles dynamically? > > From: Raymond Auge <[email protected]> > To: OSGi Developer Mail List <[email protected]> > Date: 06/09/2014 09:04 AM > Subject: [osgi-dev] wire admin add packages > Sent by: [email protected] > ------------------------------ > > > > Is it possible to use wireadmin to add new package imports to bundles > dynamically? > > -- > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> > (@rotty3000) > Senior Software Architect > *Liferay, Inc.* <http://www.liferay.com/> (@Liferay) > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > > > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay)
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
