Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] Remote Server Support

 

Hello WTP-Dev,

 

I am working on a patch to enable use of remote servers with the Generic Servers from WTP, with this in mind I have already taken out the hard-coded “localhost” hostnames in the classes org.eclipse.wst.server.core.internal.Server and org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour and replaced them with calls to the method org.eclipse.wst.server.core.IServer.getHost() which is now working.  Also I have created a server definition for a server type that has a property of supportsRemoteHosts=”true” so that I can see a servertype when I change the hostname.  I can now create a local version and a remote version of my server type, and I can even start my local server.

 

Where I am now is that I have got to a point that when I try to run my remote server ie. (my connect to a remote server server) it is running though a piece of code in  org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour. setupLaunch() that checks that the ports for the server are not in use and this is a problem for connecting to a remote server as this check is irrelevant, instead I would like to disable this check and anything else that is specific to using a server on a local machine in the remote case.  What would be an acceptable way of doing this?  Would hostname != localhost be enough to determine the server is a connecting to remote server rather than running a local instance of a server?

 

I had an idea that I might be able to create new states for the server called org.eclipse.wst.server.core.IServer.STATE_DISCONNECTED,  org.eclipse.wst.server.core.IServer.STATE_CONNECTING, org.eclipse.wst.server.core.IServer.STATE_CONNECTED, org.eclipse.wst.server.core.IServer.STATE_DISCONNECTING and use these instead of the org.eclipse.wst.server.core.IServer.STATE_STARTING, org.eclipse.wst.server.core.IServer.STATE_STARTED, org.eclipse.wst.server.core.IServer.STATE_STOPPING and org.eclipse.wst.server.core.IServer.STATE_STOPPED in the case of a remote server.  Checks for these states would be added to the ones of the start server and in the case of the remote server we will progress through this 2nd set of states.

 

What I would like to hear from you is;

 

i)                 Is this a good idea?

ii)                Would you have a rough idea of how many places these states would be set and read?

iii)              Would there be many complications to adding this new sequence of states?

iv)               Would a fix like this be acceptable to you guys?  If not can you suggest to me an alternate way I might approach this?

 

Thank you for all your time and effort,

 

Mike Reidy.

 

 

 

 


Back to the top