title: Embed hibernate hbm.xml mappings in jar
body: <p>Is it possible to embed the hibernate mapping hbm.xml’s to the jar and avoid manual reference in applicationContext.xml like </p>
  
  <pre><code>  &lt;bean id="sessionFactory"
      class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource"&gt;
        &lt;ref bean="dataSource" /&gt;
      &lt;/property&gt;
      &lt;property name="hibernateProperties"&gt;
        &lt;props&gt;
          &lt;prop key="hibernate.dialect"&gt;
            org.hibernate.dialect.MySQLDialect
          &lt;/prop&gt;
        &lt;/props&gt;
      &lt;/property&gt;
      &lt;property name="mappingResources"&gt;
        &lt;list&gt;
          &lt;value&gt;
            com/…/domain/Question.hbm.xml
  </code></pre>
  
  <p>and point it to a jar/etc?<br>
  Nhibernate has such an option to point to an assembly, from where it picks ups the hbm’s.<br>
  Annotations are not an option  </p>
  
  <p><strong>Edit:</strong>
  Edit:
  My intention is to remove manual reference to hbm’s and point to a generic location from where hibernate can pick it up</p>
  
  <pre><code>  &lt;list&gt;
      &lt;value&gt;
        com/.../Question.hbm.xml
      &lt;/value&gt;
      &lt;value&gt;com/.../Users.hbm.xml&lt;/value&gt;
      &lt;value&gt;
        com/.../Answers.hbm.xml
      &lt;/value&gt;
  </code></pre>