Ok thanks. The  <binding.ws> element is also extensible so this axis2 config
could be added as extra attributes or elements there couldn't it, eg <
binding.ws timeOut="300000" />? Which seems simpler if allowed so why is the
policySet approach better?

   ...ant

On Tue, Mar 4, 2008 at 5:37 PM, Venkata Krishnan <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I am just about going to check in what Sebastien is suggesting here.  So
> you
> could define a PolicySet as follows : -
>
> <sca:policySet name="tuscany:Axis2ConnectionsConfPolicySet"
>     provides=""
>     appliesTo="sca:binding.ws"
>     tuscany:alwaysAppliesTo="sca:[EMAIL PROTECTED]'SomeName']"
>     >
>     <ConnectionsConf>
>            <NoOfConnections> 100 </NoOfConnections>
>            <TimeOut>300000</TimeOut>
>     </ConnectionsConf>
>  </sca:policySet>
>
>
> Where the only thing you might have to define is that structure
> <ConnetionsConf> and the xml processing for it.  Then you need to write
> your
> handler for this policyset and register it in the binding module's
> META-INF/services.  Thats it.
>
> - Venkat
>
> On Tue, Mar 4, 2008 at 10:30 PM, ant elder <[EMAIL PROTECTED]> wrote:
>
> > On Tue, Mar 4, 2008 at 4:34 PM, Jean-Sebastien Delfino <
> > [EMAIL PROTECTED]>
> > wrote:
> >
> > > ant elder wrote:
> > > > For a few things i've wondered about using intents to configure the
> > > > behaviour of an extension but cant see how to code it without hard
> > > coding
> > > > values. Using TUSCANY-1997 as an example is there some way of saying
> > > > something like <binding.ws requires="lotsOfConnections" /> and have
> > that
> > > map
> > > > to a user configurable value like 10? I can see how to use an intent
> > > named
> > > > "lotsOfConnections" in a definitions.xml file but is there a way to
> > map
> > > a
> > > > value like 10 to that without just hard coding the mapping in the ws
> > > binding
> > > > code?
> > >
> > > Yes, the policy framework allows you to define in definitions.xml a
> > > policySet matching an intent, place in the policySet the desired
> > > configuration in a form understood by the binding code, then that
> > > configuration will be presented to your binding.
> > >
> > > For a scenario like "configure lots of connections on a reference with
> > > binding.ws", there is a better way than using an intent (i.e. I don't
> > > think that defining an intent for something like "lotsOfConnections"
> is
> > > the proper usage of policies):
> > > - you can just define the policySet, without an intent
> > > - add the policySet explicitly to your composition
> > > - or, better, attach it to your composition externally as discussed on
> > > tuscany-dev [1], the OASIS SCA Policy group [2] and in JIRA
> TUSCANY-1997
> > > [2].
> > >
> > > [1] http://marc.info/?l=tuscany-dev&m=120346977514972
> > > [2] http://www.osoa.org/jira/browse/POLICY-15
> > > [3]
> > >
> > >
> >
> http://issues.apache.org/jira/browse/TUSCANY-1997?focusedCommentId=12570553#action_12570553
> > > --
> > > Jean-Sebastien
> > >
> > >
> > Could you show some XML snippets for how that would look?
> >
> >   ...ant
> >
>

Reply via email to