geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vamsavardhana Reddy <>
Subject Is there an OSGI Framework Bundle API for accessing nested archive content?
Date Fri, 08 Oct 2010 16:15:53 GMT
The ValidatorFactoryGBean uses Bundle.getEntry() to get to
META-INF/validation.xml and WEB-INF/validation.xml files in EJB and Web
archives.  This works fine for standalone modules.  When the JAR or WAR is
packaged in an EAR file,
Bundle.getEntry("<war-modulename>.war/WEB-INF/validation.xml") gets me to
the file as WAR file is exploded and repackaged in the EAR whereas
Bundle.getEntry("<ejb-modulename>.jar/META-INF/validation.xml") does not
work since the EJB jar is stored as is in the EAR.  One option I can think
of is to get the EJB jar entry, store it to a temporary file, open it with
Jar APIs to get to "META-INF/validation.xml".

 my-ejb.jar (EJB jar is stored as is)
       +-- validation.xml
 +--my-web.war (WAR file is exploded, so WEB-INF is a directory in the
repackaged EAR)
         +-- validation.xml

 Is there any Bundle API that will allow to access the content in the nested
archives? Or any other way to get to the file of interest without creating
temporary files?


View raw message