3 Replies Latest reply on Jun 19, 2009 3:10 AM by Tom Baeyens

    JBPM4 - org.jbpm.pvm.internal.session.DbSession & org.hibern

    jeffery c Newbie

      Hello All,

      previously, I thought that the org.jbpm.pvm.internal.session.DbSession is a abstraction of database session(e.g. org.hibernate.Session), so that we can make the implementation pluggable. but I also found that the org.hibernate.Session reference is diffused everywhere(e.g. some jpdl activity), is that programmical mistake or Tom has another intention?

      best regards!

        • 1. Re: JBPM4 - org.jbpm.pvm.internal.session.DbSession & org.hi
          Shekhar Vemuri Newbie

          Sorry, not the expert answer here but I do not see any references to orh.hibernate.Session anywhere in org.jbpm.pvm.internal.session.DbSession.

          That's the interface that org.jbpm.pvm.internal.hibernate.DbSessionImpl implements, and that has loads of Hibernate imports and references, but hey, it is a.) an implementation class and b.) it says so in the package name itself, that it is a hibernate implementation of DbSessionImpl.

          Dunno how much that helped,

          • 2. Re: JBPM4 - org.jbpm.pvm.internal.session.DbSession & org.hi
            jeffery c Newbie

            thanks, shekharv
            yes, org.jbpm.pvm.internal.hibernate.DbSessionImpl is an implementation of org.jbpm.pvm.internal.session.DbSession, but maybe you don't understand me(my english is so poor).
            what I don't understand is that:
            the methods #svae/#delete/#flush/... in DbSessionImpl are delegated forward to the corresponding method(same method name) call of org.hibernate.Session, it seems the author would like to see DbSession rather than org.hibernate.Session in this program, but why make it internal? and, in modules like pvm/jpdl/enterprise, I found lots of references to org.hibernate.Session directory(in some commands, activities, etc.), which are retrived from the Environment, why not using DbSession instead?

            • 3. Re: JBPM4 - org.jbpm.pvm.internal.session.DbSession & org.hi
              Tom Baeyens Master

              it's not the intention to have an interface to plug a different persistence layer.

              but it is still a work in progress. don't know yet how it is going to look like in the end.

              goal is to have central access to all the queries.

              we might consider switch to jpa later on.