This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//for a partial integration in GlassFish3 in case of: | |
//java.lang.NullPointerException at com.sun.jersey.server.impl.cdi.CDIExtension.processAnnotatedField | |
public class JerseyAwareLoaderService extends DefaultLoaderService | |
{ | |
@Override | |
public <T> List<T> load(Class<T> serviceType, ClassLoader classLoader) | |
{ | |
List<T> result = super.load(serviceType, classLoader); | |
Iterator<T> resultIterator = result.iterator(); | |
while (resultIterator.hasNext()) | |
{ | |
if (resultIterator.next().getClass().getName().startsWith("com.sun.jersey.server")) | |
{ | |
resultIterator.remove(); | |
} | |
} | |
return result; | |
} | |
} | |
//and in /MEAT-INF/openwebbeans/openwebbeans.properties activate it via: | |
configuration.ordinal=100 | |
org.apache.webbeans.spi.LoaderService=org.os890.codi.addon.cdibridge.JerseyAwareLoaderService |
you need the following owb modules:
- openwebbeans-impl
- openwebbeans-spi
- openwebbeans-web
- openwebbeans-jsf
attention: that isn't a full integration. as you see e.g. jersey can't be used with this workaround.