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
14 hours, 7 minutes
Request Scope Lifecycle and Remote EJB invocations
by Benjamin Confino
Hello
I have a customer who sent me a pair of applications with the following
behaviour (see also the attached flow diagram):
A request is sent to a REST resource in Application A
The endpoint makes a RMI call to ServiceB in Application B
ServiceB makes an RMI to ServiceA in Application A
ServiceA makes an RMI to ServiceB in Application B
ServiceB calls back to the rest resource.
A @RequestScoped bean is injected into the REST Resource and Service A.
The customer has noticed the same instance of that bean is injected into
both injection points. They believe the two should be separate request
scoped contexts.
The CDI spec says the request context is alive :
during the service() method of any servlet in the web application, during
the doFilter() method of any servlet filter and when the container calls
any ServletRequestListener or AsyncListener,
during any remote method invocation of any EJB, during any asynchronous
method invocation of any EJB, during any call to an EJB timeout method and
during message delivery to any EJB message-driven bean, and
But it is not clear what happens if a remote method invocation is nested
inside a service() method. Is that a separate request context or the same
as the parent?
If they are seperate contexts, I notice that
WeldInitialListener.requestInitialized requires a ServletRequestEvent,
which would be tricky to acquire as part of processing an EJB remote
method invocation. Would I need to find a way to access a
ServletRequestEvent when creating the request context for a RMI?
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
4 years, 7 months