hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: setting properties on an interceptor
Date Sun, 11 Dec 2005 02:19:38 GMT

It looks like you should do:

<interceptor service-id="TransactionInterceptor"> 
  <timeout value=”1000 (or whatever you want it to be)” />

But, I'm not convinced that you're schema is set up correctly.  You're not
adding the timeout value to the parameters.  You might try something like

  <element name="timeout">
    <attribute name="value" translator="int"/>
    <push-attribute attribute="value"/>
    <invoke-parent method="addElement"/>

Now, this is off the top of my head, so it might not work as is.  I'm just
trying to nudge you in the right direction.  But, based on what I see, this
seems like it will work.  Good luck.  Let us know if we can be of any more


From: Colin Taylor [] 
Sent: Saturday, December 10, 2005 8:48 PM
Subject: Re: setting properties on an interceptor

Thanks for you answer, Knut.

Unforunately still havent reached nirvana on this issue or on Hivemind
service configuration in general.
Having looked at the well, complexity of schemas and contributions, I cant
help but wonder is that really necessary for this use case? I just want to
have a default timeout set up from my Transaction Interceptor and have the
ability to override on a per service basis. I started mapping this out with
schemas and contributions and was starting to clock up the lines of xml.
Futhermore I felt like I was programming in xml, which is never a good
feeling as its verbosity and magic mappings start to obscure intent. 

My [still incomplete] attempt follows. If anyone can shed further light I'd
appreciate it, I truly hope I must be missing something. 

  <service-point id="TransactionInterceptor" interface="
        <invoke-factory model="primitive">
            <construct class=TransactionInterceptorFactory">
                <set-service property="factory" service-id="
                <set-configuration configuration-id="TransactionDefaults"

            <element name="timeout">
                <attribute name="value" translator="int"/>

    <configuration-point id="TransactionDefaults" occurs="1">
        Configuration that defines default behavior of the
        It must be contributed exactly once in the whole application. 

            <element name="defaults">
                <element name="timeout">
                    <attribute name="value"/>

    <contribution configuration-id="TransactionDefaults">
            <timeout value="300"/> 

    <service-point id="MyServices" interface="com.MyServices">
            <construct class=" com.MyServicesImpl">
        <interceptor service-id="hivemind.LoggingInterceptor"/>
        <interceptor service-id="TransactionInterceptor"> 
?? what goes here???

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message