|
|
|
|
|
|
|
Re: Error starting server [message #510433 is a reply to message #510307] |
Wed, 27 January 2010 14:11 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
I'm not an expert on the generic server support in WTP, so I can only
offer suggestions based on what knowledge I possess. I haven't read
Chapter 12 in detail, but I doubt it provides enough detail to
understand the subtleties of the actual implementation. Also, there
could be important changes in the code since the book was published.
You will need to study and understand the generic.core plug-in source to
some extent to accomplish what you want.
With respect to the timeout problem, the key is the PingThread class in
the generic.core plug-in. The PingThread.ping() method makes the
determination if the server has started or not. If you search out
references to this class you will find it is referenced from
GenericServerBehaviour.startPingThread(). It is there that the URL to
ping gets built. If not built correctly, such as the port being
incorrect, then pinging that URL is doomed to failure and the symptom
you are seeing results. You may want to debug through that code to see
if that ping URL is what it should be.
Cheers,
Larry
Cristina wrote:
> Sorry, Chapter 12 describes an example of how to add a generic server
> adapter to the "Servers" view of WTP.
>
> What I am trying to do is to add a new server adapter, with the
> peculiarity that the server is a plug-in that I've developed.
>
> You are correct about the generic server support and the
> org.eclipse.jst.server.generic.core plug-in is available in the workspace.
>
> This is the plugin.xml file content:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.4"?>
> <plugin>
> <extension
> point="org.eclipse.wst.server.core.runtimeTypes">
> <runtimeType
>
> class=" org.eclipse.jst.server.generic.core.internal.GenericServerRu ntime "
> description="Fresh server runtime"
> id="eu.project.plugins.server.fresh.runtime"
> name="Fresh Server"
> vendor="Fresh"
> vendorId="Fresh"
> version="1.0">
> </runtimeType>
> </extension>
> <extension
> point="org.eclipse.wst.server.core.serverTypes">
> <serverType
>
> behaviourClass=" org.eclipse.jst.server.generic.core.internal.GenericServerBe haviour "
>
>
> class="org.eclipse.jst.server.generic.core.internal.GenericServer "
> description="Fresh Server"
> hasConfiguration="false"
> id="eu.project.plugins.server.fresh.server"
> initialState="stopped"
>
> launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType "
>
> launchModes="run, debug"
> name="Fresh Server"
> runtime="true"
> runtimeTypeId="eu.project.plugins.server.fresh.runtime"
> startBeforePublish="true"
> startTimeout="120000"
> stopTimeout="15000"
> supportsRemoteHosts="true">
> </serverType>
> </extension>
> <extension
> point="org.eclipse.wst.common.project.facet.core.runtimes">
> <runtime-component-type
> id="eu.project.plugins.server.fresh">
> </runtime-component-type>
> <runtime-component-version
> type="eu.project.plugins.server.fresh"
> version="1.0">
> </runtime-component-version>
> <supported>
> <facet
> id="jst.utility"
> version="1.0">
> </facet>
> <runtime-component
> id="eu.project.plugins.server.fresh"
> version="1.0">
> </runtime-component>
> </supported>
> <adapter>
> <runtime-component
> id="eu.project.plugins.server.fresh">
> </runtime-component>
> <factory
>
> class=" org.eclipse.jst.server.core.internal.RuntimeClasspathProvide r$Factory ">
>
> </factory>
> <type
>
> class=" org.eclipse.jst.common.project.facet.core.IClasspathProvider ">
> </type>
> </adapter>
> <adapter>
> <runtime-component
> id="eu.project.plugins.server.fresh">
> </runtime-component>
> <factory
>
> class=" org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Fact ory ">
> </factory>
> <type
>
> class=" org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLab elProvider ">
>
> </type>
> </adapter>
> </extension>
> <extension
> point="org.eclipse.jst.server.core.runtimeClasspathProviders ">
> <runtimeClasspathProvider
>
> class=" org.eclipse.jst.server.generic.core.internal.GenericServerRu ntimeTargetHandler "
>
> id="eu.project.plugins.server.fresh.runtimeClasspathProvider "
> runtimeTypeIds="eu.project.plugins.server.fresh.*">
> </runtimeClasspathProvider>
> </extension>
> <extension
> point="org.eclipse.jst.server.core.runtimeFacetMappings">
> <runtimeFacetMapping
> runtime-component="eu.project.plugins.server.fresh"
> runtimeTypeId="eu.project.plugins.server.fresh.runtime"
> version="1.0">
> </runtimeFacetMapping>
> </extension>
> <extension
> point="org.eclipse.wst.server.ui.wizardFragments">
> <fragment
>
> class=" org.eclipse.jst.server.generic.ui.internal.GenericServerRunt imeWizardFragment "
>
> id="org.eclipse.jst.server.generic.runtime"
> typeIds="eu.project.plugins.server.fresh.runtime">
> </fragment>
> <fragment
>
> class=" org.eclipse.jst.server.generic.ui.internal.GenericServerWiza rdFragment "
>
> id="org.eclipse.jst.server.generic.server"
> typeIds="eu.project.plugins.server.fresh.server">
> </fragment>
> </extension>
> <extension
> point="org.eclipse.wst.server.ui.serverImages">
> <image
> icon="icons/server.GIF"
> id="org.eclipse.jst.server.generic.image"
> typeIds="eu.project.plugins.server.fresh.runtime">
> </image>
> <image
> icon="icons/server.GIF"
> id="org.eclipse.jst.server.generic.image"
> typeIds="eu.project.plugins.server.fresh.server">
> </image>
> </extension>
> <extension
> point="org.eclipse.wst.common.project.facet.ui.images">
> <image
> path="icons/server.GIF"
> runtime-component-type="eu.project.plugins.server.fresh">
> </image>
> </extension>
> <extension
> point="org.eclipse.jst.server.generic.core.serverdefinition ">
> <serverdefinition
> definitionfile="fresh.serverdef"
> id="eu.project.plugins.server.fresh.runtime">
> </serverdefinition>
> </extension>
>
> </plugin>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04081 seconds