You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Rohan Sahgal <ro...@gmail.com> on 2009/03/10 20:04:31 UTC

Using SCADomain.newInstance to start a server on a different port

Hi all,
I have been using SCADomain.newInstance to start a domain and deploy a
composite file.

This always starts a jetty server on port 8080.

Now, I have run into issues where the port 8080 is already being used
by some other application (and I cannot change that). I was wondering
whether there's a way to make it start on a different port.

I was trying something like
SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");

but that still starts a server at 8080.

Thanks,
Rohan

Re: Using SCADomain.newInstance to start a server on a different port

Posted by ant elder <an...@apache.org>.
On Wed, Mar 18, 2009 at 3:28 PM, Rohan Sahgal <ro...@gmail.com> wrote:
> Thanks, keep me in the loop.
>
> - Rohan
>

>> Its interesting that you assumed setting the domain uri ( i.e. with
>> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>> ) might change the port that is used by default, that doesn't work but
>> it seems like it could be a useful and harmless thing to do. I've not
>> tried but i think that shouldn't be too hard to add, I've CC'd the dev
>> list on this email so see what others think about adding that feature?
>>

I've now added that support so the default port can be picked up from
SCADomain.newInstance, will be available in the 1.5 release.

   ...ant

Re: Using SCADomain.newInstance to start a server on a different port

Posted by Rohan Sahgal <ro...@gmail.com>.
Thanks, keep me in the loop.

- Rohan

On Wed, Mar 18, 2009 at 6:57 AM, ant elder <an...@gmail.com> wrote:
> This is an issue about the base uri of the domain/node that we've
> never really had a very good story for in Tuscany, its not specific to
> the DWR binding, and I agree with you it would be nice to avoid hard
> coding the port in the composite.
>
> Its interesting that you assumed setting the domain uri ( i.e. with
> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
> ) might change the port that is used by default, that doesn't work but
> it seems like it could be a useful and harmless thing to do. I've not
> tried but i think that shouldn't be too hard to add, I've CC'd the dev
> list on this email so see what others think about adding that feature?
>
>   ...ant
>
> On Tue, Mar 10, 2009 at 11:58 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>> I was trying to use the DWR binding.
>> I dont think it has a uri attribute.
>>
>> Even if it did, I want to leave the port configurable (if we run into
>> similar issues again). Having it hardcoded in the composite will make
>> the application highly unmaintainable.
>>
>> Long back, I was trying to get the distributed sample working. I think
>> that starts the server on a different port. Do you think I can use
>> something of that sort even though I dont really have a distributed
>> application (its all just specified in one composite file).
>>
>> Thanks,
>> Rohan
>>
>> On Tue, Mar 10, 2009 at 2:10 PM, Luciano Resende <lu...@gmail.com> wrote:
>>> How does your composite look like ?
>>> Most of the times, you could set a binding uri and set the proper port
>>> there, as the example below
>>>
>>> <component name="Store">
>>>        <t:implementation.widget location="uiservices/store.html"/>
>>>        <service name="Widget">
>>>                <t:binding.http uri="http://localhost:8085/store"/>
>>>        </service>
>>>                <reference name="catalog" target="Catalog">
>>>                        <t:binding.jsonrpc/>
>>>                 </reference>
>>>                 <reference name="shoppingCart" target="ShoppingCart/Cart">
>>>                        <t:binding.atom/>
>>>                 </reference>
>>>                 <reference name="shoppingTotal" target="ShoppingCart/Total">
>>>                        <t:binding.jsonrpc/>
>>>                 </reference>
>>>    </component>
>>>
>>>
>>> On Tue, Mar 10, 2009 at 12:04 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>>>> Hi all,
>>>> I have been using SCADomain.newInstance to start a domain and deploy a
>>>> composite file.
>>>>
>>>> This always starts a jetty server on port 8080.
>>>>
>>>> Now, I have run into issues where the port 8080 is already being used
>>>> by some other application (and I cannot change that). I was wondering
>>>> whether there's a way to make it start on a different port.
>>>>
>>>> I was trying something like
>>>> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>>>>
>>>> but that still starts a server at 8080.
>>>>
>>>> Thanks,
>>>> Rohan
>>>>
>>>
>>>
>>>
>>> --
>>> Luciano Resende
>>> Apache Tuscany, Apache PhotArk
>>> http://people.apache.org/~lresende
>>> http://lresende.blogspot.com/
>>>
>>
>

Re: Using SCADomain.newInstance to start a server on a different port

Posted by Rohan Sahgal <ro...@gmail.com>.
Thanks, keep me in the loop.

- Rohan

On Wed, Mar 18, 2009 at 6:57 AM, ant elder <an...@gmail.com> wrote:
> This is an issue about the base uri of the domain/node that we've
> never really had a very good story for in Tuscany, its not specific to
> the DWR binding, and I agree with you it would be nice to avoid hard
> coding the port in the composite.
>
> Its interesting that you assumed setting the domain uri ( i.e. with
> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
> ) might change the port that is used by default, that doesn't work but
> it seems like it could be a useful and harmless thing to do. I've not
> tried but i think that shouldn't be too hard to add, I've CC'd the dev
> list on this email so see what others think about adding that feature?
>
>   ...ant
>
> On Tue, Mar 10, 2009 at 11:58 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>> I was trying to use the DWR binding.
>> I dont think it has a uri attribute.
>>
>> Even if it did, I want to leave the port configurable (if we run into
>> similar issues again). Having it hardcoded in the composite will make
>> the application highly unmaintainable.
>>
>> Long back, I was trying to get the distributed sample working. I think
>> that starts the server on a different port. Do you think I can use
>> something of that sort even though I dont really have a distributed
>> application (its all just specified in one composite file).
>>
>> Thanks,
>> Rohan
>>
>> On Tue, Mar 10, 2009 at 2:10 PM, Luciano Resende <lu...@gmail.com> wrote:
>>> How does your composite look like ?
>>> Most of the times, you could set a binding uri and set the proper port
>>> there, as the example below
>>>
>>> <component name="Store">
>>>        <t:implementation.widget location="uiservices/store.html"/>
>>>        <service name="Widget">
>>>                <t:binding.http uri="http://localhost:8085/store"/>
>>>        </service>
>>>                <reference name="catalog" target="Catalog">
>>>                        <t:binding.jsonrpc/>
>>>                 </reference>
>>>                 <reference name="shoppingCart" target="ShoppingCart/Cart">
>>>                        <t:binding.atom/>
>>>                 </reference>
>>>                 <reference name="shoppingTotal" target="ShoppingCart/Total">
>>>                        <t:binding.jsonrpc/>
>>>                 </reference>
>>>    </component>
>>>
>>>
>>> On Tue, Mar 10, 2009 at 12:04 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>>>> Hi all,
>>>> I have been using SCADomain.newInstance to start a domain and deploy a
>>>> composite file.
>>>>
>>>> This always starts a jetty server on port 8080.
>>>>
>>>> Now, I have run into issues where the port 8080 is already being used
>>>> by some other application (and I cannot change that). I was wondering
>>>> whether there's a way to make it start on a different port.
>>>>
>>>> I was trying something like
>>>> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>>>>
>>>> but that still starts a server at 8080.
>>>>
>>>> Thanks,
>>>> Rohan
>>>>
>>>
>>>
>>>
>>> --
>>> Luciano Resende
>>> Apache Tuscany, Apache PhotArk
>>> http://people.apache.org/~lresende
>>> http://lresende.blogspot.com/
>>>
>>
>

Re: Using SCADomain.newInstance to start a server on a different port

Posted by ant elder <an...@gmail.com>.
This is an issue about the base uri of the domain/node that we've
never really had a very good story for in Tuscany, its not specific to
the DWR binding, and I agree with you it would be nice to avoid hard
coding the port in the composite.

Its interesting that you assumed setting the domain uri ( i.e. with
SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
) might change the port that is used by default, that doesn't work but
it seems like it could be a useful and harmless thing to do. I've not
tried but i think that shouldn't be too hard to add, I've CC'd the dev
list on this email so see what others think about adding that feature?

   ...ant

On Tue, Mar 10, 2009 at 11:58 PM, Rohan Sahgal <ro...@gmail.com> wrote:
> I was trying to use the DWR binding.
> I dont think it has a uri attribute.
>
> Even if it did, I want to leave the port configurable (if we run into
> similar issues again). Having it hardcoded in the composite will make
> the application highly unmaintainable.
>
> Long back, I was trying to get the distributed sample working. I think
> that starts the server on a different port. Do you think I can use
> something of that sort even though I dont really have a distributed
> application (its all just specified in one composite file).
>
> Thanks,
> Rohan
>
> On Tue, Mar 10, 2009 at 2:10 PM, Luciano Resende <lu...@gmail.com> wrote:
>> How does your composite look like ?
>> Most of the times, you could set a binding uri and set the proper port
>> there, as the example below
>>
>> <component name="Store">
>>        <t:implementation.widget location="uiservices/store.html"/>
>>        <service name="Widget">
>>                <t:binding.http uri="http://localhost:8085/store"/>
>>        </service>
>>                <reference name="catalog" target="Catalog">
>>                        <t:binding.jsonrpc/>
>>                 </reference>
>>                 <reference name="shoppingCart" target="ShoppingCart/Cart">
>>                        <t:binding.atom/>
>>                 </reference>
>>                 <reference name="shoppingTotal" target="ShoppingCart/Total">
>>                        <t:binding.jsonrpc/>
>>                 </reference>
>>    </component>
>>
>>
>> On Tue, Mar 10, 2009 at 12:04 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>>> Hi all,
>>> I have been using SCADomain.newInstance to start a domain and deploy a
>>> composite file.
>>>
>>> This always starts a jetty server on port 8080.
>>>
>>> Now, I have run into issues where the port 8080 is already being used
>>> by some other application (and I cannot change that). I was wondering
>>> whether there's a way to make it start on a different port.
>>>
>>> I was trying something like
>>> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>>>
>>> but that still starts a server at 8080.
>>>
>>> Thanks,
>>> Rohan
>>>
>>
>>
>>
>> --
>> Luciano Resende
>> Apache Tuscany, Apache PhotArk
>> http://people.apache.org/~lresende
>> http://lresende.blogspot.com/
>>
>

Re: Using SCADomain.newInstance to start a server on a different port

Posted by Luciano Resende <lu...@gmail.com>.
On Thu, Mar 12, 2009 at 11:46 AM, Rohan Sahgal <ro...@gmail.com> wrote:
> Has anyone else faced this issue before.
>

Looks like you are right and there is not an option for URI in the DWR binding.
Ant Elder has been working on this binding, and maybe he can give you
a solution early next week when he gets back from holidays.

-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Using SCADomain.newInstance to start a server on a different port

Posted by Rohan Sahgal <ro...@gmail.com>.
Has anyone else faced this issue before.

On Tue, Mar 10, 2009 at 4:58 PM, Rohan Sahgal <ro...@gmail.com> wrote:
> I was trying to use the DWR binding.
> I dont think it has a uri attribute.
>
> Even if it did, I want to leave the port configurable (if we run into
> similar issues again). Having it hardcoded in the composite will make
> the application highly unmaintainable.
>
> Long back, I was trying to get the distributed sample working. I think
> that starts the server on a different port. Do you think I can use
> something of that sort even though I dont really have a distributed
> application (its all just specified in one composite file).
>
> Thanks,
> Rohan
>
> On Tue, Mar 10, 2009 at 2:10 PM, Luciano Resende <lu...@gmail.com> wrote:
>> How does your composite look like ?
>> Most of the times, you could set a binding uri and set the proper port
>> there, as the example below
>>
>> <component name="Store">
>>        <t:implementation.widget location="uiservices/store.html"/>
>>        <service name="Widget">
>>                <t:binding.http uri="http://localhost:8085/store"/>
>>        </service>
>>                <reference name="catalog" target="Catalog">
>>                        <t:binding.jsonrpc/>
>>                 </reference>
>>                 <reference name="shoppingCart" target="ShoppingCart/Cart">
>>                        <t:binding.atom/>
>>                 </reference>
>>                 <reference name="shoppingTotal" target="ShoppingCart/Total">
>>                        <t:binding.jsonrpc/>
>>                 </reference>
>>    </component>
>>
>>
>> On Tue, Mar 10, 2009 at 12:04 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>>> Hi all,
>>> I have been using SCADomain.newInstance to start a domain and deploy a
>>> composite file.
>>>
>>> This always starts a jetty server on port 8080.
>>>
>>> Now, I have run into issues where the port 8080 is already being used
>>> by some other application (and I cannot change that). I was wondering
>>> whether there's a way to make it start on a different port.
>>>
>>> I was trying something like
>>> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>>>
>>> but that still starts a server at 8080.
>>>
>>> Thanks,
>>> Rohan
>>>
>>
>>
>>
>> --
>> Luciano Resende
>> Apache Tuscany, Apache PhotArk
>> http://people.apache.org/~lresende
>> http://lresende.blogspot.com/
>>
>

Re: Using SCADomain.newInstance to start a server on a different port

Posted by ant elder <an...@gmail.com>.
This is an issue about the base uri of the domain/node that we've
never really had a very good story for in Tuscany, its not specific to
the DWR binding, and I agree with you it would be nice to avoid hard
coding the port in the composite.

Its interesting that you assumed setting the domain uri ( i.e. with
SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
) might change the port that is used by default, that doesn't work but
it seems like it could be a useful and harmless thing to do. I've not
tried but i think that shouldn't be too hard to add, I've CC'd the dev
list on this email so see what others think about adding that feature?

   ...ant

On Tue, Mar 10, 2009 at 11:58 PM, Rohan Sahgal <ro...@gmail.com> wrote:
> I was trying to use the DWR binding.
> I dont think it has a uri attribute.
>
> Even if it did, I want to leave the port configurable (if we run into
> similar issues again). Having it hardcoded in the composite will make
> the application highly unmaintainable.
>
> Long back, I was trying to get the distributed sample working. I think
> that starts the server on a different port. Do you think I can use
> something of that sort even though I dont really have a distributed
> application (its all just specified in one composite file).
>
> Thanks,
> Rohan
>
> On Tue, Mar 10, 2009 at 2:10 PM, Luciano Resende <lu...@gmail.com> wrote:
>> How does your composite look like ?
>> Most of the times, you could set a binding uri and set the proper port
>> there, as the example below
>>
>> <component name="Store">
>>        <t:implementation.widget location="uiservices/store.html"/>
>>        <service name="Widget">
>>                <t:binding.http uri="http://localhost:8085/store"/>
>>        </service>
>>                <reference name="catalog" target="Catalog">
>>                        <t:binding.jsonrpc/>
>>                 </reference>
>>                 <reference name="shoppingCart" target="ShoppingCart/Cart">
>>                        <t:binding.atom/>
>>                 </reference>
>>                 <reference name="shoppingTotal" target="ShoppingCart/Total">
>>                        <t:binding.jsonrpc/>
>>                 </reference>
>>    </component>
>>
>>
>> On Tue, Mar 10, 2009 at 12:04 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>>> Hi all,
>>> I have been using SCADomain.newInstance to start a domain and deploy a
>>> composite file.
>>>
>>> This always starts a jetty server on port 8080.
>>>
>>> Now, I have run into issues where the port 8080 is already being used
>>> by some other application (and I cannot change that). I was wondering
>>> whether there's a way to make it start on a different port.
>>>
>>> I was trying something like
>>> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>>>
>>> but that still starts a server at 8080.
>>>
>>> Thanks,
>>> Rohan
>>>
>>
>>
>>
>> --
>> Luciano Resende
>> Apache Tuscany, Apache PhotArk
>> http://people.apache.org/~lresende
>> http://lresende.blogspot.com/
>>
>

Re: Using SCADomain.newInstance to start a server on a different port

Posted by Rohan Sahgal <ro...@gmail.com>.
I was trying to use the DWR binding.
I dont think it has a uri attribute.

Even if it did, I want to leave the port configurable (if we run into
similar issues again). Having it hardcoded in the composite will make
the application highly unmaintainable.

Long back, I was trying to get the distributed sample working. I think
that starts the server on a different port. Do you think I can use
something of that sort even though I dont really have a distributed
application (its all just specified in one composite file).

Thanks,
Rohan

On Tue, Mar 10, 2009 at 2:10 PM, Luciano Resende <lu...@gmail.com> wrote:
> How does your composite look like ?
> Most of the times, you could set a binding uri and set the proper port
> there, as the example below
>
> <component name="Store">
>        <t:implementation.widget location="uiservices/store.html"/>
>        <service name="Widget">
>                <t:binding.http uri="http://localhost:8085/store"/>
>        </service>
>                <reference name="catalog" target="Catalog">
>                        <t:binding.jsonrpc/>
>                 </reference>
>                 <reference name="shoppingCart" target="ShoppingCart/Cart">
>                        <t:binding.atom/>
>                 </reference>
>                 <reference name="shoppingTotal" target="ShoppingCart/Total">
>                        <t:binding.jsonrpc/>
>                 </reference>
>    </component>
>
>
> On Tue, Mar 10, 2009 at 12:04 PM, Rohan Sahgal <ro...@gmail.com> wrote:
>> Hi all,
>> I have been using SCADomain.newInstance to start a domain and deploy a
>> composite file.
>>
>> This always starts a jetty server on port 8080.
>>
>> Now, I have run into issues where the port 8080 is already being used
>> by some other application (and I cannot change that). I was wondering
>> whether there's a way to make it start on a different port.
>>
>> I was trying something like
>> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>>
>> but that still starts a server at 8080.
>>
>> Thanks,
>> Rohan
>>
>
>
>
> --
> Luciano Resende
> Apache Tuscany, Apache PhotArk
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>

Re: Using SCADomain.newInstance to start a server on a different port

Posted by Luciano Resende <lu...@gmail.com>.
How does your composite look like ?
Most of the times, you could set a binding uri and set the proper port
there, as the example below

<component name="Store">
        <t:implementation.widget location="uiservices/store.html"/>
        <service name="Widget">
        	<t:binding.http uri="http://localhost:8085/store"/>
        </service>
		<reference name="catalog" target="Catalog">
		 	<t:binding.jsonrpc/>
		 </reference>
		 <reference name="shoppingCart" target="ShoppingCart/Cart">
		 	<t:binding.atom/>
		 </reference>
		 <reference name="shoppingTotal" target="ShoppingCart/Total">
		 	<t:binding.jsonrpc/>
		 </reference>
    </component>


On Tue, Mar 10, 2009 at 12:04 PM, Rohan Sahgal <ro...@gmail.com> wrote:
> Hi all,
> I have been using SCADomain.newInstance to start a domain and deploy a
> composite file.
>
> This always starts a jetty server on port 8080.
>
> Now, I have run into issues where the port 8080 is already being used
> by some other application (and I cannot change that). I was wondering
> whether there's a way to make it start on a different port.
>
> I was trying something like
> SCADomain.newInstance("http://localhost:9090","/","Calculator.composite");
>
> but that still starts a server at 8080.
>
> Thanks,
> Rohan
>



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/