<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Hi;<br><br>org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java, <br><br><pre> @Test(groups = { "contexts", "observerMethod" })<br> @SpecAssertion(section = "8.3", id = "g")<br> public void testContextIsActiveWhenInvokingObserverMethod()<br> {<br> getCurrentManager().fireEvent(new HorseInStableEvent());<br> assert HorseStable.isDependentContextActive();<br> }</pre><br><pre> @Test(groups = { "contexts", "observerMethod" })<br> @SpecAssertion(section = "8.3", id = "i")<br> public void testContextIsActiveWhenInvokingObserver()<br> {<br> getCurrentManager().fireEvent(new HorseInStableEvent());<br> assert ApplicationHorseStable.isDependentContextActive();<br> }</pre>I think that after the Observer#notify method [calling the HorseStable or
ApplicationHorseStable observer methods], Dependent context will be destroyed.<br><br>Gurkan<br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> David Allen <drallendc@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Gurkan Erdogdu <gurkanerdogdu@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> Gavin King <gavin@hibernate.org>; openwebbeans-dev@incubator.apache.org; webbeans-dev@lists.jboss.org<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, March 2, 2009 12:36:35 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [webbeans-dev] TCK Tests - Dependent Context Activation<br></font><br>
On Sun, 2009-03-01 at 23:02 -0800, Gurkan Erdogdu wrote:<br>> Thanks for answering Gavin. <br>> Then, we can not pass the TCK test if we use Observer#notify :)<br>> <br>Which test in the TCK are you referring to?<br><br>> <br>> <br>> ______________________________________________________________________<br>> From: Gavin King <<a ymailto="mailto:gavin@hibernate.org" href="mailto:gavin@hibernate.org">gavin@hibernate.org</a>><br>> To: Gurkan Erdogdu <<a ymailto="mailto:gurkanerdogdu@yahoo.com" href="mailto:gurkanerdogdu@yahoo.com">gurkanerdogdu@yahoo.com</a>><br>> Cc: <a ymailto="mailto:webbeans-dev@lists.jboss.org" href="mailto:webbeans-dev@lists.jboss.org">webbeans-dev@lists.jboss.org</a><br>> Sent: Sunday, March 1, 2009 11:25:06 PM<br>> Subject: Re: [webbeans-dev] TCK Tests - Dependent Context Activation<br>> <br>> Well, the spec says "observer method". It doesn't say anything about<br>> other
observers. So It would be perfectly fine to do it in the<br>> notify() method, but not wrong to do it form fireEvent().<br>> <br>> On Sat, Feb 28, 2009 at 4:01 PM, Gurkan Erdogdu<br>> <<a ymailto="mailto:gurkanerdogdu@yahoo.com" href="mailto:gurkanerdogdu@yahoo.com">gurkanerdogdu@yahoo.com</a>> wrote:<br>> > Hi;<br>> ><br>> > Specification states that depending context is active --> "while an<br>> > observer method is invoked", but it does not state that where is the<br>> > starting point for the activation. In the TCK tests, it is activated<br>> on the<br>> > Manager#fireEvent.<br>> ><br>> > But currently in the OpenWebBeans project, we activate the Dependent<br>> Context<br>> > at the start of the Observer#notify method.<br>> ><br>> > Which one is correct?<br>> ><br>> > Thanks;<br>> ><br>> > /Gurkan<br>> ><br>>
><br>> > _______________________________________________<br>> > webbeans-dev mailing list<br>> > <a ymailto="mailto:webbeans-dev@lists.jboss.org" href="mailto:webbeans-dev@lists.jboss.org">webbeans-dev@lists.jboss.org</a><br>> > <a href="https://lists.jboss.org/mailman/listinfo/webbeans-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/webbeans-dev</a><br>> ><br>> ><br>> <br>> <br>> <br>> -- <br>> Gavin King<br>> <a ymailto="mailto:gavin.king@gmail.com" href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br>> <a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>> <a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>> <a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>> <br>> <br>> _______________________________________________<br>> webbeans-dev
mailing list<br>> <a ymailto="mailto:webbeans-dev@lists.jboss.org" href="mailto:webbeans-dev@lists.jboss.org">webbeans-dev@lists.jboss.org</a><br>> <a href="https://lists.jboss.org/mailman/listinfo/webbeans-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/webbeans-dev</a><br><br></div></div></div><br>
</body></html>