On Nov 13, 2007 4:06 PM, ant elder <[EMAIL PROTECTED]> wrote:
> Trying to run a domain manager node within a webapp and it fails as right
> now you can only use a domain manager url without a path, eg
> http://localhost:8080 not http://localhost:8080/tuscany/domainManager. I'd
> like to try to fix this so a path if supported if no one has any
> objections,
> also if there are any pointers to where in the node and domain code this
> is
> handled that would be great too!
>
> ...ant
>
No objections from me. It's dealt with in three places..
SCADomainImpl.init() - sets up the domain runtime
SCANodeImpl.init() - sets up the node runtime
SCADomainProxy.start() - sets up a local runtime if no node is provided
The code you are looking for is something like...
// Configure the default server port
int port = URI.create(domainModel.getDomainURI()).getPort();
if (port != -1) {
ServletHostExtensionPoint servletHosts =
domainManagementRuntime.getExtensionPointRegistry().getExtensionPoint(
ServletHostExtensionPoint.class);
for (ServletHost servletHost: servletHosts.getServletHosts())
{
servletHost.setDefaultPort(port);
}
}
This is stripping the port out of the provided URL and putting it into the
servlet host. I think we would need to change this interface to allow the
whole base URL to be set on the servlet host.
External web app container - The web app container controls the actual
endpoint and the NodeURL simply tells the tuscany runtime what endpoints to
register. It's seems awkward that we have to provide the URL here but there
doesn't appear to be an easy way round it.
Embedded web app container - The NodeURL should instruct the embedded
container what base URL to use for services.
For the Node URL you must either provide a valid URL or nothing. If nothing
then one will be chosen for you.
For Domain URL (at the node) you must either provide the URL of the domain
or nothing.If nothing then the node will run standalone.
Regards
Simon