I am using hibernate with a Spring container with annotations and Hibernate Entity Manager (not JPA). We're using Tomcat, Jboss and Weblogic and need to support those AS and maybe more.
The entities deployed on the system need to be customized with a kind of plugin architecture so we should provide the ability to anyone to,say, deploy a jar file with entities in the classpath without any extra configuration whatsoever.
Currently we have our entities fqn hardcoded in the hibernate.cfg.xml. Is there any way to have an automatic detection of entities?
It is perfectly available to have something like META-INF/hibernate.xml that contains the necessary metadata to identify the entities to deploy in that jar file. Classpath scanning does not seem an option as the package name may change all the time
|