[JBoss JIRA] Created: (WELD-926) Weld Servlet still uses old Google Collections instead of Guava
by Sebastian Schaffert (JIRA)
Weld Servlet still uses old Google Collections instead of Guava
---------------------------------------------------------------
Key: WELD-926
URL: https://issues.jboss.org/browse/WELD-926
Project: Weld
Issue Type: Bug
Components: Servlet Container Support
Affects Versions: 1.1.1.Final
Reporter: Sebastian Schaffert
Even though WELD-564 is fixed, the latest version of Weld Servlet still includes the old Google Collections code. I think it should not contain the code at all and instead use a dependency on the library. Or at least update to the latest version of Guava.
The problem is that it makes it impossible to use Guava in the same classpath as Weld.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (WELD-894) Around-Invoke interceptors should not wrap RuntimeException into WeldException
by Vlastimil Menčík (JIRA)
Around-Invoke interceptors should not wrap RuntimeException into WeldException
------------------------------------------------------------------------------
Key: WELD-894
URL: https://issues.jboss.org/browse/WELD-894
Project: Weld
Issue Type: Feature Request
Components: Interceptors and Decorators
Affects Versions: 1.1.1.Final
Reporter: Vlastimil Menčík
Currently, org.jboss.weld.bean.InterceptorImpl always throws a WeldException when the invoked method throws an exception.
This causes all exceptions in intercepted session bean methods to be treated as system exceptions by the EJB subsystem as WeldException is a system exception.
If RuntimeExceptions were simply rethrown, such exceptions (annotated with javax.ejb.ApplicationException) could pass through the interceptor unwrapped and be recognized as application exception in the EJB sense.
Of course, checked application exceptions are a bigger problem that would probably require a more sofisticated solution, that could be resolved later.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (WELD-917) org.jboss.weld.integration.ejb.SessionBeanInterceptor lost after passivation
by Jan Groth (JIRA)
org.jboss.weld.integration.ejb.SessionBeanInterceptor lost after passivation
----------------------------------------------------------------------------
Key: WELD-917
URL: https://issues.jboss.org/browse/WELD-917
Project: Weld
Issue Type: Bug
Components: Interceptors and Decorators
Affects Versions: 1.1.1.Final
Environment: JBoss AS 6 GA
Reporter: Jan Groth
I have a JSF-view with a dedicated conversation timeout of 30 minutes (session timeout 35 minutes).
After 10 minutes of inactivity I can see from the logs that the (SFSB) business facade is passivated by the container. After that any user activity results in the stacktrace shown below. The logs show that @PostActivate is called as expected.
14:54:21,866 INFO [STDOUT] MyFacade @PrePassivate called...
14:59:19,672 INFO [STDOUT] MyFacade @PostActivate called...
14:59:19,679 WARNUNG [javax.enterprise.resource.webcontainer.jsf.lifecycle] /simulation/simulationSegmente.xhtml @23,70 value="#{simulationSegmenteAction.task.tarifSegmentAmpelGruppen}": java.lang.RuntimeException: java.lang.IllegalArgumentException: No interceptor found for class org.jboss.weld.integration.ejb.SessionBeanInterceptor in org.jboss.ejb3.stateful.StatefulBeanContext@2382448: javax.el.ELException: /simulation/simulationSegmente.xhtml @23,70 value="#{simulationSegmenteAction.task.tarifSegmentAmpelGruppen}": java.lang.RuntimeException: java.lang.IllegalArgumentException: No interceptor found for class org.jboss.weld.integration.ejb.SessionBeanInterceptor in org.jboss.ejb3.stateful.StatefulBeanContext@2382448
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111) [:2.0.3-]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190) [:2.0.3-]
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178) [:2.0.3-]
at javax.faces.component.UIData.getValue(UIData.java:554) [:2.0.3-]
at javax.faces.component.UIData.getDataModel(UIData.java:1278) [:2.0.3-]
at javax.faces.component.UIData.setRowIndex(UIData.java:447) [:2.0.3-]
at javax.faces.component.UIData.iterate(UIData.java:1407) [:2.0.3-]
at javax.faces.component.UIData.processDecodes(UIData.java:980) [:2.0.3-]
at org.primefaces.component.datatable.DataTable.processDecodes(DataTable.java:602) [:]
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1043) [:2.0.3-]
at javax.faces.component.UIForm.processDecodes(UIForm.java:212) [:2.0.3-]
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1043) [:2.0.3-]
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1043) [:2.0.3-]
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1043) [:2.0.3-]
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1043) [:2.0.3-]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:920) [:2.0.3-]
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:74) [:2.0.3-]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at ch.helvetia.marketmap.presentation.web.fileupload.PlainFileUploadFilter.doFilter(PlainFileUploadFilter.java:76) [:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at ch.helvetia.marketmap.presentation.web.filter.DisableUrlRewritingFilter.doFilter(DisableUrlRewritingFilter.java:75) [:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:593) [:6.0.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: No interceptor found for class org.jboss.weld.integration.ejb.SessionBeanInterceptor in org.jboss.ejb3.stateful.StatefulBeanContext@2382448
at org.jboss.ejb3.interceptors.container.AbstractContainer.invokeCallback(AbstractContainer.java:262) [:1.1.3]
at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1385) [:1.7.17]
at org.jboss.ejb3.EJBContainer.invokePreDestroy(EJBContainer.java:1413) [:1.7.17]
at org.jboss.ejb3.stateful.StatefulContainer.destroy(StatefulContainer.java:222) [:1.7.17]
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.remove(SimpleStatefulCache.java:561) [:1.7.17]
at org.jboss.ejb3.stateful.StatefulCacheInterceptor.invoke(StatefulCacheInterceptor.java:75) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.concurrency.aop.interceptor.ContainerManagedConcurrencyInterceptor.invoke(ContainerManagedConcurrencyInterceptor.java:181) [:1.0.0-alpha-4]
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.stateful.StatefulInstanceAssociationInterceptor.invoke(StatefulInstanceAssociationInterceptor.java:55) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95) [:1.7.17]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:234) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:329) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:207) [:0.0.1]
at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:323) [:1.7.17]
at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:380) [:1.7.17]
at sun.reflect.GeneratedMethodAccessor491.invoke(Unknown Source) [:1.6.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalContainerInvocation.invokeTarget(SessionLocalProxyInvocationHandler.java:184) [:1.0.11]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalInvokableContextHandler.invoke(SessionLocalProxyInvocationHandler.java:159) [:1.0.11]
at $Proxy265.invoke(Unknown Source) at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185) [:1.0.11]
at $Proxy264.getTarifSegmentAmpelGruppen(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [:6.0.0.Final]
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [:6.0.0.Final]
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [:6.0.0.Final]
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [:6.0.0.Final]
at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:126) [:6.0.0.Final]
at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62) [:6.0.0.Final]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125) [:6.0.0.Final]
at ch.helvetia.marketmap.business.tarifsimulation.boundary.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$D:$dev$workspace$marketmap$$metadata$$plugins$org$jboss$ide$eclipse$as$core$JBoss_6$0_Runtime_Server1303378413932$deploy$marketmap-ear$ear"-SessionBean-SimulationTask_$$_WeldProxy.getTarifSegmentAmpelGruppen(org$jboss$weld$bean-jboss$classloader:id="vfs:$$$D:$dev$workspace$marketmap$$metadata$$plugins$org$jboss$ide$eclipse$as$core$JBoss_6$0_Runtime_Server1303378413932$deploy$marketmap-ear$ear"-SessionBean-SimulationTask_$$_WeldProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48) [:6.0.0.Final]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125) [:6.0.0.Final]
at org.jboss.weld.proxies.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$D:$dev$workspace$marketmap$$metadata$$plugins$org$jboss$ide$eclipse$as$core$JBoss_6$0_Runtime_Server1303378413932$deploy$marketmap-ear$ear"-SessionBean-SimulationTask_$$_WeldClientProxy.getTarifSegmentAmpelGruppen(org$jboss$weld$bean-jboss$classloader:id="vfs:$$$D:$dev$workspace$marketmap$$metadata$$plugins$org$jboss$ide$eclipse$as$core$JBoss_6$0_Runtime_Server1303378413932$deploy$marketmap-ear$ear"-SessionBean-SimulationTask_$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
at javax.el.BeanELResolver.getValue(BeanELResolver.java:302) [:1.0.0.Final]
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) [:1.0.0.Final]
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:71) [:2.0.3-]
at org.apache.el.parser.AstValue.getValue(AstValue.java:134) [:6.0.0.Final]
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:187) [:6.0.0.Final]
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:55) [:6.0.0.Final]
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:55) [:6.0.0.Final]
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:106) [:2.0.3-]
... 48 more
Caused by: java.lang.IllegalArgumentException: No interceptor found for class org.jboss.weld.integration.ejb.SessionBeanInterceptor in org.jboss.ejb3.stateful.StatefulBeanContext@2382448
at org.jboss.ejb3.BaseContext.getInterceptor(BaseContext.java:146) [:1.7.17]
at org.jboss.ejb3.interceptors.aop.LifecycleCallbackInterceptorMethodLazyInterceptor.getInterceptorInstance(LifecycleCallbackInterceptorMethodLazyInterceptor.java:138) [:1.1.3]
at org.jboss.ejb3.interceptors.aop.LifecycleCallbackInterceptorMethodLazyInterceptor.invoke(LifecycleCallbackInterceptorMethodLazyInterceptor.java:108) [:1.1.3]
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90) [:1.1.3]
at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_21700570.invoke(InvocationContextInterceptor_z_setup_21700570.java) [:]
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.interceptors.container.AbstractContainer.invokeCallback(AbstractContainer.java:258) [:1.1.3]
... 125 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (WELD-883) Weird behavior of custom context in some configurations
by Fab Mars (JIRA)
Weird behavior of custom context in some configurations
-------------------------------------------------------
Key: WELD-883
URL: https://issues.jboss.org/browse/WELD-883
Project: Weld
Issue Type: Bug
Components: Scopes & Contexts
Affects Versions: 1.1.1.Final
Environment: W7 x86, Glassfish 3.1 GA, Weld 1.1.1, JDK 1.6.0_24
Reporter: Fab Mars
In my applciation, some configs are in external xml files. They may be updated by hand and configs reloaded on the fly. While migrating to CDI, the methods loading the confg became producers and the beans holding the config became @ApplicationScoped.
I couldn't reload configs anymore, so I created a custom scope to control the lifecycle of my configs. And I faced a couple of issues.
My EAR is a good old one: some api jar (TrucEJBClient), the business logic module (TrucEBJ), the tools and config stuff jar (TrucConfig) and the web module (TrucWeb).
1) At first I obviously put the new scope and context in the TrucConfig jar.
Open weld_context_destroy_bean_issue (ext config, decl config).zip and deploy the ear.
Test via http://localhost:8080/TrucWeb/test.jsf , the text displayed comes from 2 bean instances generated with producer methods rom xml files
Click on the button [alter configs], one of the 2 beans is modified on the fly.
Then click on the button [reload configs] which triggers an event to destroy the aforementioned bean (whichtherefore will be reloaded on the next get())
Problem: As you can see the bean isn't destroyed.
If you have a look at com.dummy.config.ConfigContext line 106, you can see beanManager.getBeans(instance.getClass(), xmlConfigQualifier) returns an empty set.
However you can also see contextualInstancesMap.size() == 2, so I'm not able to retrieve my beans correctly there.
2) Now let's move the context and its extension configuration javax.enterprise.inject.spi.Extension into the TrucEJB module.
Open weld_error_001324 (ext ejb, decl ejb).zip and deploy the jar
The jar won't deploy, error WELD001324
3) Now let's move back the extension configuration back into the TrucConfig jar.
Open weld_working (ext ejb, decl config).zip and deploy the ear.
Test via http://localhost:8080/TrucWeb/test.jsf , the text displayed comes from 2 bean instances generated with producer methods rom xml files
Click on the button [alter configs], one of the 2 beans is modified on the fly.
Then click on the button [reload configs] which triggers an event to destroy the aforementioned bean (whichtherefore will be reloaded on the next get())
>> Despite the fact the Context is in an EJB module whilst its Extension configuration is in another jar of the same EAR, it works !!
I'm not storng enough yet with the Weld code, so it's hard for me to find the root cause(s).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months