org.apache.aries.jpa.container.impl
Class PersistenceBundleHelper

java.lang.Object
  extended by org.apache.aries.jpa.container.impl.PersistenceBundleHelper

public class PersistenceBundleHelper
extends Object

This helper can be used to locate persistence.xml files in a bundle


Field Summary
static String PERSISTENCE_UNIT_HEADER
          The Meta-Persistence header
static String PERSISTENCE_XML
          The persistence xml location
static String WEB_CONTEXT_PATH_HEADER
          The Web-ContextPath header (as defined in the web application bundle spec)
 
Constructor Summary
PersistenceBundleHelper()
           
 
Method Summary
static Collection<PersistenceDescriptor> findPersistenceXmlFiles(org.osgi.framework.Bundle bundle)
          This method locates persistence descriptor files based on a combination of the default location "META-INF/persistence.xml" and the Meta-Persistence header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERSISTENCE_XML

public static final String PERSISTENCE_XML
The persistence xml location

See Also:
Constant Field Values

PERSISTENCE_UNIT_HEADER

public static final String PERSISTENCE_UNIT_HEADER
The Meta-Persistence header

See Also:
Constant Field Values

WEB_CONTEXT_PATH_HEADER

public static final String WEB_CONTEXT_PATH_HEADER
The Web-ContextPath header (as defined in the web application bundle spec)

See Also:
Constant Field Values
Constructor Detail

PersistenceBundleHelper

public PersistenceBundleHelper()
Method Detail

findPersistenceXmlFiles

public static Collection<PersistenceDescriptor> findPersistenceXmlFiles(org.osgi.framework.Bundle bundle)
This method locates persistence descriptor files based on a combination of the default location "META-INF/persistence.xml" and the Meta-Persistence header. Note that getEntry is used to ensure we do not alter the state of the bundle Note also that web application bundles will never return persistence descriptors

Parameters:
bundle - The bundle to search
Returns:


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