0 Replies Latest reply on Dec 7, 2007 10:46 AM by caleb.powell1

    Hibernate Injection Problems

    caleb.powell1

      We are currently evaluating jBPM and trying to inject our Hibernate Session into the JbpmContext object;

      jbpmContext.setSession(ourHibernateSession);


      This is resulting in an error. The JBPM framework complains about not being able to find the 'hibernate.cfg.xml' file. It appears to be trying to create it's own Hibernate SessionFactory.

      We don't want it to use it's own SessionFactory. We want control over this. That is why we are injecting the Session object only. We also have the following jBPM config options set;

      <jbpm-context>
       <service name="persistence">
       <factory>
       <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
       <field name="isTransactionEnabled"><false /></field>
       <field name="isCurrentSessionEnabled"><false /></field>
       </bean>
       </factory>
       </service>
       ...
      </jbpm-context>
      


      Are there any other steps we need to take to inject our session into jBPM?

      Thanks in advance,

      Caleb