java - CDI event propagation to ViewAccessScoped/ConversationScoped classes with REST Service -


i have database layer, can accessed jsf , rest. backing beans jsf viewaccessscoped. services rest requestscoped.

when creating entity, both jsf or rest, event should raised notify possible clients (jsf, other clients listening e.g. jms events). problem occurs. when create entity using rest interface event raised expected.

however weld raises contextnotactiveexception:

org.jboss.weld.context.contextnotactiveexception: weld-001303 no active contexts scope type org.apache.myfaces.extensions.cdi.core.api.scope.conversation.viewaccessscoped 

i same problem when using conversationscoped annotation. problem occurs when using rest interface, i.e. whether or not have jsf page open.

below find more detailed stack trace starting point event fired.it seems weld thinks there such bean, in end can't context.

caused by: org.jboss.weld.context.contextnotactiveexception: weld-001303 no active contexts scope type org.apache.myfaces.extensions.cdi.core.api.scope.conversation.conversationscoped     @ org.jboss.weld.manager.beanmanagerimpl.getcontext(beanmanagerimpl.java:598) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.bean.proxy.contextbeaninstance.getinstance(contextbeaninstance.java:71) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.bean.proxy.proxymethodhandler.invoke(proxymethodhandler.java:79) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ de.dfki.asr.compass.ejb.project.openscenariobean$proxy$_$$_weldclientproxy.handleentitycreated(openscenariobean$proxy$_$$_weldclientproxy.java) [classes:]     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) [rt.jar:1.7.0_11]     @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) [rt.jar:1.7.0_11]     @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) [rt.jar:1.7.0_11]     @ java.lang.reflect.method.invoke(unknown source) [rt.jar:1.7.0_11]     @ org.jboss.weld.util.reflection.securereflections$13.work(securereflections.java:264) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.util.reflection.securereflectionaccess.run(securereflectionaccess.java:52) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.util.reflection.securereflectionaccess.runasinvocation(securereflectionaccess.java:137) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.util.reflection.securereflections.invoke(securereflections.java:260) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.introspector.jlr.weldmethodimpl.invokeoninstance(weldmethodimpl.java:170) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.introspector.forwardingweldmethod.invokeoninstance(forwardingweldmethod.java:51) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.injection.methodinjectionpoint.invokeoninstancewithspecialvalue(methodinjectionpoint.java:154) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.event.observermethodimpl.sendevent(observermethodimpl.java:241) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.event.observermethodimpl.sendevent(observermethodimpl.java:229) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.event.observermethodimpl.notify(observermethodimpl.java:207) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.manager.beanmanagerimpl.notifyobservers(beanmanagerimpl.java:569) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.manager.beanmanagerimpl.fireevent(beanmanagerimpl.java:564) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31]     @ org.jboss.weld.event.eventimpl.fire(eventimpl.java:68) [weld-core-1.1.5.as71.final.jar:2012-02-10 15:31] 

what can here? codi implementation work in context?


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -