[jboss-as7-dev] VFS question and how to extract contents of deployment root

Scott Marlow smarlow at redhat.com
Wed Nov 7 15:53:40 EST 2012


We need a proper implementation of JPA getPersistenceUnitRootUrl():

"
javax.persistence.spi.PersistenceUnitInfo.getPersistenceUnitRootUrl()

Returns the URL for the jar file or directory that is the root of the 
persistence unit. (If the persistence unit is rooted in the 
WEB-INF/classes directory, this will be the URL of that directory.)

The URL will either be a file: URL referring to a jar file
or referring to a directory that contains an exploded jar
file, or some other URL from which an InputStream in jar
format can be obtained.
"

VFSFile.getPhysicalFile() doesn't seem to extract the children, so that 
isn't helpful by itself.

Do we have something like VFSFile.getPhysicalFile() that gets a physical 
file representation of all of the files in a deployment root?

Scott


More information about the jboss-as7-dev mailing list