[Hippo-cms7-user] Detecting the default channel manager rest uri?

Ard Schrijvers a.schrijvers at onehippo.com
Thu Sep 13 08:22:41 CEST 2012


Op 12 sep. 2012 23:47 schreef "Woonsan Ko" <w.ko at onehippo.com> het volgende:
>
> Please see my comments inline.
>
> Sent from my mobile phone. Apologies for any typos.
>
> On Sep 12, 2012 5:15 PM, "Ard Schrijvers" <a.schrijvers at onehippo.com>
wrote:
> >
> >
> > Op 12 sep. 2012 16:12 schreef "Woonsan Ko" <w.ko at onehippo.com> het
volgende:
> >
> > >
> > > On 9/12/12 5:16 AM, Ard Schrijvers wrote:
> > >>
> > >> On Wed, Sep 12, 2012 at 11:08 AM, Bart van der Schans
> > >> <b.vanderschans at onehippo.com> wrote:
> > >>>
> > >>> On Wed, Sep 12, 2012 at 9:33 AM, Frank van Lankvelt
> > >>> <f.vanlankvelt at onehippo.com> wrote:
> > >>>>
> > >>>> On Tue, Sep 11, 2012 at 7:32 PM, Woonsan Ko <w.ko at onehippo.com>
wrote:
> > >>>>>
> > >>>>> Hi,
> > >>>>>
> > >>>>> I've experienced the error, 'java.net.ConnectException:
ConnectException
> > >>>>> invoking http://127.0.0.1:8080/site/_cmsrest' when I started
server on a
> > >>>>> different port than 8080. The trouble shooting was well
documented here:
> > >>>>> -
> > >>>>>
http://www.onehippo.org/7_7/library/concepts/channels/channel-manager-troubleshooting.html
> > >>>>>
> > >>>>> It may depend on preferences, but I think it would be better if
the scheme,
> > >>>>> server name and port number are automatically detected somehow,
with having
> > >>>>> only the remaining path in the configuration by default.
> > >>>>> It's not just for convenience in development, but also I guess it
helps
> > >>>>> serve multi-domain sites.
> > >>>>>
> > >>>> I would really like this; the plugin currently forces one to
specify
> > >>>> the uri, but it should be able to determine most of these by
itself.
> > >>>> The only exception is the context-path of the hst (though we can
> > >>>> default to 'site' if not specified) and the mount-point of the cms
> > >>>> rest service (again, we can easily default to '_cmsrest').
> > >>>>
> > >>>> Of course, there would be a problem when site and cms are running
in
> > >>>> different containers *and* one wants to run multiple instances of
both
> > >>>> applications on the same machine.  At that point,
environment-specific
> > >>>> configuration is needed, e.g. in a system property.  (note that the
> > >>>> system property could also just point to the respective
environment,
> > >>>> i.e. -Dhippo.environment='development' or
> > >>>> -Dhippo.environment='testing'; the plugin-specific configuration
could
> > >>>> then still be in the repository)
> > >>>
> > >>>
> > >>> Why a system property? We already store this information in the
> > >>> "hst:channelmanagerhostgroup" property on the hst:hosts.
> > >>>
> > >>> I'm not sure if autodetection will really work in the end. There are
> > >>> too many deployment scenarios in combination with reverse proxy
> > >>> settings.
> > >>
> > >>
> > >> That is also what I fear. It is very complex to use autodetection.
> > >> AFAIK, there is no way from the application for example whether the
> > >> end user sees the context path or not.
> > >
> > >
> > > By the way, I forgot the classname, but I saw a cms channel manager
class invoking the rest service in the *server-side* by using CXF client
code libraries, which means it doesn't need to detect the client-side
domain name at all. Mostly it works with its localhost.
> > > So, autodetection seems really possible.
> >
> > The server side rest calls indeed should be possible, but afaik this is
already automatic: it is always on 127.0.0.1 and the same port as cms.
>
> No. There are classes invoking configured url with CXf client in channel
manager.
>
> > However, there is also the client side rest calls between cms and side.
These are the calls including _rp. These need to go over the host of the
cms.
>
> Why don't they (client side scripts) use relative urls then? Base
relative path only can be configured then.

>From the top of my head the client nor the server side can correctly know
the possible contextpath in the url.or not when there are proxies involved.
I cant recall all the details now but sure i can take some look.

Regards ard

>
> Cheers,
>
> Woonsan
>
> >
> > Either way, perhaps you have found some possible improvement. I am not
yet sure we can really get away with auto detect. Perhaps we can improve
it. I hope to have some time to dive into it as well
> >
> > Regards ard and thanks for your insights
> >
> > >
> > > Regards,
> > >
> > > Woonsan
> > >
> > >
> > >>
> > >> We could make it in the 7.8 a bit easier now the channels are not
> > >> loaded through java calls but rest calls: We could get rid of the
> > >> hst:channelmanagerhostgroup property. The hst:cmslocation on the
> > >> hst:virtualhostgroup group would still be needed, but this has the
> > >> advantage that the very same hst config can be used on dev, test,
acct
> > >> and prod since the domain specific property
> > >> hst:channelmanagerhostgroup on the shared hst:hosts node could be
> > >> removed
> > >>
> > >> Ard
> > >>
> > >>>
> > >>> Bart
> > >>> _______________________________________________
> > >>> Hippo-cms7-user mailing list and forums
> > >>> http://www.onehippo.org/cms7/support/forums.html
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > > --
> > > w.ko at onehippo.com     www.onehippo.com
> > >
> > > Boston - 1 Broadway, Cambridge, MA 02142
> > > Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> > > US +1 877 414 4776 (toll free)
> > > Europe +31(0)20 522 4466
> > > _______________________________________________
> > > Hippo-cms7-user mailing list and forums
> > > http://www.onehippo.org/cms7/support/forums.html
> >
> >
> > _______________________________________________
> > Hippo-cms7-user mailing list and forums
> > http://www.onehippo.org/cms7/support/forums.html
>
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onehippo.org/pipermail/hippo-cms7-user/attachments/20120913/b7f59a6e/attachment.htm>


More information about the Hippo-cms7-user mailing list