You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openwebbeans.apache.org by Mark Struberg <st...@yahoo.de> on 2011/11/07 20:33:42 UTC
Re: OWB Decorator problem
hi Christian!
guess this was meant for user@openwebbeans.apache.org? :)
LieGrue,
strub
----- Original Message -----
> From: Christian Beikov <ch...@gmail.com>
> To: users@myfaces.apache.org
> Cc:
> Sent: Monday, November 7, 2011 7:16 PM
> Subject: OWB Decorator problem
>
> Hello there!
>
> I have a problem with OWB that does not occur on WELD and I wasn't able to
> find a solution for that yet.
> I am using OWB 1.0 shipped with IBM WAS 8.0.0.1 and the scenario is like this:
>
> class A implements Service{}
> class ADecorator implements Service{}
> class InterceptorImpl{}
>
> Now I call a method of the Service interface and the call is delegated to the
> decorator as expected. The decorator passes the call to the underlying
> implementation and the impl throws an exception. Now the decorator does not see
> the concrete exception that occurred in the impl but an
> InvocationTargetException and within that, the actual exception.
>
> Am I wrong or should I see the actual exception and not the
> InvocationTargetException? I can't even add an Interceptor to the decorator
> methods to generically unwrap that exception, because AroundInvoke interceptors
> are not called if they are applied on decorators. Is that the expected behavior
> too?
>
> Thanks in advance!
>
> Regards,
> Christian
>
Re: OWB Decorator problem
Posted by Mark Struberg <st...@yahoo.de>.
Hi Christian!
Sorry for the late response, was on a Conference last week.
This might well be an error in the interceptor logic of OWB. We wrap the original Exception into a InvocationTargetException and probably don't do the proper unwrapping afterwards.
Can you please file a JIRA issue for tracking this?
txs and LieGrue,
strub
----- Original Message -----
> From: Mark Struberg <st...@yahoo.de>
> To: MyFaces Discussion <us...@myfaces.apache.org>
> Cc: "user@openwebbeans.apache.org" <us...@openwebbeans.apache.org>
> Sent: Monday, November 7, 2011 8:33 PM
> Subject: Re: OWB Decorator problem
>
> hi Christian!
>
> guess this was meant for user@openwebbeans.apache.org? :)
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
>> From: Christian Beikov <ch...@gmail.com>
>> To: users@myfaces.apache.org
>> Cc:
>> Sent: Monday, November 7, 2011 7:16 PM
>> Subject: OWB Decorator problem
>>
>> Hello there!
>>
>> I have a problem with OWB that does not occur on WELD and I wasn't able
> to
>> find a solution for that yet.
>> I am using OWB 1.0 shipped with IBM WAS 8.0.0.1 and the scenario is like
> this:
>>
>> class A implements Service{}
>> class ADecorator implements Service{}
>> class InterceptorImpl{}
>>
>> Now I call a method of the Service interface and the call is delegated to
> the
>> decorator as expected. The decorator passes the call to the underlying
>> implementation and the impl throws an exception. Now the decorator does not
> see
>> the concrete exception that occurred in the impl but an
>> InvocationTargetException and within that, the actual exception.
>>
>> Am I wrong or should I see the actual exception and not the
>> InvocationTargetException? I can't even add an Interceptor to the
> decorator
>> methods to generically unwrap that exception, because AroundInvoke
> interceptors
>> are not called if they are applied on decorators. Is that the expected
> behavior
>> too?
>>
>> Thanks in advance!
>>
>> Regards,
>> Christian
>>
>
Re: OWB Decorator problem
Posted by Christian Beikov <ch...@gmail.com>.
Am 07.11.2011 20:33, schrieb Mark Struberg:
> hi Christian!
>
> guess this was meant for user@openwebbeans.apache.org? :)
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
>> From: Christian Beikov<ch...@gmail.com>
>> To: users@myfaces.apache.org
>> Cc:
>> Sent: Monday, November 7, 2011 7:16 PM
>> Subject: OWB Decorator problem
>>
>> Hello there!
>>
>> I have a problem with OWB that does not occur on WELD and I wasn't able to
>> find a solution for that yet.
>> I am using OWB 1.0 shipped with IBM WAS 8.0.0.1 and the scenario is like this:
>>
>> class A implements Service{}
>> class ADecorator implements Service{}
>> class InterceptorImpl{}
>>
>> Now I call a method of the Service interface and the call is delegated to the
>> decorator as expected. The decorator passes the call to the underlying
>> implementation and the impl throws an exception. Now the decorator does not see
>> the concrete exception that occurred in the impl but an
>> InvocationTargetException and within that, the actual exception.
>>
>> Am I wrong or should I see the actual exception and not the
>> InvocationTargetException? I can't even add an Interceptor to the decorator
>> methods to generically unwrap that exception, because AroundInvoke interceptors
>> are not called if they are applied on decorators. Is that the expected behavior
>> too?
>>
>> Thanks in advance!
>>
>> Regards,
>> Christian
>>
Oh yeah, sorry for that ;-)
Regards,
Christian