AnsweredAssumed Answered

5.14 missing method call

Question asked by tcheekva on Jan 16, 2014
Latest reply on Aug 17, 2016 by sudheerm
In previous version we were able to get a handle to the DBSession by way of the following code.  This is done in a custom form type

        Map<String,ProcessEngine> pe = ProcessEngines.getProcessEngines();
            for (Entry<String, ProcessEngine> enumEntry : pe.entrySet()) {
               System.out.println("ProcessEngine name="+enumEntry.getKey());
               ProcessEngineImpl pei = (ProcessEngineImpl)enumEntry.getValue();
               Connection c = ((DbSqlSession)pei.getDbSqlSessionFactory().openSession()).getSqlSession().getConnection();
                                        //… more stuff here.
            }

in 5.14 we get the following error

java.lang.NoSuchMethodError: org.activiti.engine.impl.getDbSqlSessionFactory()Lorg/activiti/engine/impl/db/DbSqlSessionFactory;

The method is no longer there. 

Anyone have any suggestions on how to get access to current database?

Thanks

Outcomes