You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Ruault Gaetan <gr...@sopragroup.com> on 2010/07/05 09:48:53 UTC

RE: How to use properties in Sca Composite

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:enjoyjava@gmail.com] 
Envoyé : vendredi 25 juin 2010 19:02
À : user@tuscany.apache.org; dev@tuscany.apache.org
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
rfeng@apache.org
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