Details
-
Bug
-
Resolution: Done
-
Major
-
4.2.1.FINAL
-
None
Description
Currently, the REST server looks up the existing EmbeddedCacheManager provided by JBossAS 6 in StartupListener.getMcInjectedCacheManager().
This unfortunately does not work in JBossAS 7 because it switched to a new controller. To get the provided EmbeddedCacheManager, a .WAR must include a class that implements org.jboss.msc.service.ServiceActivator, and we need to get the cache manager there. Here are some examples:
http://j.mp/jNX2gr
http://j.mp/kleOLi
The good news is that the ServiceActivator is invoked before the web application goes on-line. The bad news is that it is reset to null by StartupListener.getMcInjectedCacheManager().
The fix to this problem is to modify StartupListener so that it does not update ManagerInstance.instance if set already.