On Sat, Mar 8, 2008 at 1:04 AM, David Blevins <[EMAIL PROTECTED]> wrote:

>  On Mar 7, 2008, at 12:58 PM, [EMAIL PROTECTED] wrote:
>
>  > +                // TODO: Move the check to a place where it really
>  > belongs - ConnectionManager, ConnectionFactory or such
>  > +                //       This class doesn't really know what is
>  > required as far as connection details go
>
>  Definitely.  On this note, we should only default the port to 4201 if
>  the protocol is ejbd.  Http and https are supported and each has it's
>  own default port.
>
>  >
>  > +
>  > +                int colonIndex = serverURI.indexOf(":");
>  > +                int slashesIndex = serverURI.indexOf("//");
>  > +                // hostname only
>  > +                if (colonIndex == -1 && slashesIndex == -1) {
>  > +                    serverURI = "ejbd://" + serverURI + ":4201";
>  > +                } else if (colonIndex == -1) {
>  > +                    serverURI = serverURI + ":4201";
>  > +                } else if (slashesIndex == -1) {
>  > +                    serverURI = "ejbd://" + serverURI;
>  >                 }
>
>  We could likely keep the part that defaults the protocol here, then
>  leave the port defaulting to the ConnectionFactory for that protocol.
>  For ejbd that's the SocketConnectionFactory, which maybe should be
>  renamed to EjbdConnectionFactory now that I think of it.

Will change it with the other changes for the issue Dain reported.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Reply via email to