The persistence Implementation of jbpm3 is based on hibernate3. Due to the relationship with JBoss, it is estimated that
The current implementation of ejb3 is similar to that of agileflow:
1) jbpmsessionfactory
Jbpmsessionfactory reads hibernate. cfg. XML from the following files in sequence
Location:
A) The User specifies builddbsessionfactory (string configresource)
B) specify from jbpm. Properties
If (configresource = NULL ){
Configresource = jbpmconfiguration. getstring ("jbpm. hibernate. cfg. xml ");
}
C) according to hibernate's own processing method: find from the classes directory
Jbpmsessionfactory encapsulates configure and sessionfactory.
2) jbpmsession
Jbpmsession encapsulates jbpmsessionfactory, session, and transaction.
Get jbpmsessionfactory in jbpmsession and generate other connections
Agileflow only provides two external methods:
1) agileflow. connecttoserver ();
It will generate a session and may start a transaction.CodeTo obtain the current connection.
2) agileflow. disconnectserver ();
End the transaction and close the session.
For the convenience of users, I still think the implementation of agileflow is better.