org.glassfish.osgi.ee.resources
Class ResourceProviderService

java.lang.Object
  extended by org.glassfish.osgi.ee.resources.ResourceProviderService
All Implemented Interfaces:
org.jvnet.hk2.config.ConfigListener

public class ResourceProviderService
extends Object
implements org.jvnet.hk2.config.ConfigListener

A service to export resources in GlassFish to OSGi's service-registry.
OSGi applications can use ServiceReference to get access to these resources. OSGi applications can do lookup of appropriate type of
ServiceReference with the filter "jndi-name"

For JDBC Resources, additional filter "osgi.jdbc.driver.class" that indicates the
driver-class-name/datasource-class-name will work.

JDBC Resources, JMS Connection Factories, JMS Destinations are exported with following ServiceReference names
For JDBC Resources : javax.sql.DataSource
For JMS Resources : javax.jms.ConnectionFactory / javax.jms.QueueConnectionFactory / javax.jms.TopicConnectionFactory
For JMS Destinations : javax.jms.Queue / javax.jms.Topic

Author:
Jagadish Ramu

Constructor Summary
ResourceProviderService(org.glassfish.osgi.ee.resources.Habitat habitat, org.osgi.framework.BundleContext bundleContext)
           
 
Method Summary
 org.jvnet.hk2.config.UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
          Notification that @Configured objects that were injected have changed
 void postConstruct()
          register config bean proxy change listeners
 void preDestroy()
          un-register config bean proxy change listeners
 void registerResources()
           
 void unRegisterResources()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceProviderService

public ResourceProviderService(org.glassfish.osgi.ee.resources.Habitat habitat,
                               org.osgi.framework.BundleContext bundleContext)
Method Detail

registerResources

public void registerResources()

unRegisterResources

public void unRegisterResources()

preDestroy

public void preDestroy()
un-register config bean proxy change listeners


postConstruct

public void postConstruct()
register config bean proxy change listeners


changed

public org.jvnet.hk2.config.UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
Notification that @Configured objects that were injected have changed

Specified by:
changed in interface org.jvnet.hk2.config.ConfigListener
Parameters:
events - list of changes


Copyright © 2012 GlassFish Community. All Rights Reserved.