Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.jpa.osgi
Class Activator

java.lang.Object
  extended by org.eclipse.persistence.jpa.osgi.Activator


public class Activator
extends java.lang.Object

Activator for JPA OSGi service. This Activator provides EclipseLink's OSGi integration. When the Eclipse Gemini project comes out of incubation that behavior this integration will be deprecated and users will be encouraged to use OSGi JPA in the way defined by the OSGi EE specification

Author:
tware, ssmith

Field Summary
protected static BundleContext context
          Context is stored on this activator by its subclass for use in weaving.
static java.lang.String ECLIPSELINK_OSGI_PROVIDER
           
static java.lang.String MANIFEST_PU_LABEL
           
protected static PersistenceProvider osgiProvider
           
static java.lang.String PERSISTENCE_PROVIDER
           

 

Constructor Summary
Activator()
           

 

Method Summary
 void bundleChanged(BundleEvent event)
          Simply add bundles to our bundle list as they start and remove them as they stop
private  void deregisterBundle(Bundle bundle)
           
static BundleContext getContext()
           
private  java.lang.String[] getPersistenceUnitNames(Bundle bundle)
          Extract the list of persistence unit names from the OSGi manifest.
private  void registerBundle(Bundle bundle)
          Store a reference to a bundle as it is started so the bundle can be accessed later.
private  void registerBundleListener()
          Add our bundle listener
protected  EMFBuilderServiceProxyHandler registerEMFBuilderService(EMFServiceProxyHandler emfServiceProxyHandler, java.lang.String puName, java.util.Dictionary<java.lang.String,java.lang.String> props)
           
protected  EMFServiceProxyHandler registerEMFService(java.lang.String puName, java.util.Dictionary<java.lang.String,java.lang.String> props)
           
protected  void registerEMFServices(java.lang.String[] persistenceUnitNames)
           
 void start(BundleContext context)
          On start, we do two things We register a listener for bundles and we start our JPA server
 void stop(BundleContext context)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

MANIFEST_PU_LABEL

public static final java.lang.String MANIFEST_PU_LABEL
See Also:
Constant Field Values

PERSISTENCE_PROVIDER

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

ECLIPSELINK_OSGI_PROVIDER

public static final java.lang.String ECLIPSELINK_OSGI_PROVIDER
See Also:
Constant Field Values

context

protected static BundleContext context
Context is stored on this activator by its subclass for use in weaving.

osgiProvider

protected static PersistenceProvider osgiProvider

Constructor Detail

Activator

public Activator()

Method Detail

getContext

public static BundleContext getContext()

bundleChanged

public void bundleChanged(BundleEvent event)
Simply add bundles to our bundle list as they start and remove them as they stop

start

public void start(BundleContext context)
           throws java.lang.Exception
On start, we do two things We register a listener for bundles and we start our JPA server
Throws:
java.lang.Exception

registerBundleListener

private void registerBundleListener()
Add our bundle listener

registerBundle

private void registerBundle(Bundle bundle)
Store a reference to a bundle as it is started so the bundle can be accessed later.

registerEMFServices

protected void registerEMFServices(java.lang.String[] persistenceUnitNames)

registerEMFService

protected EMFServiceProxyHandler registerEMFService(java.lang.String puName,
                                                    java.util.Dictionary<java.lang.String,java.lang.String> props)

registerEMFBuilderService

protected EMFBuilderServiceProxyHandler registerEMFBuilderService(EMFServiceProxyHandler emfServiceProxyHandler,
                                                                  java.lang.String puName,
                                                                  java.util.Dictionary<java.lang.String,java.lang.String> props)

getPersistenceUnitNames

private java.lang.String[] getPersistenceUnitNames(Bundle bundle)
Extract the list of persistence unit names from the OSGi manifest.

deregisterBundle

private void deregisterBundle(Bundle bundle)

stop

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

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.