[weld-dev] WELD-862 and Seam Cron
Marius Bogoevici
marius.bogoevici at gmail.com
Tue May 17 21:34:41 EDT 2011
Hi Pete,
I see that now. Stuart's idea of is much better than cloning the
invocation context, as it will guarantee that the whole chain is
processed correctly. Cloning the invocation context will still result in
issues with decorators, in the least I can tell that for Weld.
Marius
Peter Royle wrote:
> Hi Marius,
>
> I have seen the patch and thorough explanation you put on the JIRA,
> thanks a lot for that. I am also talking with Stuart Douglas on IRC
> about a possible portable solution using ThreadLocal. I will refer
> probably try both ways and see which suits best just to be sure. Will
> report how it goes.
>
> Thanks,
>
> Pete R
>
>
> On 16/05/2011, at 4:46 PM, Marius Bogoevici wrote:
>
>> Hi Pete,
>>
>> NP - I'll try to put up a patch today (Monday EDT). It's going to be
>> a bit cumbersome for the current versions of Weld, as we need to use
>> reflection - unfortunately the current implementation of
>> jboss-interceptors simply doesn't account for this use case, but at
>> least we can get something working.
>>
>> Hopefully, future versions of Weld will be able to support this in a
>> much smoother fashion.
>>
>> ------------------------------------------------------------------------
>> *From: *"Peter Royle" <howardmoon at screamingcoder.com
>> <mailto:howardmoon at screamingcoder.com>>
>> *To: *"Marius Bogoevici" <mariusb at redhat.com <mailto:mariusb at redhat.com>>
>> *Cc: *"Seam-Dev" <seam-dev at lists.jboss.org
>> <mailto:seam-dev at lists.jboss.org>>, "Weld-Dev"
>> <weld-dev at lists.jboss.org <mailto:weld-dev at lists.jboss.org>>
>> *Sent: *Monday, May 16, 2011 2:15:49 AM
>> *Subject: *Re: [weld-dev] WELD-862 and Seam Cron
>>
>> Hi Marius,
>>
>> Thanks, that's hugely helpful. I hadn't realised that my
>> implementation was outside the Interceptors spec. I guess in that
>> case the ideal solution is one which works within the bounds of the
>> spec (ie: the deep-copy "workaround"). I will try that out as soon as
>> you are able to provide the patch/sample for how to do so (I had a
>> dig around but couldn't work it out unfortunately). If I notice any
>> significant performance implications with that approach I'll report
>> back here for further advice.
>>
>> Cheers,
>>
>> Pete R.
>>
>>
>> On 14/05/2011, at 2:31 AM, Marius Bogoevici wrote:
>>
>> Pete,
>>
>> Creating a separate thread from an @AroundInvoke interceptor and
>> using that to proceed() is not actually supported by the
>> Interceptors spec.
>>
>> "Around-invoke methods run in the same Java call stack as the
>> associated target method." (page 6) - which is clearly not the
>> case here
>>
>> Nevertheless, I'll try to improve the handling in
>> jboss-interceptors (which is used by weld) to handle this use
>> case properly. The invocationcontext is not serializable, but it
>> can be cloned using specific stuff from jboss-interceptors, so we
>> can activate that as a workaround for extant versions of
>> JBoss/Glasssfish/Weld. I'll send a patch on how to do that on the
>> issue itself.
>>
>> Hope this helps,
>> Marius
>>
>> ------------------------------------------------------------------------
>> *From: *"Peter Royle" <howardmoon at screamingcoder.com
>> <mailto:howardmoon at screamingcoder.com>>
>> *To: *"Weld-Dev" <weld-dev at lists.jboss.org
>> <mailto:weld-dev at lists.jboss.org>>
>> *Cc: *"Seam-Dev" <seam-dev at lists.jboss.org
>> <mailto:seam-dev at lists.jboss.org>>
>> *Sent: *Friday, May 13, 2011 8:22:54 AM
>> *Subject: *[weld-dev] WELD-862 and Seam Cron
>>
>> 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
>> _______________________________________________
>> weld-dev mailing list
>> weld-dev at lists.jboss.org <mailto:weld-dev at lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/weld-dev
>>
>>
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20110517/b5c0c050/attachment.html
More information about the weld-dev
mailing list