I am wondering if it is possible to map resources from an external project?
What I mean:
I have project A with hibernate.cfg.xml which will be communicating with JMS and added to buildpath project B, which has classes and HBM mappings for them.
I would like to create queries from project A, which will ask the database and return proper objects of classes defined in project B.
Any ideas how to achieve this?
A simple <mapping resource="/project/location_of_hbpm" /> in the config file doesn't work...
It is possible to map resources from external locations/projects as long as they are in
CLASSPATH.In your case, you can't because if you do, it would be a 'Circular Dependency' and it won't work.
So you can't make
If you want to use the Project B 'POJO/Classes' in Project A, then try to extract those classes from 'Project B' into a separate JAR file and let both Project B and Project A depend on it.