Example usage for javax.persistence.spi PersistenceUnitInfo getPersistenceUnitRootUrl

List of usage examples for javax.persistence.spi PersistenceUnitInfo getPersistenceUnitRootUrl

Introduction

In this page you can find the example usage for javax.persistence.spi PersistenceUnitInfo getPersistenceUnitRootUrl.

Prototype

public URL getPersistenceUnitRootUrl();

Source Link

Document

Returns the URL for the jar file or directory that is the root of the persistence unit.

Usage

From source file:net.ggtools.maven.ddlgenerator.MultiConfigAwarePersistenceUnitManager.java

/**
 * {@inheritDoc}.//  w w w  . j a va 2  s.  c o  m
 */
@Override
public PersistenceUnitInfo obtainPersistenceUnitInfo(String puName) {
    PersistenceUnitInfo persistenceUnitInfo = super.obtainPersistenceUnitInfo(puName);
    persistenceUnitInfo.getJarFileUrls().remove(persistenceUnitInfo.getPersistenceUnitRootUrl());
    return persistenceUnitInfo;
}