You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Johan Lindquist <jo...@kawoo.co.uk> on 2006/07/19 15:22:21 UTC

MethodInterceptorFactory and multiple interceptors

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

I have recently been using the MethodInterceptorFactory to create
interceptors based on the AOP Alliance libraries.

Now, it is all fine until I realised that I can not have two different
interceptors (using the MethodInterceptorFactory service id) added to
the same service point.

This would make sense if you for example referred to the logging
interceptor - two of it would be kinda dum.  But since the
MethodInterceptorFactory is simply providing the plumbing for the real
implementation, 2 or more of this particular contribution should be fine
right?

Not sure if this is an easy problem to solve or not?

Cheers,

johan

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvjIN1Tv8wj7aQ34RAp8bAJ9hbaK4PExHuKpBx6J+BhBcMj+IvwCfbUDG
HIy+uWB36gAXRWoOkv/HJBM=
=/lZk
-----END PGP SIGNATURE-----

Re: MethodInterceptorFactory and multiple interceptors

Posted by Knut Wannheden <kn...@gmail.com>.
Johan,

Did you try using the "name" attribute on the <interceptor> element? E.g.

       <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
name="foo">
         <impl object="service:SomeService" />
       </interceptor>

       <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
name="bar" after="foo">
         <impl object="instance:com.myco.interceptor.SecurityInterceptor" />
       </interceptor>

--knut

On 7/19/06, Johan Lindquist <jo...@kawoo.co.uk> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi All,
>
> I have recently been using the MethodInterceptorFactory to create
> interceptors based on the AOP Alliance libraries.
>
> Now, it is all fine until I realised that I can not have two different
> interceptors (using the MethodInterceptorFactory service id) added to
> the same service point.
>
> This would make sense if you for example referred to the logging
> interceptor - two of it would be kinda dum.  But since the
> MethodInterceptorFactory is simply providing the plumbing for the real
> implementation, 2 or more of this particular contribution should be fine
> right?
>
> Not sure if this is an easy problem to solve or not?
>
> Cheers,
>
> johan
>
> - --
> you too?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFEvjIN1Tv8wj7aQ34RAp8bAJ9hbaK4PExHuKpBx6J+BhBcMj+IvwCfbUDG
> HIy+uWB36gAXRWoOkv/HJBM=
> =/lZk
> -----END PGP SIGNATURE-----
>

RE: MethodInterceptorFactory and multiple interceptors

Posted by James Carman <ja...@carmanconsulting.com>.
There shouldn't be any difference.  Notice the "name" attribute, as Knut
pointed out.  That's what is used to tell them apart.

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, July 19, 2006 10:19 AM
To: user@hivemind.apache.org
Subject: Re: MethodInterceptorFactory and multiple interceptors

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What happens if you contribute twice to the service point outside of the
service point definition?

Johan

James Carman wrote:
> In my test case for multiple method interceptors, I use multiple like
this:
> 
> <module id="hivemind.lib.test" version="1.0.0">
>   
>   <service-point id="FortuneCookie"
> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>     <create-instance
> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="first">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="second">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>   </service-point>
>   
> </module>
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 9:22 AM
> To: user@hivemind.apache.org
> Subject: MethodInterceptorFactory and multiple interceptors
> 
> Hi All,
> 
> I have recently been using the MethodInterceptorFactory to create
> interceptors based on the AOP Alliance libraries.
> 
> Now, it is all fine until I realised that I can not have two different
> interceptors (using the MethodInterceptorFactory service id) added to
> the same service point.
> 
> This would make sense if you for example referred to the logging
> interceptor - two of it would be kinda dum.  But since the
> MethodInterceptorFactory is simply providing the plumbing for the real
> implementation, 2 or more of this particular contribution should be fine
> right?
> 
> Not sure if this is an easy problem to solve or not?
> 
> Cheers,
> 
> johan
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvj9M1Tv8wj7aQ34RArZiAJsGllZwd5FgwABxjAGU7OJRKathuQCdHoNZ
S6bhZkekFEjAfCrOphjtI0E=
=O2B6
-----END PGP SIGNATURE-----



Re: MethodInterceptorFactory and multiple interceptors

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Interestingly enough - if I remove the after="name", then it works ...

But when I test this in the HiveMind src with the after attribute, it
also works.  Must be a version problem now ...

Anyway, it seems to work for the moment - thanks for the help.

Johan

Johan Lindquist wrote:
> Doesn't seem to make a difference - will continue the chase ...
> 
> Johan
> 
> James Carman wrote:
>>> Yeah, you need to qualify names contributed in other modules.  Prefix them
>>> with the module id (and '.').
>>>
>>> -----Original Message-----
>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>> Sent: Wednesday, July 19, 2006 10:41 AM
>>> To: user@hivemind.apache.org
>>> Subject: Re: MethodInterceptorFactory and multiple interceptors
>>>
>>> Somewhat simplified :)
>>>
>>>
>>> <implementation service-id="com.acme.Service">
>>>         <interceptor name="webservice1"  after="jms1"
>>> service-id="hivemind.lib.MethodInterceptorFactory">
>>>             <impl object="service:WebServiceMethodInterceptor" />
>>>         </interceptor>
>>>     </implementation>
>>>
>>> Also tried fully qualified:
>>>
>>> <implementation service-id="com.acme.Service">
>>>         <interceptor name="webservice1"  after="integration.jms.jms1"
>>> service-id="hivemind.lib.MethodInterceptorFactory">
>>>             <impl object="service:WebServiceMethodInterceptor" />
>>>         </interceptor>
>>>     </implementation>
>>>
>>> Same error with both.
>>>
>>> Johan
>>>
>>> James Carman wrote:
>>>>> What syntax are you using in the hivemodule-webservice.xml file?
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>>>> Sent: Wednesday, July 19, 2006 10:30 AM
>>>>> To: user@hivemind.apache.org
>>>>> Subject: Re: MethodInterceptorFactory and multiple interceptors
>>>>>
>>>>> Ok, i tried the name attribute - does this require a fully qualified
>>>>> name or something?
>>>>>
>>>>> Currently getting the following error:
>>>>>
>>>>> 2006-07-19 16:28:21,919 ERROR com.acme.Service1 [error] Error at
>>>>>
>>> file:/home/johan/forge/projects/integration/target/test-classes/META-INF/hiv
>>>>> emodule-webservice.xml,
>>>>> line 61, column 121: Unknown interceptor contribution dependency
>>>>> 'integration.jms.jms7' (for 'integration.webservice.webservice7').
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Johan
>>>>>
>>>>> James Carman wrote:
>>>>>>> To be honest, that "name" attribute could be documented a bit better,
>>>>>>> especially with respect to this factory.
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>>>>>> Sent: Wednesday, July 19, 2006 10:19 AM
>>>>>>> To: user@hivemind.apache.org
>>>>>>> Subject: Re: MethodInterceptorFactory and multiple interceptors
>>>>>>>
>>>>>>> What happens if you contribute twice to the service point outside of the
>>>>>>> service point definition?
>>>>>>>
>>>>>>> Johan
>>>>>>>
>>>>>>> James Carman wrote:
>>>>>>>>> In my test case for multiple method interceptors, I use multiple like
>>>>>>> this:
>>>>>>>>> <module id="hivemind.lib.test" version="1.0.0">
>>>>>>>>>   
>>>>>>>>>   <service-point id="FortuneCookie"
>>>>>>>>> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>>>>>>>>>     <create-instance
>>>>>>>>> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>>>>>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>>>>>> name="first">
>>>>>>>>>       <impl
>>>>>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
>>>>> />
>>>>>>>>>     </interceptor>
>>>>>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>>>>>> name="second">
>>>>>>>>>       <impl
>>>>>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
>>>>> />
>>>>>>>>>     </interceptor>
>>>>>>>>>   </service-point>
>>>>>>>>>   
>>>>>>>>> </module>
>>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>>>>>>>> Sent: Wednesday, July 19, 2006 9:22 AM
>>>>>>>>> To: user@hivemind.apache.org
>>>>>>>>> Subject: MethodInterceptorFactory and multiple interceptors
>>>>>>>>>
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>> I have recently been using the MethodInterceptorFactory to create
>>>>>>>>> interceptors based on the AOP Alliance libraries.
>>>>>>>>>
>>>>>>>>> Now, it is all fine until I realised that I can not have two different
>>>>>>>>> interceptors (using the MethodInterceptorFactory service id) added to
>>>>>>>>> the same service point.
>>>>>>>>>
>>>>>>>>> This would make sense if you for example referred to the logging
>>>>>>>>> interceptor - two of it would be kinda dum.  But since the
>>>>>>>>> MethodInterceptorFactory is simply providing the plumbing for the real
>>>>>>>>> implementation, 2 or more of this particular contribution should be
>>> fine
>>>>>>>>> right?
>>>>>>>>>
>>>>>>>>> Not sure if this is an easy problem to solve or not?
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>>
>>>>>>>>> johan
>>>>>>>>>
>>>>>>> --
>>>>>>> you too?
>>>>> --
>>>>> you too?
>>> --
>>> you too?
> 
> --
> you too?

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvksm1Tv8wj7aQ34RAo2kAJ0YV0ui2UXEB+E6Q+1S2+bEyhBJpQCgkRUN
YK4SlsTYjkpP6XeLxCmcvbI=
=aEjr
-----END PGP SIGNATURE-----

Re: MethodInterceptorFactory and multiple interceptors

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Doesn't seem to make a difference - will continue the chase ...

Johan

James Carman wrote:
> Yeah, you need to qualify names contributed in other modules.  Prefix them
> with the module id (and '.').
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 10:41 AM
> To: user@hivemind.apache.org
> Subject: Re: MethodInterceptorFactory and multiple interceptors
> 
> Somewhat simplified :)
> 
> 
> <implementation service-id="com.acme.Service">
>         <interceptor name="webservice1"  after="jms1"
> service-id="hivemind.lib.MethodInterceptorFactory">
>             <impl object="service:WebServiceMethodInterceptor" />
>         </interceptor>
>     </implementation>
> 
> Also tried fully qualified:
> 
> <implementation service-id="com.acme.Service">
>         <interceptor name="webservice1"  after="integration.jms.jms1"
> service-id="hivemind.lib.MethodInterceptorFactory">
>             <impl object="service:WebServiceMethodInterceptor" />
>         </interceptor>
>     </implementation>
> 
> Same error with both.
> 
> Johan
> 
> James Carman wrote:
>>> What syntax are you using in the hivemodule-webservice.xml file?
>>>
>>>
>>> -----Original Message-----
>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>> Sent: Wednesday, July 19, 2006 10:30 AM
>>> To: user@hivemind.apache.org
>>> Subject: Re: MethodInterceptorFactory and multiple interceptors
>>>
>>> Ok, i tried the name attribute - does this require a fully qualified
>>> name or something?
>>>
>>> Currently getting the following error:
>>>
>>> 2006-07-19 16:28:21,919 ERROR com.acme.Service1 [error] Error at
>>>
> file:/home/johan/forge/projects/integration/target/test-classes/META-INF/hiv
>>> emodule-webservice.xml,
>>> line 61, column 121: Unknown interceptor contribution dependency
>>> 'integration.jms.jms7' (for 'integration.webservice.webservice7').
>>>
>>> Cheers,
>>>
>>> Johan
>>>
>>> James Carman wrote:
>>>>> To be honest, that "name" attribute could be documented a bit better,
>>>>> especially with respect to this factory.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>>>> Sent: Wednesday, July 19, 2006 10:19 AM
>>>>> To: user@hivemind.apache.org
>>>>> Subject: Re: MethodInterceptorFactory and multiple interceptors
>>>>>
>>>>> What happens if you contribute twice to the service point outside of the
>>>>> service point definition?
>>>>>
>>>>> Johan
>>>>>
>>>>> James Carman wrote:
>>>>>>> In my test case for multiple method interceptors, I use multiple like
>>>>> this:
>>>>>>> <module id="hivemind.lib.test" version="1.0.0">
>>>>>>>   
>>>>>>>   <service-point id="FortuneCookie"
>>>>>>> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>>>>>>>     <create-instance
>>>>>>> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>>>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>>>> name="first">
>>>>>>>       <impl
>>>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
>>> />
>>>>>>>     </interceptor>
>>>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>>>> name="second">
>>>>>>>       <impl
>>>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
>>> />
>>>>>>>     </interceptor>
>>>>>>>   </service-point>
>>>>>>>   
>>>>>>> </module>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>>>>>> Sent: Wednesday, July 19, 2006 9:22 AM
>>>>>>> To: user@hivemind.apache.org
>>>>>>> Subject: MethodInterceptorFactory and multiple interceptors
>>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I have recently been using the MethodInterceptorFactory to create
>>>>>>> interceptors based on the AOP Alliance libraries.
>>>>>>>
>>>>>>> Now, it is all fine until I realised that I can not have two different
>>>>>>> interceptors (using the MethodInterceptorFactory service id) added to
>>>>>>> the same service point.
>>>>>>>
>>>>>>> This would make sense if you for example referred to the logging
>>>>>>> interceptor - two of it would be kinda dum.  But since the
>>>>>>> MethodInterceptorFactory is simply providing the plumbing for the real
>>>>>>> implementation, 2 or more of this particular contribution should be
> fine
>>>>>>> right?
>>>>>>>
>>>>>>> Not sure if this is an easy problem to solve or not?
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> johan
>>>>>>>
>>>>> --
>>>>> you too?
>>> --
>>> you too?
> 
> --
> you too?

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvkg41Tv8wj7aQ34RAkpXAJ4xzBcW0o80m69Hb/uf5JyJ4AyulACfXc4M
NIWK6/t8woLHGYBIG9vhdoY=
=OROc
-----END PGP SIGNATURE-----

RE: MethodInterceptorFactory and multiple interceptors

Posted by James Carman <ja...@carmanconsulting.com>.
Yeah, you need to qualify names contributed in other modules.  Prefix them
with the module id (and '.').

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, July 19, 2006 10:41 AM
To: user@hivemind.apache.org
Subject: Re: MethodInterceptorFactory and multiple interceptors

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somewhat simplified :)


<implementation service-id="com.acme.Service">
        <interceptor name="webservice1"  after="jms1"
service-id="hivemind.lib.MethodInterceptorFactory">
            <impl object="service:WebServiceMethodInterceptor" />
        </interceptor>
    </implementation>

Also tried fully qualified:

<implementation service-id="com.acme.Service">
        <interceptor name="webservice1"  after="integration.jms.jms1"
service-id="hivemind.lib.MethodInterceptorFactory">
            <impl object="service:WebServiceMethodInterceptor" />
        </interceptor>
    </implementation>

Same error with both.

Johan

James Carman wrote:
> What syntax are you using in the hivemodule-webservice.xml file?
> 
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 10:30 AM
> To: user@hivemind.apache.org
> Subject: Re: MethodInterceptorFactory and multiple interceptors
> 
> Ok, i tried the name attribute - does this require a fully qualified
> name or something?
> 
> Currently getting the following error:
> 
> 2006-07-19 16:28:21,919 ERROR com.acme.Service1 [error] Error at
>
file:/home/johan/forge/projects/integration/target/test-classes/META-INF/hiv
> emodule-webservice.xml,
> line 61, column 121: Unknown interceptor contribution dependency
> 'integration.jms.jms7' (for 'integration.webservice.webservice7').
> 
> Cheers,
> 
> Johan
> 
> James Carman wrote:
>>> To be honest, that "name" attribute could be documented a bit better,
>>> especially with respect to this factory.
>>>
>>> -----Original Message-----
>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>> Sent: Wednesday, July 19, 2006 10:19 AM
>>> To: user@hivemind.apache.org
>>> Subject: Re: MethodInterceptorFactory and multiple interceptors
>>>
>>> What happens if you contribute twice to the service point outside of the
>>> service point definition?
>>>
>>> Johan
>>>
>>> James Carman wrote:
>>>>> In my test case for multiple method interceptors, I use multiple like
>>> this:
>>>>> <module id="hivemind.lib.test" version="1.0.0">
>>>>>   
>>>>>   <service-point id="FortuneCookie"
>>>>> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>>>>>     <create-instance
>>>>> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>> name="first">
>>>>>       <impl
>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
> />
>>>>>     </interceptor>
>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>> name="second">
>>>>>       <impl
>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
> />
>>>>>     </interceptor>
>>>>>   </service-point>
>>>>>   
>>>>> </module>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>>>> Sent: Wednesday, July 19, 2006 9:22 AM
>>>>> To: user@hivemind.apache.org
>>>>> Subject: MethodInterceptorFactory and multiple interceptors
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I have recently been using the MethodInterceptorFactory to create
>>>>> interceptors based on the AOP Alliance libraries.
>>>>>
>>>>> Now, it is all fine until I realised that I can not have two different
>>>>> interceptors (using the MethodInterceptorFactory service id) added to
>>>>> the same service point.
>>>>>
>>>>> This would make sense if you for example referred to the logging
>>>>> interceptor - two of it would be kinda dum.  But since the
>>>>> MethodInterceptorFactory is simply providing the plumbing for the real
>>>>> implementation, 2 or more of this particular contribution should be
fine
>>>>> right?
>>>>>
>>>>> Not sure if this is an easy problem to solve or not?
>>>>>
>>>>> Cheers,
>>>>>
>>>>> johan
>>>>>
>>> --
>>> you too?
> 
> --
> you too?

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvkSU1Tv8wj7aQ34RAnf4AJ4rgrwevezgBYIkOSVB6mHGpW7FcwCfbUyZ
wcSsA1SR11zE/OEl2vOSZ88=
=QBzi
-----END PGP SIGNATURE-----



Re: MethodInterceptorFactory and multiple interceptors

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somewhat simplified :)


<implementation service-id="com.acme.Service">
        <interceptor name="webservice1"  after="jms1"
service-id="hivemind.lib.MethodInterceptorFactory">
            <impl object="service:WebServiceMethodInterceptor" />
        </interceptor>
    </implementation>

Also tried fully qualified:

<implementation service-id="com.acme.Service">
        <interceptor name="webservice1"  after="integration.jms.jms1"
service-id="hivemind.lib.MethodInterceptorFactory">
            <impl object="service:WebServiceMethodInterceptor" />
        </interceptor>
    </implementation>

Same error with both.

Johan

James Carman wrote:
> What syntax are you using in the hivemodule-webservice.xml file?
> 
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 10:30 AM
> To: user@hivemind.apache.org
> Subject: Re: MethodInterceptorFactory and multiple interceptors
> 
> Ok, i tried the name attribute - does this require a fully qualified
> name or something?
> 
> Currently getting the following error:
> 
> 2006-07-19 16:28:21,919 ERROR com.acme.Service1 [error] Error at
> file:/home/johan/forge/projects/integration/target/test-classes/META-INF/hiv
> emodule-webservice.xml,
> line 61, column 121: Unknown interceptor contribution dependency
> 'integration.jms.jms7' (for 'integration.webservice.webservice7').
> 
> Cheers,
> 
> Johan
> 
> James Carman wrote:
>>> To be honest, that "name" attribute could be documented a bit better,
>>> especially with respect to this factory.
>>>
>>> -----Original Message-----
>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>> Sent: Wednesday, July 19, 2006 10:19 AM
>>> To: user@hivemind.apache.org
>>> Subject: Re: MethodInterceptorFactory and multiple interceptors
>>>
>>> What happens if you contribute twice to the service point outside of the
>>> service point definition?
>>>
>>> Johan
>>>
>>> James Carman wrote:
>>>>> In my test case for multiple method interceptors, I use multiple like
>>> this:
>>>>> <module id="hivemind.lib.test" version="1.0.0">
>>>>>   
>>>>>   <service-point id="FortuneCookie"
>>>>> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>>>>>     <create-instance
>>>>> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>> name="first">
>>>>>       <impl
>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
> />
>>>>>     </interceptor>
>>>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>>>> name="second">
>>>>>       <impl
>>>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
> />
>>>>>     </interceptor>
>>>>>   </service-point>
>>>>>   
>>>>> </module>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>>>> Sent: Wednesday, July 19, 2006 9:22 AM
>>>>> To: user@hivemind.apache.org
>>>>> Subject: MethodInterceptorFactory and multiple interceptors
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I have recently been using the MethodInterceptorFactory to create
>>>>> interceptors based on the AOP Alliance libraries.
>>>>>
>>>>> Now, it is all fine until I realised that I can not have two different
>>>>> interceptors (using the MethodInterceptorFactory service id) added to
>>>>> the same service point.
>>>>>
>>>>> This would make sense if you for example referred to the logging
>>>>> interceptor - two of it would be kinda dum.  But since the
>>>>> MethodInterceptorFactory is simply providing the plumbing for the real
>>>>> implementation, 2 or more of this particular contribution should be fine
>>>>> right?
>>>>>
>>>>> Not sure if this is an easy problem to solve or not?
>>>>>
>>>>> Cheers,
>>>>>
>>>>> johan
>>>>>
>>> --
>>> you too?
> 
> --
> you too?

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvkSU1Tv8wj7aQ34RAnf4AJ4rgrwevezgBYIkOSVB6mHGpW7FcwCfbUyZ
wcSsA1SR11zE/OEl2vOSZ88=
=QBzi
-----END PGP SIGNATURE-----

RE: MethodInterceptorFactory and multiple interceptors

Posted by James Carman <ja...@carmanconsulting.com>.
What syntax are you using in the hivemodule-webservice.xml file?


-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, July 19, 2006 10:30 AM
To: user@hivemind.apache.org
Subject: Re: MethodInterceptorFactory and multiple interceptors

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok, i tried the name attribute - does this require a fully qualified
name or something?

Currently getting the following error:

2006-07-19 16:28:21,919 ERROR com.acme.Service1 [error] Error at
file:/home/johan/forge/projects/integration/target/test-classes/META-INF/hiv
emodule-webservice.xml,
line 61, column 121: Unknown interceptor contribution dependency
'integration.jms.jms7' (for 'integration.webservice.webservice7').

Cheers,

Johan

James Carman wrote:
> To be honest, that "name" attribute could be documented a bit better,
> especially with respect to this factory.
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 10:19 AM
> To: user@hivemind.apache.org
> Subject: Re: MethodInterceptorFactory and multiple interceptors
> 
> What happens if you contribute twice to the service point outside of the
> service point definition?
> 
> Johan
> 
> James Carman wrote:
>>> In my test case for multiple method interceptors, I use multiple like
> this:
>>> <module id="hivemind.lib.test" version="1.0.0">
>>>   
>>>   <service-point id="FortuneCookie"
>>> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>>>     <create-instance
>>> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>> name="first">
>>>       <impl
>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
/>
>>>     </interceptor>
>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>> name="second">
>>>       <impl
>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor"
/>
>>>     </interceptor>
>>>   </service-point>
>>>   
>>> </module>
>>>
>>> -----Original Message-----
>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>> Sent: Wednesday, July 19, 2006 9:22 AM
>>> To: user@hivemind.apache.org
>>> Subject: MethodInterceptorFactory and multiple interceptors
>>>
>>> Hi All,
>>>
>>> I have recently been using the MethodInterceptorFactory to create
>>> interceptors based on the AOP Alliance libraries.
>>>
>>> Now, it is all fine until I realised that I can not have two different
>>> interceptors (using the MethodInterceptorFactory service id) added to
>>> the same service point.
>>>
>>> This would make sense if you for example referred to the logging
>>> interceptor - two of it would be kinda dum.  But since the
>>> MethodInterceptorFactory is simply providing the plumbing for the real
>>> implementation, 2 or more of this particular contribution should be fine
>>> right?
>>>
>>> Not sure if this is an easy problem to solve or not?
>>>
>>> Cheers,
>>>
>>> johan
>>>
> 
> --
> you too?

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvkH11Tv8wj7aQ34RAmUhAJ9ht5C6Y3Pd20e9nAODNCqXZS2uUgCeIHXG
0/aRJRJI5q7ObiPmNku0tfQ=
=v9SQ
-----END PGP SIGNATURE-----



Re: MethodInterceptorFactory and multiple interceptors

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok, i tried the name attribute - does this require a fully qualified
name or something?

Currently getting the following error:

2006-07-19 16:28:21,919 ERROR com.acme.Service1 [error] Error at
file:/home/johan/forge/projects/integration/target/test-classes/META-INF/hivemodule-webservice.xml,
line 61, column 121: Unknown interceptor contribution dependency
'integration.jms.jms7' (for 'integration.webservice.webservice7').

Cheers,

Johan

James Carman wrote:
> To be honest, that "name" attribute could be documented a bit better,
> especially with respect to this factory.
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 10:19 AM
> To: user@hivemind.apache.org
> Subject: Re: MethodInterceptorFactory and multiple interceptors
> 
> What happens if you contribute twice to the service point outside of the
> service point definition?
> 
> Johan
> 
> James Carman wrote:
>>> In my test case for multiple method interceptors, I use multiple like
> this:
>>> <module id="hivemind.lib.test" version="1.0.0">
>>>   
>>>   <service-point id="FortuneCookie"
>>> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>>>     <create-instance
>>> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>> name="first">
>>>       <impl
>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>>>     </interceptor>
>>>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
>>> name="second">
>>>       <impl
>>> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>>>     </interceptor>
>>>   </service-point>
>>>   
>>> </module>
>>>
>>> -----Original Message-----
>>> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
>>> Sent: Wednesday, July 19, 2006 9:22 AM
>>> To: user@hivemind.apache.org
>>> Subject: MethodInterceptorFactory and multiple interceptors
>>>
>>> Hi All,
>>>
>>> I have recently been using the MethodInterceptorFactory to create
>>> interceptors based on the AOP Alliance libraries.
>>>
>>> Now, it is all fine until I realised that I can not have two different
>>> interceptors (using the MethodInterceptorFactory service id) added to
>>> the same service point.
>>>
>>> This would make sense if you for example referred to the logging
>>> interceptor - two of it would be kinda dum.  But since the
>>> MethodInterceptorFactory is simply providing the plumbing for the real
>>> implementation, 2 or more of this particular contribution should be fine
>>> right?
>>>
>>> Not sure if this is an easy problem to solve or not?
>>>
>>> Cheers,
>>>
>>> johan
>>>
> 
> --
> you too?

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvkH11Tv8wj7aQ34RAmUhAJ9ht5C6Y3Pd20e9nAODNCqXZS2uUgCeIHXG
0/aRJRJI5q7ObiPmNku0tfQ=
=v9SQ
-----END PGP SIGNATURE-----

RE: MethodInterceptorFactory and multiple interceptors

Posted by James Carman <ja...@carmanconsulting.com>.
To be honest, that "name" attribute could be documented a bit better,
especially with respect to this factory.

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, July 19, 2006 10:19 AM
To: user@hivemind.apache.org
Subject: Re: MethodInterceptorFactory and multiple interceptors

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What happens if you contribute twice to the service point outside of the
service point definition?

Johan

James Carman wrote:
> In my test case for multiple method interceptors, I use multiple like
this:
> 
> <module id="hivemind.lib.test" version="1.0.0">
>   
>   <service-point id="FortuneCookie"
> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>     <create-instance
> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="first">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="second">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>   </service-point>
>   
> </module>
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 9:22 AM
> To: user@hivemind.apache.org
> Subject: MethodInterceptorFactory and multiple interceptors
> 
> Hi All,
> 
> I have recently been using the MethodInterceptorFactory to create
> interceptors based on the AOP Alliance libraries.
> 
> Now, it is all fine until I realised that I can not have two different
> interceptors (using the MethodInterceptorFactory service id) added to
> the same service point.
> 
> This would make sense if you for example referred to the logging
> interceptor - two of it would be kinda dum.  But since the
> MethodInterceptorFactory is simply providing the plumbing for the real
> implementation, 2 or more of this particular contribution should be fine
> right?
> 
> Not sure if this is an easy problem to solve or not?
> 
> Cheers,
> 
> johan
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvj9M1Tv8wj7aQ34RArZiAJsGllZwd5FgwABxjAGU7OJRKathuQCdHoNZ
S6bhZkekFEjAfCrOphjtI0E=
=O2B6
-----END PGP SIGNATURE-----



Re: MethodInterceptorFactory and multiple interceptors

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What happens if you contribute twice to the service point outside of the
service point definition?

Johan

James Carman wrote:
> In my test case for multiple method interceptors, I use multiple like this:
> 
> <module id="hivemind.lib.test" version="1.0.0">
>   
>   <service-point id="FortuneCookie"
> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>     <create-instance
> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="first">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="second">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>   </service-point>
>   
> </module>
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 9:22 AM
> To: user@hivemind.apache.org
> Subject: MethodInterceptorFactory and multiple interceptors
> 
> Hi All,
> 
> I have recently been using the MethodInterceptorFactory to create
> interceptors based on the AOP Alliance libraries.
> 
> Now, it is all fine until I realised that I can not have two different
> interceptors (using the MethodInterceptorFactory service id) added to
> the same service point.
> 
> This would make sense if you for example referred to the logging
> interceptor - two of it would be kinda dum.  But since the
> MethodInterceptorFactory is simply providing the plumbing for the real
> implementation, 2 or more of this particular contribution should be fine
> right?
> 
> Not sure if this is an easy problem to solve or not?
> 
> Cheers,
> 
> johan
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvj9M1Tv8wj7aQ34RArZiAJsGllZwd5FgwABxjAGU7OJRKathuQCdHoNZ
S6bhZkekFEjAfCrOphjtI0E=
=O2B6
-----END PGP SIGNATURE-----

RE: MethodInterceptorFactory and multiple interceptors

Posted by James Carman <ja...@carmanconsulting.com>.
In my test case for multiple method interceptors, I use multiple like this:

<module id="hivemind.lib.test" version="1.0.0">
  
  <service-point id="FortuneCookie"
interface="org.apache.hivemind.lib.impl.FortuneCookie">
    <create-instance
class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
    <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
name="first">
      <impl
object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
    </interceptor>
    <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
name="second">
      <impl
object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
    </interceptor>
  </service-point>
  
</module>

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, July 19, 2006 9:22 AM
To: user@hivemind.apache.org
Subject: MethodInterceptorFactory and multiple interceptors

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

I have recently been using the MethodInterceptorFactory to create
interceptors based on the AOP Alliance libraries.

Now, it is all fine until I realised that I can not have two different
interceptors (using the MethodInterceptorFactory service id) added to
the same service point.

This would make sense if you for example referred to the logging
interceptor - two of it would be kinda dum.  But since the
MethodInterceptorFactory is simply providing the plumbing for the real
implementation, 2 or more of this particular contribution should be fine
right?

Not sure if this is an easy problem to solve or not?

Cheers,

johan

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvjIN1Tv8wj7aQ34RAp8bAJ9hbaK4PExHuKpBx6J+BhBcMj+IvwCfbUDG
HIy+uWB36gAXRWoOkv/HJBM=
=/lZk
-----END PGP SIGNATURE-----