org.apache.aries.jpa.container
Interface ManagedPersistenceUnitInfo


public interface ManagedPersistenceUnitInfo

This interface is used to provide the Aries JPA container with the information it needs to create a container EntityManagerFactory using the PersistenceProvider service from a JPA provider. Instances of this interface should be obtained from a ManagedPersistenceUnitInfoFactory


Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getContainerProperties()
          Get a Map of continer properties to pass to the PersistenceProvider when creating an EntityManagerFactory.
 javax.persistence.spi.PersistenceUnitInfo getPersistenceUnitInfo()
          Get the PersistenceUnitInfo object for this persistence unit.
 void registered()
          Called to indicate that this persistence unit has been registered in the OSGi service registry.
 void unregistered()
          Called to indicate that this persistence unit has been unregistered from the OSGi service registry.
 

Method Detail

getPersistenceUnitInfo

javax.persistence.spi.PersistenceUnitInfo getPersistenceUnitInfo()
Get the PersistenceUnitInfo object for this persistence unit. This method should only be called when the backing bundle for the persistence unit has been resolved. If the bundle later becomes unresolved then any PersistenceUnitInfo objects obtained from this object will be discarded.

Returns:
A PersistenceUnitInfo that can be used to create an EntityManagerFactory

getContainerProperties

java.util.Map<java.lang.String,java.lang.Object> getContainerProperties()
Get a Map of continer properties to pass to the PersistenceProvider when creating an EntityManagerFactory.

Returns:
A Map of properties, or null if no properties are needed.

registered

void registered()
Called to indicate that this persistence unit has been registered in the OSGi service registry. Note that because this method is called after the service is registered other threads and listeners may have already accessed the persistence unit service.


unregistered

void unregistered()
Called to indicate that this persistence unit has been unregistered from the OSGi service registry.



Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.