users@glassfish.java.net

Re: Can I access the PersistenceUnitInfo?

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Thu, 17 Nov 2011 14:51:40 -0800

Why would you need it?

-marina

piotr_at_piotrnowicki.com wrote:
> Howdy Guys,
>
> I've noticed the javax.persistence.spi.PersistenceUnitInfo interface
> and (correct me if I'm wrong) I understand that this interface is
> implemented by the Java EE container (Glassfish) and used by the
> JPA-Provider (i.e. EclipseLink) while it's creating the
> EntityManagerFactory instances.
>
> My question is - can I access this PersistenceUnitInfo object from my
> application?
> Or is there any other way I can (at runtime) get known what values
> were provided in the persistence.xml (i.e. the jta-data-source JNDI
> location?)
>
> Thanks in advance!
> Piotr