Fixing issues spotted as a result of the bundle getting activated before the datasources used underneath are registered in JNDI
Fixing merge conflicts
code cleanup