Hi Raymond, I have a composite hosted in a machine and many references hosted in other machines then i like to store hosts adresses in a propertie file like this : situationPersonneService.host = 192.168.0.1 situationPersonneService.port = 8084 situationContratService.host = 192.168.0.2 situationContratService.port = 8084 and a sca:reference like this : <sca:reference name="situationPersonneService" >
<sca:interface.java interface="com.c2c.referentiel.personne.am.SituationPersonneAm"/> <sca:binding.ws uri="http://{situationPersonneService.host}:{situationPersonneService.port}/petals/services/SituationPersonne"/> </sca:reference> I think this use is very good because, tusany users are free to determine the "URI pattern" for their best use. thanks Gaetan ________________________________ De : Raymond Feng [mailto:[email protected]] Envoyé : vendredi 25 juin 2010 19:02 À : [email protected]; [email protected] Objet : Re: How to use properties in Sca Composite Hi, This is actually a very question. Are you proposing a URI "template" idea that we can use to represent the binding endpoint (with some parameters can be replaced by the hosting environment)? Please tell us a bit more your use case. I started a wiki page before trying to understand the need for the service binding to control which IP address the service will listen on for a multi-homed machine. It might be related to this discussion too. https://cwiki.apache.org/confluence/display/TUSCANYWIKI/IP+addresses+for+service+bindings Raymond ________________________________________________________________ Raymond Feng [email protected] Apache Tuscany PMC member and committer: tuscany.apache.org Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com Personal Web Site: www.enjoyjava.com ________________________________________________________________ On Jun 25, 2010, at 6:58 AM, Ruault Gaetan wrote: Hi, Is it possible to use properties in SCA composite with something like this ?: <sca:binding.ws uri="http:// <http://$HOST_NAME:$PORT/SituationPersonne"/> $HOST_NAME:$PORT/SituationPersonne"/ <http://$HOST_NAME:$PORT/SituationPersonne"/> <http://$HOST_NAME:$PORT/SituationPersonne"/> > thanks Gaetan
