EclipseLink 2.0.0_ 2.0.0.v20090609-r4444 API Reference

javax.persistence.osgi
Class Activator

java.lang.Object
  extended by javax.persistence.osgi.Activator
All Implemented Interfaces:
PersistenceProviderResolver

public class Activator
extends java.lang.Object
implements PersistenceProviderResolver

Uses OSGi services to discover JPA persistence providers Also acts as a resolver class (called by the Persistence class when resolving providers).


Field Summary
static java.lang.String PERSISTENCE_PROVIDER
           
 
Constructor Summary
Activator()
           
 
Method Summary
 java.util.List<PersistenceProvider> getPersistenceProviders()
          Resolve/return existing providers (Implementation method for the ProviderResolver interface.)
 java.lang.String getProviderName(ServiceReference ref)
          Assumes that provider services are registered with property that indicates the name of the provider impl class.
protected  java.util.Map<java.lang.String,PersistenceProvider> getProviders()
           
protected  void removeProvider(ServiceReference ref)
          Remove the provider keyed by it's name.
 void start(BundleContext context)
           
 void stop(BundleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERSISTENCE_PROVIDER

public static final java.lang.String PERSISTENCE_PROVIDER
See Also:
Constant Field Values
Constructor Detail

Activator

public Activator()
Method Detail

start

public void start(BundleContext context)
           throws java.lang.Exception
Throws:
java.lang.Exception

removeProvider

protected void removeProvider(ServiceReference ref)
Remove the provider keyed by it's name.


stop

public void stop(BundleContext context)
          throws java.lang.Exception
Throws:
java.lang.Exception

getProviderName

public java.lang.String getProviderName(ServiceReference ref)
Assumes that provider services are registered with property that indicates the name of the provider impl class.


getProviders

protected java.util.Map<java.lang.String,PersistenceProvider> getProviders()

getPersistenceProviders

public java.util.List<PersistenceProvider> getPersistenceProviders()
Resolve/return existing providers (Implementation method for the ProviderResolver interface.)

Specified by:
getPersistenceProviders in interface PersistenceProviderResolver
Returns:
list of persistence providers available in the environment

EclipseLink 2.0.0_ 2.0.0.v20090609-r4444 API Reference