geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r472144 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ org.apache.geronimo.st.ui/ org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/ org.apache.geronimo.st.u...
Date Tue, 07 Nov 2006 15:52:29 GMT
Author: sppatel
Date: Tue Nov  7 07:52:28 2006
New Revision: 472144

URL: http://svn.apache.org/viewvc?view=rev&rev=472144
Log:
server startup times out when starting extremely large apps, need to make timeout params customizable

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoServerDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/PingThread.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoServerDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoServerDelegate.java?view=diff&rev=472144&r1=472143&r2=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoServerDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoServerDelegate.java
Tue Nov  7 07:52:28 2006
@@ -60,6 +60,12 @@
 	public static final String PROPERTY_LOG_LEVEL = "logLevel";
 	
 	public static final String PROPERTY_VM_ARGS = "VMArgs";
+	
+	public static final String PROPERTY_PING_DELAY = "pingDelay";
+	
+	public static final String PROPERTY_PING_INTERVAL = "pingInterval";
+	
+	public static final String PROPERTY_MAX_PINGS = "maxPings";
 
 	public static final String CONSOLE_INFO = "--long";
 
@@ -269,6 +275,33 @@
 	public void setVMArgs(String value) {
 		setInstanceProperty(PROPERTY_VM_ARGS, value);
 	}
+	
+	public int getPingDelay() {
+		String pingDelay = getInstanceProperty(PROPERTY_PING_DELAY);
+		return Integer.parseInt(pingDelay);
+	}
+	
+	public int getPingInterval() {
+		String pingInterval = getInstanceProperty(PROPERTY_PING_INTERVAL);
+		return Integer.parseInt(pingInterval);
+	}
+	
+	public int getMaxPings() {
+		String maxPings = getInstanceProperty(PROPERTY_MAX_PINGS);
+		return Integer.parseInt(maxPings);
+	}
+	
+	public void setPingDelay(Integer delay) {
+		setInstanceProperty(PROPERTY_PING_DELAY, delay.toString());
+	}
+	
+	public void setPingInterval(Integer interval) {
+		setInstanceProperty(PROPERTY_PING_INTERVAL, interval.toString());
+	}
+	
+	public void setMaxPings(Integer maxPings) {
+		setInstanceProperty(PROPERTY_MAX_PINGS, maxPings.toString());
+	}
 
 	public String discoverDeploymentFactoryClassName(IPath jarPath) {
 		try {
@@ -291,6 +324,9 @@
 		setHTTPPort("8080");
 		setRMINamingPort("1099");
 		setConsoleLogLevel(CONSOLE_INFO);
+		setPingDelay(new Integer(10000));
+		setMaxPings(new Integer(40));
+		setPingInterval(new Integer(5000));
 	}
 
 	public String getInstanceProperty(String name) {

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java?view=diff&rev=472144&r1=472143&r2=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
Tue Nov  7 07:52:28 2006
@@ -48,5 +48,11 @@
 	public boolean isInPlaceSharedLib();
 	
 	public boolean isRunFromWorkspace();
+	
+	public int getPingDelay();
+	
+	public int getPingInterval();
+	
+	public int getMaxPings();
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/PingThread.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/PingThread.java?view=diff&rev=472144&r1=472143&r2=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/PingThread.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/PingThread.java
Tue Nov  7 07:52:28 2006
@@ -25,11 +25,11 @@
  */
 public class PingThread extends Thread {
 
-	private static final int PING_DELAY = 10000;
+	private int pingDelay;
 
-	private static final int PING_INTERVAL = 5000;
+	private int pingInterval;
 
-	private static final int MAX_PINGS = 40;
+	private int maxPings;
 
 	private IGeronimoServerBehavior geronimoServer;
 
@@ -40,6 +40,9 @@
 		this.geronimoServer = geronimoServer;
 		this.server = server;
 		this.setDaemon(true);
+		loadPingDelay();
+		loadPingInterval();
+		loadMaxPings();
 	}
 
 	/*
@@ -54,12 +57,12 @@
 		}
 
 		try {
-			sleep(PING_DELAY);
+			sleep(pingDelay);
 		} catch (InterruptedException e) {
 			// ignore
 		}
 
-		for (int tries = MAX_PINGS; tries > 0; tries--) {
+		for (int tries = maxPings; tries > 0; tries--) {
 			
 			if(server.getServerState() == IServer.STATE_STOPPED) 
 				interrupt();
@@ -80,7 +83,7 @@
 			Trace.trace(Trace.INFO, "Ping: fail");
 
 			try {
-				sleep(PING_INTERVAL);
+				sleep(pingInterval);
 			} catch (InterruptedException e) {
 				// ignore
 			}
@@ -88,5 +91,25 @@
 
 		Trace.trace(Trace.SEVERE, "Ping: Can't ping for server startup.");
 		server.stop(false);
+	}
+	
+	public void loadPingDelay() {
+		pingDelay = getGeronimoServer().getPingDelay();
+	}
+	
+	public void loadPingInterval() {
+		pingInterval = getGeronimoServer().getPingInterval();
+	}
+	
+	public void loadMaxPings() {
+		maxPings = getGeronimoServer().getMaxPings();
+	}
+	
+	private IGeronimoServer getGeronimoServer() {
+		IGeronimoServer gServer = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
+		if(gServer == null) {
+			gServer = (IGeronimoServer) server.loadAdapter(IGeronimoServer.class, null);
+		}
+		return gServer;
 	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml?view=diff&rev=472144&r1=472143&r2=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml Tue
Nov  7 07:52:28 2006
@@ -96,7 +96,15 @@
     </extension>
     
     <extension point="org.eclipse.wst.server.ui.editorPageSections">
-        <section id="org.apache.server.geronimo.vmargs" order="30"
+        <section id="org.apache.server.geronimo.security" order="30"
+            insertionId="org.eclipse.wst.server.editor.overview.right"
+            typeIds="org.apache.geronimo.server.*"
+            class="org.apache.geronimo.st.ui.sections.ServerEditorStartupSection">
+        </section>
+    </extension>
+    
+    <extension point="org.eclipse.wst.server.ui.editorPageSections">
+        <section id="org.apache.server.geronimo.vmargs" order="40"
             insertionId="org.eclipse.wst.server.editor.overview.right"
             typeIds="org.apache.geronimo.server.*"
             class="org.apache.geronimo.st.ui.sections.ServerVMArgsSection">

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java?view=auto&rev=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java
Tue Nov  7 07:52:28 2006
@@ -0,0 +1,82 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.st.ui.commands;
+
+import java.lang.reflect.Method;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+
+/**
+ * @version
+ */
+public class SetServerInstancePropertyCommand extends ServerCommand {
+	
+	Object value;
+	Object oldValue;
+	Class valueType;
+	
+	String setterName;
+	String getterName;
+	
+	Class adapterClass;
+	Object adaptedClass;
+
+	public SetServerInstancePropertyCommand(IServerWorkingCopy server, Object value, String
setterName, Class valueType, Class adapterClass) {
+		super(server, value.toString());
+		this.value = value;
+		this.setterName = setterName;
+		this.getterName = "get" + setterName.split("set")[1];
+		this.valueType = valueType;
+		this.adapterClass = adapterClass;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.ui.commands.ServerCommand#execute()
+	 */
+	public void execute() {
+		adaptedClass = server.getAdapter(adapterClass);
+		if (adaptedClass == null) {
+			adaptedClass = server.loadAdapter(adapterClass, new NullProgressMonitor());
+		}
+		try {
+			Method getterMethod = adaptedClass.getClass().getMethod(getterName, new Class[]{});
+			oldValue = getterMethod.invoke(adaptedClass, new Object[]{});
+
+			Method setterMethod = adaptedClass.getClass().getMethod(setterName, new Class[]{valueType});
+			setterMethod.invoke(adaptedClass, new Object[]{value});
+		} catch (Exception e) {
+			//TODO Auto-generated catch block
+			e.printStackTrace();
+		} 
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.ui.commands.ServerCommand#undo()
+	 */
+	public void undo() {
+		if(adaptedClass != null) {
+			try {
+				Method setterMethod = adaptedClass.getClass().getMethod(setterName, new Class[]{String.class});
+				setterMethod.invoke(adaptedClass, new Object[]{oldValue});
+			} catch (Exception e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			} 
+		}
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/commands/SetServerInstancePropertyCommand.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java?view=diff&rev=472144&r1=472143&r2=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.java
Tue Nov  7 07:52:28 2006
@@ -36,6 +36,9 @@
 	public static String editorSectionLogLevelDescription;
 	public static String editorSectionVMArgsTitle;
 	public static String editorSectionVMArgsDescription;
+	public static String editorSectionStartupTitle;
+	public static String editorSectionStartupDescription;
+	
 	public static String info;
 	public static String debug;
 	public static String httpPort;
@@ -44,6 +47,12 @@
 	public static String password;
 	public static String console;
 	public static String consoleTooltip;
+	public static String pingDelay;
+	public static String pingInterval;
+	public static String maxPings;
+	public static String pingDelayTooltip;
+	public static String pingIntervalTooltip;
+	public static String maxPingsTooltip;
 	
 	public static String newServerWizardTitle;
 	public static String newServerWizardDescription;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties?view=diff&rev=472144&r1=472143&r2=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/internal/Messages.properties
Tue Nov  7 07:52:28 2006
@@ -61,6 +61,15 @@
 editorSectionVMArgsTitle=Server VM Arguments
 editorSectionVMArgsDescription=Specfiy the Java VM Arguments to be provided on server startup.
 
+editorSectionStartupTitle=Server Startup
+editorSectionStartupDescription=Specify the server startup constraints.
+pingDelay=Ping Delay (ms):
+pingInterval=Ping Interval (ms):
+maxPings=Maximum Pings:
+pingDelayTooltip=The number of miliseconds to delay before starting to ping the server.
+pingIntervalTooltip=The number of miliseconds between each ping.
+maxPingsTooltip=The number of pings to the server before startup is considered a failure.
+
 editorContextRoot=Context Root:
 
 editorResourceRefTitle=Resource References

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java?view=auto&rev=472144
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
Tue Nov  7 07:52:28 2006
@@ -0,0 +1,169 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.ui.sections;
+
+import org.apache.geronimo.st.core.IGeronimoServer;
+import org.apache.geronimo.st.ui.commands.SetPasswordCommand;
+import org.apache.geronimo.st.ui.commands.SetServerInstancePropertyCommand;
+import org.apache.geronimo.st.ui.commands.SetUsernameCommand;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+
+/**
+ * @version
+ */
+public class ServerEditorStartupSection extends ServerEditorSection {
+	
+	Text pingDelay;
+
+	Text pingInterval;
+	
+	Text maxPings;
+	
+	IGeronimoServer gs;
+	
+	public ServerEditorStartupSection() {
+		super();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#createSection(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createSection(Composite parent) {
+		super.createSection(parent);
+
+		FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+		Section section = toolkit.createSection(parent,
+				ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+						| ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+						| ExpandableComposite.FOCUS_TITLE);
+
+		section.setText(Messages.editorSectionStartupTitle);
+		section.setDescription(Messages.editorSectionStartupDescription);
+		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+		Composite composite = toolkit.createComposite(section);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginHeight = 5;
+		layout.marginWidth = 10;
+		layout.verticalSpacing = 5;
+		layout.horizontalSpacing = 15;
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+		section.setClient(composite);
+
+		// ------- Label and text field for the ping delay -------
+		Label s = createLabel(composite, Messages.pingDelay, toolkit);
+		pingDelay = toolkit.createText(composite, getPingDelay(), SWT.BORDER);
+		pingDelay.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		pingDelay.setToolTipText(Messages.pingDelayTooltip);
+		pingDelay.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				Integer value = Integer.valueOf(pingDelay.getText());
+				execute(new SetServerInstancePropertyCommand(server, value, "setPingDelay", Integer.class,
IGeronimoServer.class));
+			}
+		});
+
+		// ------- Label and text field for the ping interval -------
+		createLabel(composite, Messages.pingInterval, toolkit);
+		pingInterval = toolkit.createText(composite, getPingInterval(), SWT.BORDER);
+		pingInterval.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		pingInterval.setToolTipText(Messages.pingIntervalTooltip);
+		pingInterval.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				Integer value = Integer.valueOf(pingInterval.getText());
+				execute(new SetServerInstancePropertyCommand(server, value, "setPingInterval", Integer.class,
IGeronimoServer.class));
+			}
+		});
+		
+		// ------- Label and text field for the max pings -------
+		createLabel(composite, Messages.maxPings, toolkit);
+		maxPings = toolkit.createText(composite, getMaxPings(), SWT.BORDER);
+		maxPings.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		maxPings.setToolTipText(Messages.maxPingsTooltip);
+		maxPings.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				Integer value = Integer.valueOf(maxPings.getText());
+				execute(new SetServerInstancePropertyCommand(server, value, "setMaxPings", Integer.class,
IGeronimoServer.class));
+			}
+		});
+
+	}
+
+	protected Label createLabel(Composite parent, String text,
+			FormToolkit toolkit) {
+		Label label = toolkit.createLabel(parent, text);
+		label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
+		label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+		return label;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#init(org.eclipse.ui.IEditorSite,
+	 *      org.eclipse.ui.IEditorInput)
+	 */
+	public void init(IEditorSite site, IEditorInput input) {
+		super.init(site, input);
+		gs = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
+		if (gs == null) {
+			gs = (IGeronimoServer) server.loadAdapter(IGeronimoServer.class, new NullProgressMonitor());
+		}
+	}
+	
+	public String getMaxPings() {
+		if (gs != null) {
+			return Integer.toString(gs.getMaxPings());
+		}
+		return "";
+	}
+
+	public String getPingDelay() {
+		if (gs != null) {
+			return Integer.toString(gs.getPingDelay());
+		}
+		return "";
+	}
+
+	public String getPingInterval() {
+		if (gs != null) {
+			return Integer.toString(gs.getPingInterval());
+		}
+		return "";
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message