There is no issue here. I will see how this can be implemented. This will
address the situations where;

1. You need full control over the ports & define all ports
2. You just want to start some servers, and do not require full control over
the ports.

Azeez

On Mon, May 16, 2011 at 11:30 AM, Hiranya Jayathilaka <hira...@wso2.com>wrote:

>
>
> On Mon, May 16, 2011 at 11:18 AM, Anjana Fernando <anj...@wso2.com> wrote:
>
>> Hi,
>>
>> Yeah, but from the usability point of view also, scripting the server
>> startup wont be much of an user-friendly thing to do I guess,
>>
>
> You need to script the server startup only of you want to enforce some
> startup order. For most scenarios you don't need that. If you want to setup
> a simple DSS+ESB scenario on the same machine for a quick demo it doesn't
> matter which starts up first.
>
>
>> and IMHO, the dynamic port assignment is too unpredictable to be used in a
>> consistent manner, where if we use something similar to what I suggested, it
>> will either succeed or the server will fail to startup.
>
>
> If you need consistency then you can go through the trouble of setting
> distinct port numbers in config files. The solution suggested here is just a
> usability thing - to make the simple case simpler. If I want to try out a
> simple ESB cluster I don't care which one takes which port number.
>
>
>> Also, the extension mechanism as you mentioned won't be guaranteed to
>> support in every library we use :) ..
>>
>
> I agree this is a bit problematic. But we can always find a way.
>
> Thanks,
> Hiranya
>
>
> This
>
>
>>
>> Cheers,
>> Anjana.
>>
>>
>> On Mon, May 16, 2011 at 11:12 AM, Hiranya Jayathilaka 
>> <hira...@wso2.com>wrote:
>>
>>> Hi,
>>>
>>> On Mon, May 16, 2011 at 11:05 AM, Anjana Fernando <anj...@wso2.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> On Mon, May 16, 2011 at 10:48 AM, Hiranya Jayathilaka <hira...@wso2.com
>>>> > wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, May 16, 2011 at 10:40 AM, Anjana Fernando <anj...@wso2.com>wrote:
>>>>>
>>>>>> Hi Hiranya,
>>>>>>
>>>>>> On Mon, May 16, 2011 at 9:51 AM, Hiranya Jayathilaka <
>>>>>> hira...@wso2.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, May 16, 2011 at 7:33 AM, Amila Suriarachchi 
>>>>>>> <am...@wso2.com>wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sun, May 15, 2011 at 10:19 PM, Afkham Azeez <az...@wso2.com>wrote:
>>>>>>>>
>>>>>>>>> This will be a great usability enhancement. People will be able to
>>>>>>>>> startup multiple carbon servers without changing anything. Everything 
>>>>>>>>> will
>>>>>>>>> work OOTB.
>>>>>>>>
>>>>>>>>
>>>>>>>> I think it depends on the requirement. For me most of the time I
>>>>>>>> need to run an ESB, DSS, Rules in order to do some integration 
>>>>>>>> testing. In
>>>>>>>> this case ESB proxies should know the port addresses of the DSS, 
>>>>>>>> Rules. So
>>>>>>>> random port generation won't work for such senarios.
>>>>>>>>
>>>>>>>
>>>>>>> Most of the time you will start up all the servers before start
>>>>>>> configuring stuff. So by the time you create the proxy, DSS will be up 
>>>>>>> and
>>>>>>> running and you will know the endpoint. We log these information at 
>>>>>>> startup
>>>>>>> and if needed it can be found from the management console as well.
>>>>>>>
>>>>>>
>>>>>> I'm not sure if everyone does that .. that is startup all the servers
>>>>>> before configuring, also another problem is, your approach will require 
>>>>>> to
>>>>>> start the servers in a specific order .. it's a first come-first served
>>>>>> approach as I see. So in the second time around, if you start the 
>>>>>> servers in
>>>>>> a different order, the server ports will be totally different.
>>>>>>
>>>>>
>>>>> Not a problem IMO. You can always script server start up to maintain
>>>>> order.
>>>>>
>>>>>
>>>>>>
>>>>>> Also, as for the common utils method you suggested for opening a
>>>>>> socket, this will require we always hack into the code that we use, for
>>>>>> example, Qpid code and LDAP server and so on, and if in the future, if we
>>>>>> have a dependency which we don't customise the code, like, if we just 
>>>>>> have
>>>>>> an orbit bundle which points to the official library directly, we can't
>>>>>> change the code.
>>>>>>
>>>>>
>>>>> This is a valid concern. But most products allow some level of
>>>>> extensions in this space. Axis2 has the concept of AxisConfigurator for an
>>>>> example.
>>>>>
>>>>
>>>> I think we are making things a bit complicated to do a simple thing :)
>>>> ..
>>>>
>>>
>>> Well, usability matters :)
>>>
>>> Thanks,
>>> Hiranya
>>>
>>>
>>>>
>>>> Cheers,
>>>> Anjana.
>>>>
>>>>
>>>>>
>>>>> Thanks,
>>>>> Hiranya
>>>>>
>>>>>
>>>>>>
>>>>>> Cheers,
>>>>>> Anjana.
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Hiranya
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> thanks,
>>>>>>>> Amila.
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sun, May 15, 2011 at 10:17 PM, Afkham Azeez <az...@wso2.com>wrote:
>>>>>>>>>
>>>>>>>>>> In Tomcat, the following method is used when certain ports need to
>>>>>>>>>> be used;
>>>>>>>>>>
>>>>>>>>>> protected int bind(ServerSocket socket, int portstart, int
>>>>>>>>>> retries) throws IOException {
>>>>>>>>>>         InetSocketAddress addr = null;
>>>>>>>>>>         while ( retries > 0 ) {
>>>>>>>>>>             try {
>>>>>>>>>>                 addr = new InetSocketAddress(getBind(),
>>>>>>>>>> portstart);
>>>>>>>>>>                 socket.bind(addr);
>>>>>>>>>>                 setPort(portstart);
>>>>>>>>>>                 log.info("Receiver Server Socket bound
>>>>>>>>>> to:"+addr);
>>>>>>>>>>                 return 0;
>>>>>>>>>>             }catch ( IOException x) {
>>>>>>>>>>                 retries--;
>>>>>>>>>>                 if ( retries <= 0 ) {
>>>>>>>>>>                     log.info("Unable to bind server socket
>>>>>>>>>> to:"+addr+" throwing error.");
>>>>>>>>>>                     throw x;
>>>>>>>>>>                 }
>>>>>>>>>>                 portstart++;
>>>>>>>>>>                 try {Thread.sleep(25);}catch( InterruptedException
>>>>>>>>>> ti){Thread.interrupted();}
>>>>>>>>>>                 retries = bind(socket,portstart,retries);
>>>>>>>>>>             }
>>>>>>>>>>         }
>>>>>>>>>>         return retries;
>>>>>>>>>>     }
>>>>>>>>>>
>>>>>>>>>> We can provide such a util method and whoever wants to open ports,
>>>>>>>>>> can request for a port from that util method.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Fri, May 13, 2011 at 2:20 PM, Hiranya Jayathilaka <
>>>>>>>>>> hira...@wso2.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> 1. Change the HTTP/S ports in mgt-transports.xml (2)
>>>>>>>>>>> 2. Change the HTTP/S ports in axis2.xml (2)
>>>>>>>>>>> 3. Change the LDAP ports in carbon.xml (2)
>>>>>>>>>>> 4. Change the Qpid ports in carbon.xml (2)
>>>>>>>>>>> 5. Change the JMX ports in advanced/jmx.xml (2)
>>>>>>>>>>>
>>>>>>>>>>> Total 10 ports to change :(
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Hiranya Jayathilaka
>>>>>>>>>>> Senior Software Engineer;
>>>>>>>>>>> WSO2 Inc.;  http://wso2.org
>>>>>>>>>>> E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
>>>>>>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Carbon-dev mailing list
>>>>>>>>>>> Carbon-dev@wso2.org
>>>>>>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> *Afkham Azeez*
>>>>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>>>> * <http://www.apache.org/>**
>>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>>>>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>>>>> twitter: 
>>>>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>>>>> *
>>>>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>>>>> *
>>>>>>>>>> *
>>>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> *Afkham Azeez*
>>>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>>> * <http://www.apache.org/>**
>>>>>>>>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
>>>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>>>> twitter: 
>>>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>>>> *
>>>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>>>> *
>>>>>>>>> *
>>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Carbon-dev mailing list
>>>>>>>>> Carbon-dev@wso2.org
>>>>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Carbon-dev mailing list
>>>>>>>> Carbon-dev@wso2.org
>>>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Hiranya Jayathilaka
>>>>>>> Senior Software Engineer;
>>>>>>> WSO2 Inc.;  http://wso2.org
>>>>>>> E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
>>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Carbon-dev mailing list
>>>>>>> Carbon-dev@wso2.org
>>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Anjana Fernando*
>>>>>> Senior Software Engineer
>>>>>> WSO2 Inc. | http://wso2.com
>>>>>> lean . enterprise . middleware
>>>>>>
>>>>>> _______________________________________________
>>>>>> Carbon-dev mailing list
>>>>>> Carbon-dev@wso2.org
>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Hiranya Jayathilaka
>>>>> Senior Software Engineer;
>>>>> WSO2 Inc.;  http://wso2.org
>>>>> E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>
>>>>> _______________________________________________
>>>>> Carbon-dev mailing list
>>>>> Carbon-dev@wso2.org
>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Anjana Fernando*
>>>> Senior Software Engineer
>>>> WSO2 Inc. | http://wso2.com
>>>> lean . enterprise . middleware
>>>>
>>>> _______________________________________________
>>>> Carbon-dev mailing list
>>>> Carbon-dev@wso2.org
>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Senior Software Engineer;
>>> WSO2 Inc.;  http://wso2.org
>>> E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>> _______________________________________________
>>> Carbon-dev mailing list
>>> Carbon-dev@wso2.org
>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>>
>>
>>
>> --
>> *Anjana Fernando*
>> Senior Software Engineer
>> WSO2 Inc. | http://wso2.com
>> lean . enterprise . middleware
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> Hiranya Jayathilaka
> Senior Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
> Blog: http://techfeast-hiranya.blogspot.com
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* <http://www.apache.org/>**
email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
blog: **http://blog.afkham.org* <http://blog.afkham.org>*
twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to