in last version (understand trunk) you have 2 mecanisms:
1) tomee/conf/exclusions.list [i'm no more sure at all but i think it is in
beta-2]
-> contain a list of file (in fact prefixes: for instance "commons-") to
avoid to scan
2) WEB-INF/scan.xml
-> contains the list of classes and/or packages to scan. Here is a sample:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/server/openejb-common-cli/src/main/resources/META-INF/scan.xml
- Romain
2012/3/15 Neale Rudd <neale@metawerx.net>
> Hi Guys,
>
> One of our customers trialling TomEE has reported that their app isn't
> loading because it is scanning all the library JARs in his WEB-INF/lib for
> Java EE annotations, and then complaining about missing classes (such as
> Hibernate.Session).
>
> "It even scans those that have no META-INF/persistence.xml,
> META-INF/ejb-jar.xml, or anything else. This is a problem because I have a
> framework JAR that contains such annotations but that should *not* be
> scanned by default. Rather, I will refer to these framework classes
> explicitly in my app JAR's persistence.xml, ejb-jar.xml etc.
> Containers such as GlassFish/JBoss have a container-specific mechanism to
> control/prevent classpath scanning. But I can't see anything for TomEE?"
>
> Is there a way to prevent these jars being scanned?
>
> Best Regards,
> Neale Rudd
> Metawerx Pty Ltd
> www.metawerx.net
>
>
|