-
1. Re: AS5 deploying EJB jars where JBAS4 didn't
alesj Oct 30, 2008 4:12 PM (in response to ccrouch)As by the EJB/JPA spec, persistence.xml can be in WEB-INF/lib's jars - ALR or Carlo would know better.
It's WARStructure that exposes this:
- http://anonsvn.jboss.org/repos/jbossas/trunk/server/src/main/org/jboss/web/deployers/WARStructure.java
You can use webInfLibFilter to exclude your jar being picked up. -
2. Re: AS5 deploying EJB jars where JBAS4 didn't
alrubinger Oct 30, 2008 4:33 PM (in response to ccrouch)@see my comments in in JIRA, persistence.xml is read in "a jar file in the WEB-INF/lib directory of a WAR file"[1].
S,
ALR
References:
[1] EJB3 Persistence Spec 6.2 -
3. Re: AS5 deploying EJB jars where JBAS4 didn't
alesj Oct 31, 2008 7:20 AM (in response to ccrouch)"alesj" wrote:
You can use webInfLibFilter to exclude your jar being picked up.
Actually no, since that would mean your jar would be also excluded from classpath. :-)
I've added a new filter - webInfLibMetaDataFilter - to WARStructure.
Simply write such filter impl that would exclude the files you don't want
to be part of metadata scan. -
4. Re: AS5 deploying EJB jars where JBAS4 didn't
ccrouch Oct 31, 2008 10:16 AM (in response to ccrouch)Thanks Ales
Can you point me at an example/test impl. How does this need to get deployed?
Cheers -
5. Re: AS5 deploying EJB jars where JBAS4 didn't
alesj Oct 31, 2008 4:22 PM (in response to ccrouch)"charles.crouch@jboss.com" wrote:
Can you point me at an example/test impl.
VirtualFileFilter is trivial interface to implement.
Single method: boolean accepts(VirtualFile file) ;-)"charles.crouch@jboss.com" wrote:
How does this need to get deployed?
See:
- http://anonsvn.jboss.org/repos/jbossas/trunk/tomcat/src/resources/war-deployers-jboss-beans.xml -
6. Re: AS5 deploying EJB jars where JBAS4 didn't
ccrouch Nov 3, 2008 2:57 PM (in response to ccrouch)"alesj" wrote:
"charles.crouch@jboss.com" wrote:
How does this need to get deployed?
See:
- http://anonsvn.jboss.org/repos/jbossas/trunk/tomcat/src/resources/war-deployers-jboss-beans.xml
But given we're just trying to ignore parts of one jar file in one web app (which people may or may not have deployed) isn't it a little excessive to add this to the configuration of the main tomcat web app deployer? Isn't there a way to bundle this as part of the embedded jopr web app itself?
Cheers -
7. Re: AS5 deploying EJB jars where JBAS4 didn't
alesj Nov 3, 2008 3:54 PM (in response to ccrouch)You can always write your own StructureDeployer,
only recognizing your jopr deployment. ;-)
But I'll check what jboss-structure.xml offers regarding metadata exclusion.
If nothing is there, I'll see what I can add, still being under the same API. -
8. Re: AS5 deploying EJB jars where JBAS4 didn't
alesj Nov 4, 2008 5:02 AM (in response to ccrouch)"alesj" wrote:
But I'll check what jboss-structure.xml offers regarding metadata exclusion.
If nothing is there, I'll see what I can add, still being under the same API.
Actually it's all already there. :-)
No need for any extra exclusion, since you directly declare what all is your classpath and metadata.
All you need is something like this in your admin-console.war/META-INF:
jboss-structure.xml<structure> <context> <path name=""/> <metaDataPath> <path name="WEB-INF"/> </metaDataPath> <classpath> <path name="WEB-INF/classes"/> <path name="WEB-INF/lib" suffixes=".jar"/> </classpath> </context> </structure>
This should then work on both, JBossAS 4.x and 5.x.
In 4.x this file is gonna be ignored, and in 5.x the metadata from your lib jars is gonna be ignored. -
9. Re: AS5 deploying EJB jars where JBAS4 didn't
ccrouch Nov 10, 2008 12:54 PM (in response to ccrouch)A jboss-structure.xml file in META-INF did the trick perfectly.
Thanks