Package org.apache.activemq.util.osgi
Class Activator
java.lang.Object
org.apache.activemq.util.osgi.Activator
- All Implemented Interfaces:
EventListener,org.apache.activemq.util.FactoryFinder.ObjectFactory,org.osgi.framework.BundleActivator,org.osgi.framework.BundleListener,org.osgi.framework.SynchronousBundleListener
public class Activator
extends Object
implements org.osgi.framework.BundleActivator, org.osgi.framework.SynchronousBundleListener, org.apache.activemq.util.FactoryFinder.ObjectFactory
An OSGi bundle activator for ActiveMQ which adapts the
FactoryFinder
to the OSGi environment.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbundleChanged(org.osgi.framework.BundleEvent event) protected voidregister(org.osgi.framework.Bundle bundle) voidstart(org.osgi.framework.BundleContext bundleContext) voidstop(org.osgi.framework.BundleContext bundleContext) protected voidunregister(long bundleId) When bundles unload.. we remove them thier cached Class entries from the serviceCache.
-
Constructor Details
-
Activator
public Activator()
-
-
Method Details
-
start
- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event) - Specified by:
bundleChangedin interfaceorg.osgi.framework.BundleListener
-
register
protected void register(org.osgi.framework.Bundle bundle) -
unregister
protected void unregister(long bundleId) When bundles unload.. we remove them thier cached Class entries from the serviceCache. Future service lookups for the service will fail. TODO: consider a way to get the Broker release any references to instances of the service.- Parameters:
bundleId-
-
create
public Object create(String path) throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException - Specified by:
createin interfaceorg.apache.activemq.util.FactoryFinder.ObjectFactory- Throws:
IllegalAccessExceptionInstantiationExceptionIOExceptionClassNotFoundException
-