geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r552286 - in /geronimo/sandbox/geronimo-netbeans-plugin/src/main: java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java java/org/apache/geronimo/netbeans/ide/GeronimoStartServer.java nbm/module.xml
Date Sun, 01 Jul 2007 11:42:01 GMT
Author: jlaskowski
Date: Sun Jul  1 04:42:00 2007
New Revision: 552286

URL: http://svn.apache.org/viewvc?view=rev&rev=552286
Log:
Geronimo start/stop works fine

Modified:
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoStartServer.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/nbm/module.xml

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java?view=diff&rev=552286&r1=552285&r2=552286
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
Sun Jul  1 04:42:00 2007
@@ -1,3 +1,19 @@
+/**
+ *  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.netbeans;
 
 import java.io.File;
@@ -34,6 +50,8 @@
  * The DeploymentManager object provides the core set of functions a J2EE platform must provide
for J2EE application
  * deployment. It provides server related information, such as, a list of deployment targets,
and vendor unique runtime
  * configuration information.
+ * 
+ * @version $Rev$ $Date$
  */
 public class GeronimoDeploymentManager implements DeploymentManager {
 
@@ -257,10 +275,7 @@
     }
 
     public Target[] getTargets() throws IllegalStateException {
-        return new Target[] { 
-            new GeronimoTarget(realUri, "GeronimoDeploymentManager.getTargets() - getDisplayName")
-        };
-        // return dm.getTargets();
+        return new Target[] { new GeronimoTarget(realUri, "Not used") };
     }
 
     private GeronimoJ2eePlatformFactory.J2eePlatformImplImpl platform;

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoStartServer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoStartServer.java?view=diff&rev=552286&r1=552285&r2=552286
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoStartServer.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoStartServer.java
Sun Jul  1 04:42:00 2007
@@ -1,7 +1,26 @@
+/**
+ *  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.netbeans.ide;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -31,6 +50,9 @@
 import org.openide.util.NbBundle;
 import org.openide.util.RequestProcessor;
 
+/**
+ * @version $Rev$ $Date$
+ */
 public class GeronimoStartServer extends StartServer implements ProgressObject {
 
     static enum MODE {
@@ -48,7 +70,7 @@
 
     public GeronimoStartServer(DeploymentManager dm) {
         if (!(dm instanceof GeronimoDeploymentManager)) {
-            throw new IllegalArgumentException("");
+            throw new IllegalArgumentException("Unknown deployment manager type: " + dm);
         }
         this.dm = (GeronimoDeploymentManager) dm;
     }
@@ -228,13 +250,17 @@
             return false;
         }
 
-        if (!isReallyRunning()) {
-            dm.setRunningLastCheck(ip, Boolean.FALSE);
-            return false;
+        try {
+            // check whether the server container is up, it is faster
+            // FIXME: Hardcoded url - use JMX or/and MEJB
+            URL url = new URL("http://localhost:8080");
+            InputStream inputStream = url.openStream();
+            inputStream.read();
+            return true;
+        } catch (MalformedURLException ignored) {
+        } catch (IOException ignored) {
         }
-
-        dm.setRunningLastCheck(ip, Boolean.TRUE);
-        return true;
+        return false;
     }
 
     // ---------- Implementation of ProgressObject interface

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/nbm/module.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/nbm/module.xml?view=diff&rev=552286&r1=552285&r2=552286
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/nbm/module.xml (original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/nbm/module.xml Sun Jul  1 04:42:00
2007
@@ -66,15 +66,19 @@
       <type>spec</type>
     </dependency>
     <dependency>
-      <id>org.netbeans.api:org-openide-io</id>
+      <id>org.netbeans.api:org-openide-dialogs</id>
       <type>spec</type>
     </dependency>
     <dependency>
-      <id>org.netbeans.api:org-openide-dialogs</id>
+      <id>org.netbeans.api:org-openide-execution</id>
       <type>spec</type>
     </dependency>
     <dependency>
-      <id>org.netbeans.api:org-openide-execution</id>
+      <id>org.netbeans.api:org-openide-io</id>
+      <type>spec</type>
+    </dependency>
+    <dependency>
+      <id>org.netbeans.api:org-openide-loaders</id>
       <type>spec</type>
     </dependency>
     <dependency>



Mime
View raw message