Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To start lets look at our plugin.xml :

Code Block
xml
xml
       <extension point="org.eclipse.wst.server.core.runtimeTypes">
	   <runtimeType	             
			id="org.eclipse.jst.server.generic.runtime.servicemix30"
			name="%servicemix30.runtime.name"
			description="%servicemix30.runtime.description" vendor="%servicemix30.vendor"
			version="3.0"
			class="org.eclipse.jst.server.generic.core.internal.GenericServerRuntime">
			<moduleType types="jst.jbi.component" versions="1.0" />
		</runtimeType>
	</extension>

First up we declare a runtime, in WTP there is a separation between a runtime which contains the libraries and functionality that wish to associate to a project and a server which is a running instance of the runtime. In this extension point we basically declare that we have a new runtime which is based on generic called servicemix30, we also associate our modulue type with this runtime.

Code Block
xml
xml
	<extension point="org.eclipse.wst.server.core.serverTypes">
		<serverType
			class="org.eclipse.jst.server.generic.core.internal.GenericServer"
			id="org.eclipse.jst.server.generic.servicemix30"
			initialState="stopped" supportsRemoteHosts="false"
			runtimeTypeId="org.eclipse.jst.server.generic.runtime.servicemix30"
			description="%servicemix30.server.description"
			launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
			behaviourClass="org.eclipse.jst.server.servicemix.ServiceMixServerBehaviour"
			name="%servicemix30.server.name" startTimeout="75000" stopTimeout="15000"
			hasConfiguration="false" launchModes="run,debug,profile" runtime="true"
			startBeforePublish="false" />
	</extension>

Next up we need to declare our server type, it sits on top of our runtime and determine some basic information as to how the server is started and stopped as well as whether it needs to be running to publish to. Publish is where a project can be deployed (published) to a server, note that publishing is always to a server not a runtime.

Next up since we are using the GenericServer class in our server type (see above) we need to declare where to get the definition for the server:

Code Block
xml
xml

        <extension
		point="org.eclipse.jst.server.generic.core.serverdefinition">
		<serverdefinition
			definitionfile="/servers/servicemix30.serverdef.xml"
			id="org.eclipse.jst.server.generic.runtime.servicemix30" />
	</extension>

The server definition is an interesting file (there is a good write-up on server definitions here)