### Eclipse Workspace Patch 1.0
#P org.eclipse.jst.server.websphere.core
Index: plugin.properties
===================================================================
RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.jst.server.websphere.core/plugin.properties,v
retrieving revision 1.4
diff -u -r1.4 plugin.properties
--- plugin.properties 30 Aug 2005 08:56:32 -0000 1.4
+++ plugin.properties 20 Nov 2008 18:14:31 -0000
@@ -11,6 +11,13 @@
websphere.6.server.description=Publishes and runs J2EE 1.4 modules on a local server. \
Provides basic server functionality
+websphere.6.1.runtime.name=IBM WebSphere v6.1
+websphere.6.1.runtime.description=Publishes and runs J2EE 1.4 modules on a local server. \
+Provides basic server functionality
+websphere.6.1.server.name=IBM WebSphere v6.1
+websphere.6.1.server.description=Publishes and runs J2EE 1.4 modules on a local server. \
+Provides basic server functionality
+
wasHome=IBM WebSphere Installation Directory:
port=Port:
wasProfile=Server Profile Directory:
Index: plugin.xml
===================================================================
RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.jst.server.websphere.core/plugin.xml,v
retrieving revision 1.19
diff -u -r1.19 plugin.xml
--- plugin.xml 16 Apr 2008 15:10:54 -0000 1.19
+++ plugin.xml 20 Nov 2008 18:14:31 -0000
@@ -75,6 +75,8 @@
+
+
@@ -148,4 +150,4 @@
-
\ No newline at end of file
+
Index: serverdef/scripts/websphere.6.1.xml
===================================================================
RCS file: serverdef/scripts/websphere.6.1.xml
diff -N serverdef/scripts/websphere.6.1.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ serverdef/scripts/websphere.6.1.xml 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: serverdef/websphere.6.1.serverdef
===================================================================
RCS file: serverdef/websphere.6.1.serverdef
diff -N serverdef/websphere.6.1.serverdef
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ serverdef/websphere.6.1.serverdef 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+ ${port}
+ Http
+ http
+
+
+
+ jst.web
+ ${wasHome}
+ org.eclipse.jst.server.generic.websphere.antpublisher
+
+
+ jst.ejb
+ ${wasHome}
+ org.eclipse.jst.server.generic.websphere.antpublisher
+
+
+ jst.ear
+ ${wasHome}
+ org.eclipse.jst.server.generic.websphere.antpublisher
+
+
+ jst.connector
+ ${wasHome}
+ org.eclipse.jst.server.generic.websphere.antpublisher
+
+
+ was.project
+
+
+
+ ${wasProfile}/bin/startServer.bat "${wasServer}"
+ ${wasProfile}
+ ${debugPort}
+
+
+
+ ${wasProfile}/bin/stopServer.bat "${wasServer}"
+ ${wasProfile}
+
+
+
+
+ build.file
+ /serverdef/scripts/websphere.6.1.xml
+
+
+ target.publish.jst.web
+ deploy.j2ee.web
+
+
+ target.publish.jst.ejb
+ deploy.j2ee.ejb
+
+
+ target.unpublish.jst.web
+ undeploy.j2ee.web
+
+
+ target.unpublish.jst.ejb
+ undeploy.j2ee.ejb
+
+
+ target.publish.jst.ear
+ deploy.j2ee.ear
+
+
+ target.unpublish.jst.ear
+ undeploy.j2ee.ear
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iiop://${serverAddress}:2001
+ org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory
+
+
+
+
+
+
Index: src/org/eclipse/jst/server/websphere/core/WebSphere61_ExternalServerBehavior.java
===================================================================
RCS file: src/org/eclipse/jst/server/websphere/core/WebSphere61_ExternalServerBehavior.java
diff -N src/org/eclipse/jst/server/websphere/core/WebSphere61_ExternalServerBehavior.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/jst/server/websphere/core/WebSphere61_ExternalServerBehavior.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,112 @@
+/**
+ *
+ */
+package org.eclipse.jst.server.websphere.core;
+
+import java.io.FileNotFoundException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jst.server.generic.core.internal.ExternalServerBehaviour;
+import org.eclipse.jst.server.generic.core.internal.Trace;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerPort;
+
+/**
+ * Customized the ExtneralServerBehavior to handle using the WebSphere start/stop scripts
+ * which terminate after the external server process has be started/stopped.
+ *
+ * @author Eric Norman
+ */
+public class WebSphere61_ExternalServerBehavior extends ExternalServerBehaviour {
+
+ /**
+ * Override to change what happens when the script process terminates
+ */
+ protected void setProcess(final IProcess newProcess) {
+ if (process != null)
+ return;
+ if(processListener!=null)
+ DebugPlugin.getDefault().removeDebugEventListener(processListener);
+ if (newProcess==null)
+ return;
+ process = newProcess;
+ processListener = new IDebugEventSetListener() {
+ public void handleDebugEvents(DebugEvent[] events) {
+ if (events != null) {
+ int size = events.length;
+ for (int i = 0; i < size; i++) {
+ if (process!= null && process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
+ DebugPlugin.getDefault().removeDebugEventListener(this);
+
+ if (getServer().getServerState() == IServer.STATE_STARTING) {
+ try {
+ Trace.trace(Trace.FINEST, "Ping: pinging"); //$NON-NLS-1$
+
+ String url = "http://"+getServer().getHost();; //$NON-NLS-1$
+ ServerPort[] ports = getServer().getServerPorts(null);
+ ServerPort sp = null;
+ for(int p=0;p