infinispan/infinispan — pull request #2979 by bibryam (2014-10-21 22:57:59+00:00)
Title: Use FrameworkUtil to retrive the osgi bundle and FileLookup to retrieve ...

Sometimes ((BundleReference) OsgiClassLoader.class.getClassLoader()).getBundle()
returns null. To fix that use FrameworkUtil to retrive the osgi bundle [1]

Use FileLookup to find the resources on OSGI classpath as files for InfinispanEmbeddedServiceFactory are loaded by other bundles and not accessible using its class loader.

[1] http://grepcode.com/file/repo1.maven.org/maven2/org.osgi/org.osgi.core/4.2.0/org/osgi/framework/FrameworkUtil.java#FrameworkUtil.getBundle%28java.lang.Class%29