On Aug 23, 2012, at 5:22 AM, eltonk wrote:

> Hello there!
> 
> I was taking a look about the include/exclude classpath with the properties
> "openejb.deployments.classpath.exclude" and
> "openejb.deployments.classpath.include", but I'm not  able to solve the
> problem by myself. :(
> 
> I have 2 properties files, called "hibernate.properties". One of them in
> main/resource (used by real application) and the other one in test/resource
> (to test purposes).

The trick here is that the include/exclude logic only affects the standard 
descriptors like ejb-jar.xml, persistence.xml, application-client.xml, 
application.xml plus the TomEE/OpenEJB created ones such as openejb-jar.xml or 
resources.xml.

Hibernate is the one who reads its own hibernate.properties and there's nothing 
we can do to prevent it from finding it if it's in the classpath.

The only thing I might suggest is to try to put 100% of your properties in the 
persistence.xml.  Then you can use the altDD support:

 - http://openejb.apache.org/examples-trunk/alternate-descriptors/


-David

Reply via email to