OsgiSessionFactoryService simply calls Configuration#configure(), making the assumption that hibernate.cfg.xml is in the root of the requestingBundle. Instead, try searching for it using BundleWiring#listResources (see OsgiArchiveDescriptor for example). If not found, default back to #configure().
|