Skip to content

Instantly share code, notes, and snippets.

@esarbanis
Last active November 30, 2015 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esarbanis/0bd43cfd7c2483162b9e to your computer and use it in GitHub Desktop.
Save esarbanis/0bd43cfd7c2483162b9e to your computer and use it in GitHub Desktop.
Add the following class to META-INF/services/javax.enterprise.inject.spi.Extension file.
/**
* Weblogic ClassLoader on CDI Extension don´t localize META-INF/services necessary to load ProcessEngine.
* <p>
* This class provides an overriding extension point which uses the correct classloader, in order to instantiate
* a {@link org.activiti.cdi.spi.ProcessEngineLookup}
* </p>
*/
public class WeblogicActivitiExtension extends ActivitiExtension {
public void beforeBeanDiscovery(@Observes final BeforeBeanDiscovery event) {
super.beforeBeanDiscovery(event);
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment