users@glassfish.java.net

Can I access the PersistenceUnitInfo?

From: <piotr_at_piotrnowicki.com>
Date: Thu, 17 Nov 2011 06:26:24 -0600

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