views:

64

answers:

1

I am maintaining following structure for my project

Web - Web Project

Model - EJB Project

Persistence - Java project having data classes and their mapping for Hibernate

Pokuri - EAR Project

As we know we can give jar file to hibernate configuration to load mapping information from jar. As I deploy EAR on to server I just want to build SessionFactory from mapping files in Persistence jar. But I am unable to get the path for that jar. Plz guide me to get the jar path. Or suggest me the best way to build SessionFactory and bind the same to a JNDI name.

A: 

Take a look at this thread - it may contain useful information.

Also, make sure your jar is mapped in your application.xml as an ejb module.

Bozho