tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano Resende <luckbr1...@gmail.com>
Subject Re: Default WS port - Tuscany 2 runtime
Date Fri, 25 Nov 2011 22:32:59 GMT
On Thu, Nov 24, 2011 at 11:57 AM, Antonio De Berardis
<antonio.de-berardis@aps-prevoyance.fr> wrote:
> Hi,
> I have a question about web service binding, for example:
> <component name="HelloworldComponent">
>     <implementation.java class="sample.HelloworldImpl"/>
>     <service name="Helloworld">
>         <binding.ws/>
>     </service>
> </component>
> When I deploy this component in a webapp on Tomcat, It publishes a service
> at http://localhost:8085/HelloworldComponent/Helloworld. The
> “localhost:8085” seems to be a default value.
> I actually have lots of Tuscany based webapps with many components in them,
> therefore all publishing their webservices at http://localhost:8085/...
> One way to change that is to set the uri attribute in binding.ws. , which
> means that if I want to relocate my webservices in the future I will have to
> change the URI in each and every one of my webapps.
> Is there a way to set a default "Host:Port"? I'm using the tuscany.war
> deployed on Tomcat, is there may be a way to do this in the Tomcat’s conf or
> in Tuscany.war?
> Or if not, what do you think is better to do? Let binding.ws with no URI or
> define it in each WS? Am I missing something? Are you planning to change
> this behavior?
> Best Regards.
> Antonio

We recently did a little workaround to allocate ports, particularly
for test environments, in [1], where you can define your own
implementation which can choose ports based on a property file, or
environment variable.

I'm starting to think that it would be a good idea to be able to add
support for some basic macro resolution/expansion to pieces of the
composite (e.g. properties to be resolved based on contents of a
external file which would allow you to reuse existent configuration to
resolve hostnames, etc)

[1] https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java

Luciano Resende

View raw message