User development,

A new message was posted in the thread "JBPM 4.3 and JPA/Hibernate integration 
question":

http://community.jboss.org/message/521916#521916

Author  : Santanu Saraswati
Profile : http://community.jboss.org/people/saraswati.santanu

Message:
--------------------------------------------------------------
Why do you need to do this? Even wih 4.2 or any other 4.x.
 
Since you are using Spring, to configure hibernate session factory you have to 
create LocalSessionFactoryBean (or AnnotationSessionFactory which is a child 
class of LocalSessionFactoryBean, unless you have your own SessionFactory bean 
implementation). Now if you create a bean for SpringHelper then that should be 
good enough. A typical SpringHelper bean may look like this:
*
*
*    <bean id="jbpmConfiguration" 
class="org.jbpm.pvm.internal.processengine.SpringHelper">
        <property name="jbpmCfg">
            <value>jbpm/jbpm.cfg.xml</value>
        </property>
    </bean>* 
 
jBPM config location will change as per you settings.
 
 SpringHelper is ApplicationContextAware. So application context will be 
injected there. Then it finds any bean of type LocalSessionFactoryBean from the 
application context. I believe searching bean of type 
AbstractSessionFactoryBean would have been better, but LocalSessionFactoryBean 
is just good enough. So you do not need to call any special method to inject 
SessionFactory into jBPM.

--------------------------------------------------------------

To reply to this message visit the message page: 
http://community.jboss.org/message/521916#521916


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to