[
https://issues.jboss.org/browse/SEAMFACES-96?page=com.atlassian.jira.plug...
]
Brian Leathem commented on SEAMFACES-96:
----------------------------------------
Dan in IRC:
if it's the shudown event, try to get the BeanManager (there is a method to safetly
check) and if it's not there, then just skip it.
So rather than disabling the listener during the shutdown event, we'll just filter the
the events bridged to the CDI event bus, excluding those that during the shutdown
sequence, when the Bean Manager is not available.
Disable Abstractlistener when JSF application is shutting down
--------------------------------------------------------------
Key: SEAMFACES-96
URL:
https://issues.jboss.org/browse/SEAMFACES-96
Project: Seam Faces
Issue Type: Bug
Components: Event Bridge
Affects Versions: 3.0.0.CR1
Environment: JBoss AS 6
Reporter: Shane Bryzak
Fix For: 3.0.0.Final
An exception is thrown while undeploying an application:
13:56:03,145 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] Unexpected
exception when attempting to tear down the Mojarra runtime:
org.jboss.seam.solder.beanManager.BeanManagerUnavailableException: Failed to locate
BeanManager using any of these providers:
org.jboss.seam.solder.beanManager.DefaultJndiBeanManagerProvider(11),
org.jboss.seam.solder.beanManager.ServletContainerJndiBeanManagerProvider(10)
at
org.jboss.seam.solder.beanManager.BeanManagerLocator.getBeanManager(BeanManagerLocator.java:91)
[:3.0.0.CR1]
at
org.jboss.seam.solder.beanManager.BeanManagerAware.getBeanManager(BeanManagerAware.java:56)
[:3.0.0.CR1]
at org.jboss.seam.faces.event.AbstractListener.getListeners(AbstractListener.java:25)
[:3.0.0.CR1]
at
org.jboss.seam.faces.event.DelegatingSystemEventListener.getEventListeners(DelegatingSystemEventListener.java:38)
[:3.0.0.CR1]
at
org.jboss.seam.faces.event.DelegatingSystemEventListener.processEvent(DelegatingSystemEventListener.java:26)
[:3.0.0.CR1]
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:102) [:2.0.3-]
[...]
The offending line 25 in AbstractListener (extends BeanManagerAware) calls
getBeanManager(). It seems that the BeanManager is not available during application
shutdown.
JSF publishes the event javax.faces.event.PreDestroyApplicationEvent
So AbstractListener (or perhaps DelegatingSystemEventListener) could listen for this
event, and disable itself to avoid throwing this error.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira