This content has been marked as final.
Show 8 replies
-
1. Re: Persistence unit deployers are not invoked for WEB-INF/l
alesj Aug 25, 2008 9:35 AM (in response to wolfc)"wolfc" wrote:
A persistence unit can be packaged in a jar in WEB-INF/lib (JPA 6.2).
Right now the persistence unit deployers are not invoked when this is the case.
Can you describe a bit more what you expect to get,
e.g. what's the metadata we need to create - URL to be passed to ORM, ...
Or what's stopping you to write such deployer,
which would check WEB-INF/lib jars for persistence.xml (or whatever describes persistennce unit)?
What's so different from what you already wrote - your JpaDeployer? -
2. Re: Persistence unit deployers are not invoked for WEB-INF/l
wolfc Aug 26, 2008 6:50 AM (in response to wolfc)I already have such a deployer, it's the PersistenceParsingDeployer.
I just need something that triggers this deployer.
Maybe the WARStructure can fire something off?
It's similar to deploying an EAR with modules in it, but for JavaEE 5 most 'module' types should be ignored. -
3. Re: Persistence unit deployers are not invoked for WEB-INF/l
alesj Aug 26, 2008 9:31 AM (in response to wolfc)"wolfc" wrote:
I just need something that triggers this deployer.
You could check all WEB-INF/lib jars for it
and create something useful.
Or create new structure - PersistenceUnitStructure.
I'm saying this w/o having any idea what the spec requires. ;-)"wolfc" wrote:
Maybe the WARStructure can fire something off?
Hmmm, could be probably extended.
Or new PersistenceUnitStructure, but I dunno how would that play with
existing WARStructure --> PUS's deployment ~ WS's classpath entry. -
4. Re: Persistence unit deployers are not invoked for WEB-INF/l
wolfc Aug 27, 2008 2:24 PM (in response to wolfc)"alesj" wrote:
You could check all WEB-INF/lib jars for it
and create something useful.
Or create new structure - PersistenceUnitStructure.
I'm saying this w/o having any idea what the spec requires. ;-)
It's all in chapter 6 of EJB3 persistence, about 10 pages."alesj" wrote:
Hmmm, could be probably extended.
Or new PersistenceUnitStructure, but I dunno how would that play with
existing WARStructure --> PUS's deployment ~ WS's classpath entry.
Me neither. :-) -
5. Re: Persistence unit deployers are not invoked for WEB-INF/l
alesj Aug 27, 2008 3:42 PM (in response to wolfc)"wolfc" wrote:
Me neither. :-)
Try it. ;-) -
6. Re: Persistence unit deployers are not invoked for WEB-INF/l
adrian.brock Aug 29, 2008 12:08 PM (in response to wolfc)I don't understand why there is a long discussion.
It's clearly a bug. The WARStructure is adding WEB-INF/classes/META-INF
as a metadata location, but not the META-INF folders of the nested jars.// Create a context for this war file with WEB-INF as the location for metadata // Some wars also might have metadata in WEB-INF/classes/META-INF, e.g. persistence.xml context = createContext(structureContext, new String[]{"WEB-INF", "WEB-INF/classes/META-INF"});
-
8. Re: Persistence unit deployers are not invoked for WEB-INF/l
wolfc Aug 29, 2008 1:03 PM (in response to wolfc)Keep in mind we currently don't want to accidentally deploy EJBs defined in such a jar. Would be nice if this is some boolean we can switch on at will.