Hi,

Thanks for the feedback.
Do you have a simple EAR application to reproduce?

It would be helpful to have the same starting point if we have to discuss
deeper and the thread becomes longer.

Anyway, EAR files should not go to webapps/
Only wars can go there.

EAR files and JAR files must go to apps (you must create it on a fresh
install).
Basically, all archives Tomcat is not used to deal with are not supposed to
go to webapps/

Regarding the datasources, not sure tomee.xml overrides resources.xml
resources declared in the app. Romain recalls maybe.
You can use tomes.xml for both dev and prod and use maven filtering for
example.
You can also deploy the resources.xml alone in webapps/ or apps/, so that
you can more easily choose one file or the other.

You should also be able to use properties place holder.
There is also the alternate descriptor feature for specifying alternate
files to use in dev for example. It does not apply to resources.xml as far
as I know.
There are various options to solve that depending on what you are used to
do.

If you have a lot of libraries (jars) in ear/lib or in any WEB-INF/lib
directory of each web apps, you can waste unnecessary time. As per the
spec, we must scan everything (more or less).

You can set those system properties in system.properties file or as usual
java system properties.
Another way is also to add conf/exclusions.list

FYI, the default list is
http://svn.apache.org/repos/asf/tomee/tomee/trunk/container/openejb-core/src/main/resources/default.exclusions

Only prefix is enough.

Another option is to add a WEB-INF/scan.xml
It contains the list of classes and/or packages to scan. Here is a sample:
http://svn.apache.org/repos/asf/tomee/tomee/trunk
/server/openejb-common-cli/src/main/resources/META-INF/scan.xml<http://svn.apache.org/repos/asf/openejb/trunk/openejb/server/openejb-common-cli/src/main/resources/META-INF/scan.xml>


Hope it helps.
JLouis



2013/5/23 m1000 <[email protected]>

> A correction and some more questions:
>
> I can still undeploy my ear app (unless I'm mistaken, it didn't work on
> yesterday snapshot but today it works if I delete the .ear file first).
>
> More questions:
>
> 1. If I keep my JDBC resources in my ear in resources.xml (for my
> development purposes) but also have them
>     defined in tomee.xml, but pointing them on another database, it seems
> that the datasources in tomee.xml
>     are not overriding the ones in META-INF/resources.xml.
>
>     Is this ok ? There is no priority/hierarchy to them ?
>     So I can't have JDBC resources defined in my app because on deployment,
> the customer need to have its own jdbc URL but META-INF/resources.xml would
> be the one loaded anyway.
>
> 2. I've checked the documentation but I'm having some difficulties with
> this
> :
>
> /SEVERE: Searched 25 classpath urls in 29168 milliseconds. Average 1166
> milliseconds per url. TOO LONG!
> May 23, 2013 2:20:09 PM org.apache.openejb.config.DeploymentsResolver
> loadFromClasspath
> SEVERE: ADJUST THE EXCLUDE/INCLUDE!!!. Current settings:
> openejb.deployments.classpath.exclude='',
> openejb.deployments.classpath.include='.*'
>
>     INFO: Inspecting classpath for applications: 25 urls. Consider
> adjusting
> your exclude/include. Current settings:
> openejb.deployments.classpath.exclude='',
> openejb.deployments.classpath.include='.*'/
>
> If I understand correctly, my ear/libs dependencies are probably the ones
> wasting the scanner time.
> But where should I define openejb.deployments.classpath.exclude/include ?
> It
> doesn't seems that I can put those in my ear/META-INF/somefile.xml.
> Wouldn't
> that be great if I could define my app exclude/include in my app archive ?
>
> Sorry for the avalanche of questions ;-)
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Couple-of-questions-it-works-but-ear-tp4663190p4663191.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>



-- 
Jean-Louis

Reply via email to