WELD-862 and Seam Cron
by Peter Royle
Hi,
I'm aiming to make a release of Seam Cron available within the next two weeks. Currently there is an outstanding issue (https://issues.jboss.org/browse/WELD-862) which prevents Cron from running properly with Weld. I have been able to carry on developing Cron by testing it against OpenWebBeans, but obviously if we are to release a Seam module it should work against Weld.
It would be nice if WELD-862 could be fixed as soon a possible so that all future versions will work well with Cron.
But more importantly I also probably need to do something special in Cron so that it will work with the version of Weld already deployed in JBoss AS and Glassfish, which will contain the bug. The workaround mentioned in the bug report is to deep copy the InvocationContext. I attempted to do this by serialising and unserialising the InvocationContext but couldn't due to UnserializableExceptions. Does anyone have any advice for me about how I might be able to work around this bug to support existing versions of Weld?
Cheers,
Pete R
1 week
Quick heads up: New PR
by Benjamin Confino
Hello
Just a quick heads up that I created
https://github.com/weld/core/pull/1844 (for 2.4) and
https://github.com/weld/core/pull/1845 (for master) after receiving a bug
report from another engineer. The fix is simply adding a null check to an
if statement. I tagged them as part of WELD-1130 as this issue is a
continuation of that one. Let me know if you'd prefer it to go under a new
number.
Regards
Benjamin.
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
7 years, 7 months
RquestScoped not active inside WeldInitialListener.requestDestroyed
by Benjamin Confino
Hello.
I have a customer who's getting ContextNotActiveExceptions for the
RequestScoped Context. This happens inside the invocation of
WeldInitialListener.requestDestroyed() after the customer's application
invalidated the session. DefaultLifecycleCallbackInvoker.invokeMethods
invokes a method in application code, which calls a method on a proxy,
which results in weld attempting to get the context from the BeanManager
and the ContextNotActiveException.
My question is simple. Is this an integration issue or is this an
application issue?
Here is the stack:
org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active
contexts for scope type javax.enterprise.context.RequestScoped
at
org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:731)
at
org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
at
org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:164)
at
org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:83)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
<CustomerClass>$$_WeldClientProxy.getUserId(Unknown Source)
<Application Code>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:97)
at
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.preDestroy(DefaultLifecycleCallbackInvoker.java:90)
at
org.jboss.weld.injection.producer.BasicInjectionTarget.preDestroy(BasicInjectionTarget.java:127)
at org.jboss.weld.bean.ManagedBean.destroy(ManagedBean.java:191)
at
org.jboss.weld.util.bean.IsolatedForwardingBean.destroy(IsolatedForwardingBean.java:50)
at
org.jboss.weld.context.AbstractContext.destroyContextualInstance(AbstractContext.java:139)
at
org.jboss.weld.context.AbstractContext.destroy(AbstractContext.java:153)
at
org.jboss.weld.context.AbstractManagedContext.deactivate(AbstractManagedContext.java:58)
at
org.jboss.weld.context.AbstractBoundContext.deactivate(AbstractBoundContext.java:72)
at
org.jboss.weld.servlet.HttpContextLifecycle.safelyDeactivate(HttpContextLifecycle.java:378)
at
org.jboss.weld.servlet.HttpContextLifecycle.requestDestroyed(HttpContextLifecycle.java:311)
at
org.jboss.weld.servlet.WeldInitialListener.requestDestroyed(WeldInitialListener.java:135)
at
com.ibm.ws.webcontainer.managedobject.ManagedObjectListenerWrapper.requestDestroyed(ManagedObjectListenerWrapper.java:98)
at
com.ibm.ws.webcontainer.webapp.WebApp.notifyServletRequestDestroyed(WebApp.java:2042)
at
com.ibm.wsspi.webcontainer.collaborator.CollaboratorHelper.postInvokeCollaborators(CollaboratorHelper.java:532)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1282)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:963)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
7 years, 7 months