Re: [cdi-tck] [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
by Tomas Remes
> ----- Original Message -----
> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
> To: "Tomas Remes" <tremes(a)redhat.com>
> Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
> Sent: Monday, January 5, 2015 11:09:30 AM
> Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
> well I really dont know. For me TCK works cause of the impl. Said
> otherwise the exception should be thrown before the filter chain IMO
> since it should be valid for the whole request ie before the
> OutermostFilter filter.
I think the spec doesn't exactly state, when the exception should be thrown. We have only:
"If the propagated conversation cannot be restored, the container must associate
the request with a new transient conversation and throw an exception of type
javax.enterprise.context.NonexistentConversationException ."
I guess in Weld it's thrown during the filter chain.
> I can fix it sort term pretty easily but would be great to know if
> some scope are not available in some filters
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
2015-01-05 11:00 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>
> I looked at org.apache.webbeans.jsf.WebBeansPhaseListener and you check conversation propagation before JSF restore view phase and also throw NonexistentConversationException. I guess this exception is then wrapped to FacesException during any following phase.
> I think this is not TCK test issue, because the org.jboss.cdi.tck.tests.context.conversation.OutermostFilter should really get NonexistentConversationException and not FacesException.
>
> Tom
>
> ----- Original Message -----
> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
> To: "Tomas Remes" <tremes(a)redhat.com>
> Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
> Sent: Friday, January 2, 2015 5:06:41 PM
> Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
>
> org.apache.webbeans.jsf.WebBeansPhaseListener#beforePhase
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-02 17:02 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>>
>> Where exactly is the NonexistentConversationException thrown in your case?
>>
>> ----- Original Message -----
>> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
>> To: "Tomas Remes" <tremes(a)redhat.com>
>> Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
>> Sent: Friday, January 2, 2015 4:37:28 PM
>> Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
>>
>> NonexistentConversationException is the cause of FacesException (why 500 is set)
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-01-02 16:29 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>>>
>>> I am not sure I'm following here. There shouldn't be any 500 response code (and thus no need for client.setThrowExceptionOnFailingStatusCode(false)) from what I can see. The exception is handled and the response code is still 200. Can you post your stacktrace?
>>>
>>> Thank's
>>> Tom
>>>
>>> ----- Original Message -----
>>> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
>>> To: "Jozef Hartinger" <jharting(a)redhat.com>
>>> Cc: cdi-dev(a)lists.jboss.org
>>> Sent: Friday, January 2, 2015 9:37:25 AM
>>> Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
>>>
>>> Cause JSF layer set response code to 500
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau
>>> http://www.tomitribe.com
>>> http://rmannibucau.wordpress.com
>>> https://github.com/rmannibucau
>>>
>>>
>>> 2015-01-02 9:15 GMT+01:00 Jozef Hartinger <jharting(a)redhat.com>:
>>>> If the exception is handled why is then status set to 500?
>>>>
>>>>
>>>> On 12/24/2014 06:57 PM, Romain Manni-Bucau wrote:
>>>>>
>>>>> there is a NonexistentConversationException (sorry dont have the exact
>>>>> name right now). It is what is expected then the outermostfilter write
>>>>> few things in the response but it is "too late" status is 500. All
>>>>> other tests relying on the same thing do the set to avoid the
>>>>> exception but not this one.
>>>>>
>>>>>
>>>>> Romain Manni-Bucau
>>>>> @rmannibucau
>>>>> http://www.tomitribe.com
>>>>> http://rmannibucau.wordpress.com
>>>>> https://github.com/rmannibucau
>>>>>
>>>>>
>>>>> 2014-12-24 18:39 GMT+01:00 John D. Ament <john.d.ament(a)gmail.com>:
>>>>>>
>>>>>> Why is the http client throwing an exception? AFAIK http client is just
>>>>>> making requests and generating the responding response as string or
>>>>>> otherwise. html unit is trying to then convert it to a page to process
>>>>>> the
>>>>>> content.
>>>>>>
>>>>>> On Wed Dec 24 2014 at 12:14:15 PM Romain Manni-Bucau
>>>>>> <rmannibucau(a)gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> isnt "client.setThrowExceptionOnFailingStatusCode(false);" missing in
>>>>>>>
>>>>>>>
>>>>>>> org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown?
>>>>>>>
>>>>>>> Cause it expects an exception but by default httpclient will throw an
>>>>>>> exception before any validation is done
>>>>>>>
>>>>>>> what do I miss?
>>>>>>>
>>>>>>> Romain Manni-Bucau
>>>>>>> @rmannibucau
>>>>>>> http://www.tomitribe.com
>>>>>>> http://rmannibucau.wordpress.com
>>>>>>> https://github.com/rmannibucau
>>>>>>> _______________________________________________
>>>>>>> cdi-dev mailing list
>>>>>>> cdi-dev(a)lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>>>>
>>>>>>> Note that for all code provided on this list, the provider licenses the
>>>>>>> code under the Apache License, Version 2
>>>>>>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>>>>>>> provided on this list, the provider waives all patent and other
>>>>>>> intellectual
>>>>>>> property rights inherent in such information.
>>>>>
>>>>> _______________________________________________
>>>>> cdi-dev mailing list
>>>>> cdi-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>>
>>>>> Note that for all code provided on this list, the provider licenses the
>>>>> code under the Apache License, Version 2
>>>>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>>>>> provided on this list, the provider waives all patent and other intellectual
>>>>> property rights inherent in such information.
>>>>
>>>>
>>> _______________________________________________
>>> cdi-dev mailing list
>>> cdi-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>
>>> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>>>
>>> --
>>> Tomas Remes
>>>
>>
>> --
>> Tomas Remes
>>
>
> --
> Tomas Remes
>
--
Tomas Remes
10 years
Re: [cdi-tck] [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
by Tomas Remes
I looked at org.apache.webbeans.jsf.WebBeansPhaseListener and you check conversation propagation before JSF restore view phase and also throw NonexistentConversationException. I guess this exception is then wrapped to FacesException during any following phase.
I think this is not TCK test issue, because the org.jboss.cdi.tck.tests.context.conversation.OutermostFilter should really get NonexistentConversationException and not FacesException.
Tom
----- Original Message -----
From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
To: "Tomas Remes" <tremes(a)redhat.com>
Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
Sent: Friday, January 2, 2015 5:06:41 PM
Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
org.apache.webbeans.jsf.WebBeansPhaseListener#beforePhase
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-02 17:02 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>
> Where exactly is the NonexistentConversationException thrown in your case?
>
> ----- Original Message -----
> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
> To: "Tomas Remes" <tremes(a)redhat.com>
> Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
> Sent: Friday, January 2, 2015 4:37:28 PM
> Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
>
> NonexistentConversationException is the cause of FacesException (why 500 is set)
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-02 16:29 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>>
>> I am not sure I'm following here. There shouldn't be any 500 response code (and thus no need for client.setThrowExceptionOnFailingStatusCode(false)) from what I can see. The exception is handled and the response code is still 200. Can you post your stacktrace?
>>
>> Thank's
>> Tom
>>
>> ----- Original Message -----
>> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
>> To: "Jozef Hartinger" <jharting(a)redhat.com>
>> Cc: cdi-dev(a)lists.jboss.org
>> Sent: Friday, January 2, 2015 9:37:25 AM
>> Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
>>
>> Cause JSF layer set response code to 500
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-01-02 9:15 GMT+01:00 Jozef Hartinger <jharting(a)redhat.com>:
>>> If the exception is handled why is then status set to 500?
>>>
>>>
>>> On 12/24/2014 06:57 PM, Romain Manni-Bucau wrote:
>>>>
>>>> there is a NonexistentConversationException (sorry dont have the exact
>>>> name right now). It is what is expected then the outermostfilter write
>>>> few things in the response but it is "too late" status is 500. All
>>>> other tests relying on the same thing do the set to avoid the
>>>> exception but not this one.
>>>>
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau
>>>> http://www.tomitribe.com
>>>> http://rmannibucau.wordpress.com
>>>> https://github.com/rmannibucau
>>>>
>>>>
>>>> 2014-12-24 18:39 GMT+01:00 John D. Ament <john.d.ament(a)gmail.com>:
>>>>>
>>>>> Why is the http client throwing an exception? AFAIK http client is just
>>>>> making requests and generating the responding response as string or
>>>>> otherwise. html unit is trying to then convert it to a page to process
>>>>> the
>>>>> content.
>>>>>
>>>>> On Wed Dec 24 2014 at 12:14:15 PM Romain Manni-Bucau
>>>>> <rmannibucau(a)gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> isnt "client.setThrowExceptionOnFailingStatusCode(false);" missing in
>>>>>>
>>>>>>
>>>>>> org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown?
>>>>>>
>>>>>> Cause it expects an exception but by default httpclient will throw an
>>>>>> exception before any validation is done
>>>>>>
>>>>>> what do I miss?
>>>>>>
>>>>>> Romain Manni-Bucau
>>>>>> @rmannibucau
>>>>>> http://www.tomitribe.com
>>>>>> http://rmannibucau.wordpress.com
>>>>>> https://github.com/rmannibucau
>>>>>> _______________________________________________
>>>>>> cdi-dev mailing list
>>>>>> cdi-dev(a)lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>>>
>>>>>> Note that for all code provided on this list, the provider licenses the
>>>>>> code under the Apache License, Version 2
>>>>>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>>>>>> provided on this list, the provider waives all patent and other
>>>>>> intellectual
>>>>>> property rights inherent in such information.
>>>>
>>>> _______________________________________________
>>>> cdi-dev mailing list
>>>> cdi-dev(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>
>>>> Note that for all code provided on this list, the provider licenses the
>>>> code under the Apache License, Version 2
>>>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>>>> provided on this list, the provider waives all patent and other intellectual
>>>> property rights inherent in such information.
>>>
>>>
>> _______________________________________________
>> cdi-dev mailing list
>> cdi-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>
>> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>>
>> --
>> Tomas Remes
>>
>
> --
> Tomas Remes
>
--
Tomas Remes
10 years
Re: [cdi-tck] [cdi-dev] session destroyed event
by Tomas Remes
I would say it really depends on the given case. If you want to do the stuff (you described) in one request, then you'll really have some potential troubles. You can file an CDI spec issue to start broader discussion.
Thank's
Tom
----- Original Message -----
From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
To: "Tomas Remes" <tremes(a)redhat.com>
Cc: cdi-tck(a)lists.jboss.org, cdi-dev(a)lists.jboss.org
Sent: Friday, January 2, 2015 9:46:05 AM
Subject: Re: [cdi-dev] session destroyed event
If the spec mandates the session scope to be >= request scope then if
you logout during a request you would keep incorrect session.
If you do:
request {
filter {
playWithSession();
logout();
}
auditSession();
}
Then your audit will still be bound to the user before the logout but
actually it is no more accurate. Can be ok in some cases but can be an
issue in some others. Also in this case destroy event will have a
session which can have been garbaged/destoyed by the container and
potentially (if pooled) reaffected to another request.
If you take the login case it is the opposite and here if you use
sessionId in your logic you can have troubles as well since it is very
recommanded (sometimes forced by the container) to change the
sessionId when a user is logged.
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-02 8:54 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>
>
> Ok so let's move back to cdi-dev list too.:) Can you please elaborate bit more why do you think it's not consistent?
>
> Thank's
> Tom
>
> ----- Original Message -----
> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
> To: "Tomas Remes" <tremes(a)redhat.com>
> Cc: cdi-tck(a)lists.jboss.org
> Sent: Monday, December 29, 2014 11:08:49 AM
> Subject: Re: [cdi-dev] session destroyed event
>
> Hi
>
> sorry to have used the wrong list.
>
> Issue is then scope is not consistent (think to login/logout mecanism
> for instance).
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2014-12-29 11:02 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>>
>> Hi,
>>
>> I think the destroy event is triggered at the end of the request and not immediately if I understand correctly. The spec states:
>>
>> "The session context is destroyed when the HTTPSession times out, after all
>> HttpSessionListener s have been called, and at the very end of any request in which
>> invalidate() was called, after all filters and ServletRequestListener s have been called."
>>
>> Please let's move TCK related topics to cdi-tck mailing list.
>>
>> Thank's
>> Tom
>>
>> ----- Original Message -----
>> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
>> To: cdi-dev(a)lists.jboss.org
>> Sent: Tuesday, December 23, 2014 8:58:16 PM
>> Subject: [cdi-dev] session destroyed event
>>
>> Hi
>>
>> why org.jboss.cdi.tck.tests.context.session.event.Servlet#doGet ensures
>>
>> destroyed == observer.getDestroyedSessionCount().get()
>>
>> For me invalidate call should trigger the destroy event: you can
>> create N session in a single requests
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>> _______________________________________________
>> cdi-dev mailing list
>> cdi-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>
>> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>>
>>
>
> --
> Tomas Remes
>
>
--
Tomas Remes
10 years
Re: [cdi-tck] [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
by Tomas Remes
Where exactly is the NonexistentConversationException thrown in your case?
----- Original Message -----
From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
To: "Tomas Remes" <tremes(a)redhat.com>
Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
Sent: Friday, January 2, 2015 4:37:28 PM
Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
NonexistentConversationException is the cause of FacesException (why 500 is set)
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-02 16:29 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>
> I am not sure I'm following here. There shouldn't be any 500 response code (and thus no need for client.setThrowExceptionOnFailingStatusCode(false)) from what I can see. The exception is handled and the response code is still 200. Can you post your stacktrace?
>
> Thank's
> Tom
>
> ----- Original Message -----
> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
> To: "Jozef Hartinger" <jharting(a)redhat.com>
> Cc: cdi-dev(a)lists.jboss.org
> Sent: Friday, January 2, 2015 9:37:25 AM
> Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
>
> Cause JSF layer set response code to 500
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-02 9:15 GMT+01:00 Jozef Hartinger <jharting(a)redhat.com>:
>> If the exception is handled why is then status set to 500?
>>
>>
>> On 12/24/2014 06:57 PM, Romain Manni-Bucau wrote:
>>>
>>> there is a NonexistentConversationException (sorry dont have the exact
>>> name right now). It is what is expected then the outermostfilter write
>>> few things in the response but it is "too late" status is 500. All
>>> other tests relying on the same thing do the set to avoid the
>>> exception but not this one.
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau
>>> http://www.tomitribe.com
>>> http://rmannibucau.wordpress.com
>>> https://github.com/rmannibucau
>>>
>>>
>>> 2014-12-24 18:39 GMT+01:00 John D. Ament <john.d.ament(a)gmail.com>:
>>>>
>>>> Why is the http client throwing an exception? AFAIK http client is just
>>>> making requests and generating the responding response as string or
>>>> otherwise. html unit is trying to then convert it to a page to process
>>>> the
>>>> content.
>>>>
>>>> On Wed Dec 24 2014 at 12:14:15 PM Romain Manni-Bucau
>>>> <rmannibucau(a)gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> isnt "client.setThrowExceptionOnFailingStatusCode(false);" missing in
>>>>>
>>>>>
>>>>> org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown?
>>>>>
>>>>> Cause it expects an exception but by default httpclient will throw an
>>>>> exception before any validation is done
>>>>>
>>>>> what do I miss?
>>>>>
>>>>> Romain Manni-Bucau
>>>>> @rmannibucau
>>>>> http://www.tomitribe.com
>>>>> http://rmannibucau.wordpress.com
>>>>> https://github.com/rmannibucau
>>>>> _______________________________________________
>>>>> cdi-dev mailing list
>>>>> cdi-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>>
>>>>> Note that for all code provided on this list, the provider licenses the
>>>>> code under the Apache License, Version 2
>>>>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>>>>> provided on this list, the provider waives all patent and other
>>>>> intellectual
>>>>> property rights inherent in such information.
>>>
>>> _______________________________________________
>>> cdi-dev mailing list
>>> cdi-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>
>>> Note that for all code provided on this list, the provider licenses the
>>> code under the Apache License, Version 2
>>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>>> provided on this list, the provider waives all patent and other intellectual
>>> property rights inherent in such information.
>>
>>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>
> --
> Tomas Remes
>
--
Tomas Remes
10 years
Re: [cdi-tck] [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
by Tomas Remes
I am not sure I'm following here. There shouldn't be any 500 response code (and thus no need for client.setThrowExceptionOnFailingStatusCode(false)) from what I can see. The exception is handled and the response code is still 200. Can you post your stacktrace?
Thank's
Tom
----- Original Message -----
From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
To: "Jozef Hartinger" <jharting(a)redhat.com>
Cc: cdi-dev(a)lists.jboss.org
Sent: Friday, January 2, 2015 9:37:25 AM
Subject: Re: [cdi-dev] org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown and exception handling
Cause JSF layer set response code to 500
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-02 9:15 GMT+01:00 Jozef Hartinger <jharting(a)redhat.com>:
> If the exception is handled why is then status set to 500?
>
>
> On 12/24/2014 06:57 PM, Romain Manni-Bucau wrote:
>>
>> there is a NonexistentConversationException (sorry dont have the exact
>> name right now). It is what is expected then the outermostfilter write
>> few things in the response but it is "too late" status is 500. All
>> other tests relying on the same thing do the set to avoid the
>> exception but not this one.
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2014-12-24 18:39 GMT+01:00 John D. Ament <john.d.ament(a)gmail.com>:
>>>
>>> Why is the http client throwing an exception? AFAIK http client is just
>>> making requests and generating the responding response as string or
>>> otherwise. html unit is trying to then convert it to a page to process
>>> the
>>> content.
>>>
>>> On Wed Dec 24 2014 at 12:14:15 PM Romain Manni-Bucau
>>> <rmannibucau(a)gmail.com>
>>> wrote:
>>>>
>>>> Hi
>>>>
>>>> isnt "client.setThrowExceptionOnFailingStatusCode(false);" missing in
>>>>
>>>>
>>>> org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown?
>>>>
>>>> Cause it expects an exception but by default httpclient will throw an
>>>> exception before any validation is done
>>>>
>>>> what do I miss?
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau
>>>> http://www.tomitribe.com
>>>> http://rmannibucau.wordpress.com
>>>> https://github.com/rmannibucau
>>>> _______________________________________________
>>>> cdi-dev mailing list
>>>> cdi-dev(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>
>>>> Note that for all code provided on this list, the provider licenses the
>>>> code under the Apache License, Version 2
>>>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>>>> provided on this list, the provider waives all patent and other
>>>> intellectual
>>>> property rights inherent in such information.
>>
>> _______________________________________________
>> cdi-dev mailing list
>> cdi-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>>
>> Note that for all code provided on this list, the provider licenses the
>> code under the Apache License, Version 2
>> (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
>> provided on this list, the provider waives all patent and other intellectual
>> property rights inherent in such information.
>
>
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
--
Tomas Remes
10 years
Re: [cdi-tck] [cdi-dev] org.jboss.cdi.tck.tests.context.application.async.StatusServlet and content type
by Tomas Remes
Hi,
This is not expected. So for you it fails with ClassCastException (or something similar) in htmlunit right? This is weird. I can see the test passing. Which version of htmlunit do you use? I think I have no problem to set content type in StatusServlet, just curious about the problem. I guess this problem occurs also in following tests (using very similar servlet) right?:
org.jboss.cdi.tck.tests.context.request.async.RequestContextAsyncListenerTest
org.jboss.cdi.tck.tests.context.conversation.determination.ConversationDeterminationTest
org.jboss.cdi.tck.tests.context.session.async.SessionContextAsyncListenerTest
Thank's
Tom
----- Original Message -----
From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
To: cdi-dev(a)lists.jboss.org
Sent: Friday, December 26, 2014 12:52:37 PM
Subject: [cdi-dev] org.jboss.cdi.tck.tests.context.application.async.StatusServlet and content type
Hi
doesn't org.jboss.cdi.tck.tests.context.application.async.StatusServlet
forget to set content type to text/plain?
org.jboss.cdi.tck.tests.context.application.async.ApplicationContextAsyncListenerTest
relies on it like it:
TextPage results = webClient.getPage(contextPath + "Status");
but since the content type of the response is not set it uses servlet
default one (text/html) and them htmlunit can't cast a HtmlPage to a
TextPage.
is it expected? Is it an issue on my local setup?
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
--
Tomas Remes
10 years
Re: [cdi-tck] [cdi-dev] session destroyed event
by Tomas Remes
Ok so let's move back to cdi-dev list too.:) Can you please elaborate bit more why do you think it's not consistent?
Thank's
Tom
----- Original Message -----
From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
To: "Tomas Remes" <tremes(a)redhat.com>
Cc: cdi-tck(a)lists.jboss.org
Sent: Monday, December 29, 2014 11:08:49 AM
Subject: Re: [cdi-dev] session destroyed event
Hi
sorry to have used the wrong list.
Issue is then scope is not consistent (think to login/logout mecanism
for instance).
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2014-12-29 11:02 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>
> Hi,
>
> I think the destroy event is triggered at the end of the request and not immediately if I understand correctly. The spec states:
>
> "The session context is destroyed when the HTTPSession times out, after all
> HttpSessionListener s have been called, and at the very end of any request in which
> invalidate() was called, after all filters and ServletRequestListener s have been called."
>
> Please let's move TCK related topics to cdi-tck mailing list.
>
> Thank's
> Tom
>
> ----- Original Message -----
> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
> To: cdi-dev(a)lists.jboss.org
> Sent: Tuesday, December 23, 2014 8:58:16 PM
> Subject: [cdi-dev] session destroyed event
>
> Hi
>
> why org.jboss.cdi.tck.tests.context.session.event.Servlet#doGet ensures
>
> destroyed == observer.getDestroyedSessionCount().get()
>
> For me invalidate call should trigger the destroy event: you can
> create N session in a single requests
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>
>
--
Tomas Remes
10 years
Re: [cdi-tck] [cdi-dev] where is defined javax.enterprise.context.conversation.id?
by Tomas Remes
Hi,
I've checked the related TCK test and it seems to me valid. In CDI spec there is:
"6.7.5. The Conversation interface
The container provides a built-in bean with bean type Conversation , scope @RequestScoped ,
and qualifier @Default , named javax.enterprise.context.conversation ."
Tom
----- Original Message -----
From: "Mark Struberg" <struberg(a)yahoo.de>
To: "Antonio Goncalves" <antonio.goncalves(a)gmail.com>, "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
Cc: cdi-dev(a)lists.jboss.org
Sent: Tuesday, December 30, 2014 10:57:28 AM
Subject: Re: [cdi-dev] where is defined javax.enterprise.context.conversation.id?
cid is a different thing. But I did nowhere (spec and api) find the one mentioned by Romain.
So I think it's not specified and we need to exclude this test.
LieGrue,
strub
On Monday, 29 December 2014, 21:41, Antonio Goncalves <antonio.goncalves(a)gmail.com> wrote:
>
>
>Nothing in JSF nor in Servlet, but in CDI 1.2 Specification :
>
>
>6.7.4. Conversation context lifecycle
>(...)
>The long-running conversation associated with a
>request may be propagated to any Servlet request via use of a request parameter named cid
>containing the unique identifier of the conversation. In this case, the application must manage this
>request parameter.
>(...)
>
>This is accomplished via use of a request parameter named cid containing the unique
>identifier of the conversation.
>(...)
>
>
>
>On Mon, Dec 29, 2014 at 7:54 PM, Romain Manni-Bucau <rmannibucau(a)gmail.com> wrote:
>
>Hi guys
>>
>>didnt find in CDI and JSF PDFs where is defined
>>"javax.enterprise.context.conversation.id". Seems it should be
>>available in ELs.
>>
>>Do you have any pointer please?
>>
>>
>>Romain Manni-Bucau
>>@rmannibucau
>>http://www.tomitribe.com
>>http://rmannibucau.wordpress.com
>>https://github.com/rmannibucau
>>_______________________________________________
>>cdi-dev mailing list
>>cdi-dev(a)lists.jboss.org
>>https://lists.jboss.org/mailman/listinfo/cdi-dev
>>
>>Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>>
>
>
>
>--
>
>Antonio Goncalves
>Software architect, Java Champion and Pluralsight author
>
>Web site | Twitter | LinkedIn | Pluralsight | Paris JUG | Devoxx France
>
>_______________________________________________
>cdi-dev mailing list
>cdi-dev(a)lists.jboss.org
>https://lists.jboss.org/mailman/listinfo/cdi-dev
>
>Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>
>
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
10 years