Hi, I got a problem. As we know , in traditional application hibernate works well, but how it works in OSGi environment ?
In case of OSGi environment, there are many bundles includeing Hibernate bundle and modules (bundle), each module composed by MVC,Hibernate mapping ..... then, I want plug a new bundle in system at runtime.
All i know just only one ways to implement:
1. Export Hibernate bundle, load hibernate mapping of new bundle pluged in system at runtime into Hibernate bundle, then rebuild SessionFactory, like this:
When a bundle be add into system at runtime
Configuration.configure(new_Bundle_Config_File) // load config file
SessionFactory.close() // close previous SessionFactory
Configuration.buildSessionFactory() // build a new SessionFactory
Thanks in advance
|