Replacing SessionFactory with DBSessionFactory

Hallo Community in reference to https://issues.openmrs.org/browse/DPLY-40 I have been tirelessly working around the clock to introduce DBSessionFactory(https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/api/db/hibernate/DbSessionFactory.java) and replace SessionFactory as required at https://wiki.openmrs.org/display/docs/Supporting+Platform+2.0+and+below.

However before that is introduced ,MetaDataDeploy Module’(https://wiki.openmrs.org/display/docs/Metadata+Deploy+Module) CoreConstructors has to be edited and updated with any class missing in the module but resident in the Openmrs core API.

I have noticed we cannot directly import DbSessionFactory into CoreConstructors because it’s missing , it also lacks the necessary Mutator methods that’s required to set it in CoreConstructors just like all the other objects so far introduced, as required at https://wiki.openmrs.org/display/docs/Metadata+Sharing+Module

I tried to change the pom.xml and config.xml introduced the DBSessionFactory as at https://pastebin.com/ZRu7NB3p

but still getting this https://pastebin.com/Hq6jbVLG Any hints on how to go around this?

@dkayiwa @mseaton

Can you do a pull request with changes that lead to this error?

@dkayiwa i pulled a request at https://github.com/openmrs/openmrs-module-metadatadeploy/pull/5. Please check it out …Issues with travis

Take a look at this commit for an example of how you should deal with this: https://github.com/openmrs/openmrs-module-dispensing/commit/8a168d5ddb83ffba0a75b2f0854584a7b8b70796

1 Like

Alright thank you very much