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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]