<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Pete,<br>
<br>
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.<br>
<br>
Marius<br>
<br>
Peter Royle wrote:
<blockquote
 cite="mid:84873952-E7D3-48CC-9017-68B16039D7BA@screamingcoder.com"
 type="cite"><base href="x-msg://130/">
  <div>Hi Marius,</div>
  <div><br>
  </div>
  <div>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.</div>
  <div><br>
  </div>
  <div>Thanks,</div>
  <div><br>
  </div>
  <div>Pete R</div>
  <div><br>
  </div>
  <br>
  <div>
  <div>On 16/05/2011, at 4:46 PM, Marius Bogoevici wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite"><span class="Apple-style-span"
 style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
    <div>
    <div
 style="font-family: Arial; font-size: 10pt; color: rgb(0, 0, 0);">Hi
Pete,<br>
    <br>
NP - I'll try to put up a patch today (Monday&nbsp; 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.<span class="Apple-converted-space">&nbsp;</span><br>
    <br>
Hopefully, future versions of Weld will be able to support this in a
much smoother fashion.<br>
    <br>
    <hr id="zwchr">
    <div
 style="color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From:<span
 class="Apple-converted-space">&nbsp;</span></b>"Peter Royle" &lt;<a
 moz-do-not-send="true" href="mailto:howardmoon@screamingcoder.com">howardmoon@screamingcoder.com</a>&gt;<br>
    <b>To:<span class="Apple-converted-space">&nbsp;</span></b>"Marius
Bogoevici" &lt;<a moz-do-not-send="true"
 href="mailto:mariusb@redhat.com">mariusb@redhat.com</a>&gt;<br>
    <b>Cc:<span class="Apple-converted-space">&nbsp;</span></b>"Seam-Dev"
&lt;<a moz-do-not-send="true" href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&gt;,
"Weld-Dev" &lt;<a moz-do-not-send="true"
 href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a>&gt;<br>
    <b>Sent:<span class="Apple-converted-space">&nbsp;</span></b>Monday, May
16, 2011 2:15:49 AM<br>
    <b>Subject:<span class="Apple-converted-space">&nbsp;</span></b>Re:
[weld-dev] WELD-862 and Seam Cron<br>
    <br>
Hi Marius,
    <div><br>
    </div>
    <div>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.</div>
    <div><br>
    </div>
    <div>Cheers,</div>
    <div><br>
    </div>
    <div>Pete R.</div>
    <div><br>
    </div>
    <div><br>
    <div>
    <div>On 14/05/2011, at 2:31 AM, Marius Bogoevici wrote:</div>
    <br class="Apple-interchange-newline">
    <blockquote><span class="Apple-style-span"
 style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
      <div>
      <div
 style="font-family: Arial; font-size: 10pt; color: rgb(0, 0, 0);">Pete,<br>
      <br>
Creating a separate thread from an @AroundInvoke interceptor and using
that to proceed() is not actually supported by the Interceptors spec.<span
 class="Apple-converted-space">&nbsp;</span><br>
      <br>
"Around-invoke methods run in the same Java call stack as the
associated target method."&nbsp; (page 6) - which is clearly not the case
here<br>
      <br>
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.<br>
      <br>
Hope this helps,<br>
Marius<br>
      <br>
      <hr id="zwchr">
      <div
 style="color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From:<span
 class="Apple-converted-space">&nbsp;</span></b>"Peter Royle" &lt;<a
 moz-do-not-send="true" href="mailto:howardmoon@screamingcoder.com"
 target="_blank">howardmoon@screamingcoder.com</a>&gt;<br>
      <b>To:<span class="Apple-converted-space">&nbsp;</span></b>"Weld-Dev"
&lt;<a moz-do-not-send="true" href="mailto:weld-dev@lists.jboss.org"
 target="_blank">weld-dev@lists.jboss.org</a>&gt;<br>
      <b>Cc:<span class="Apple-converted-space">&nbsp;</span></b>"Seam-Dev"
&lt;<a moz-do-not-send="true" href="mailto:seam-dev@lists.jboss.org"
 target="_blank">seam-dev@lists.jboss.org</a>&gt;<br>
      <b>Sent:<span class="Apple-converted-space">&nbsp;</span></b>Friday,
May 13, 2011 8:22:54 AM<br>
      <b>Subject:<span class="Apple-converted-space">&nbsp;</span></b>[weld-dev]
WELD-862 and Seam Cron<br>
      <br>
Hi,<br>
      <br>
I'm aiming to make a release of Seam Cron available within the next two
weeks. Currently there is an outstanding issue (<a
 moz-do-not-send="true" href="https://issues.jboss.org/browse/WELD-862"
 target="_blank">https://issues.jboss.org/browse/WELD-862</a>) 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.<br>
      <br>
It would be nice if WELD-862 could be fixed as soon a possible so that
all future versions will work well with Cron.<span
 class="Apple-converted-space">&nbsp;</span><br>
      <br>
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?<br>
      <br>
Cheers,<br>
      <br>
Pete R<br>
_______________________________________________<br>
weld-dev mailing list<br>
      <a moz-do-not-send="true" href="mailto:weld-dev@lists.jboss.org"
 target="_blank">weld-dev@lists.jboss.org</a><br>
      <a moz-do-not-send="true"
 href="https://lists.jboss.org/mailman/listinfo/weld-dev"
 target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
      </div>
      <br>
      </div>
      </div>
      </span></blockquote>
    </div>
    <br>
    </div>
    </div>
    <br>
    </div>
    </div>
    </span></blockquote>
  </div>
  <br>
  <pre wrap="">
<hr class="__postbox_mime_separator" size="4" width="90%">
_______________________________________________
weld-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/weld-dev">https://lists.jboss.org/mailman/listinfo/weld-dev</a></pre>
</blockquote>
</body>
</html>