geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r590001 - in /geronimo/sandbox/geronimo-netbeans-plugin: nbproject/ src/org/apache/geronimo/netbeans/ src/org/apache/geronimo/netbeans/nodes/ src/org/apache/geronimo/netbeans/wizard/
Date Tue, 30 Oct 2007 09:20:44 GMT
Author: jlaskowski
Date: Tue Oct 30 02:20:43 2007
New Revision: 590001

URL: http://svn.apache.org/viewvc?rev=590001&view=rev
Log:
Start/stop works fine now using gshell

Modified:
    geronimo/sandbox/geronimo-netbeans-plugin/nbproject/genfiles.properties
    geronimo/sandbox/geronimo-netbeans-plugin/nbproject/project.properties
    geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoPluginUtils.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoStartServer.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/wizard/GeronimoServerLocationPanel.java

Modified: geronimo/sandbox/geronimo-netbeans-plugin/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/nbproject/genfiles.properties?rev=590001&r1=590000&r2=590001&view=diff
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/nbproject/genfiles.properties (original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/nbproject/genfiles.properties Tue Oct 30 02:20:43
2007
@@ -1,8 +1,8 @@
 build.xml.data.CRC32=ca9529ea
 build.xml.script.CRC32=06cbcef2
-build.xml.stylesheet.CRC32=05353c81
+build.xml.stylesheet.CRC32=79c3b980
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files
for you.
 nbproject/build-impl.xml.data.CRC32=ca9529ea
 nbproject/build-impl.xml.script.CRC32=47f49d5d
-nbproject/build-impl.xml.stylesheet.CRC32=3f8b4615
+nbproject/build-impl.xml.stylesheet.CRC32=deb65f65

Modified: geronimo/sandbox/geronimo-netbeans-plugin/nbproject/project.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/nbproject/project.properties?rev=590001&r1=590000&r2=590001&view=diff
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/nbproject/project.properties (original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/nbproject/project.properties Tue Oct 30 02:20:43
2007
@@ -2,3 +2,4 @@
 javac.compilerargs=-Xlint -Xlint:-serial
 license.file=LICENSE.txt
 nbm.homepage=http://geronimo.apache.org/devtools/netbeans
+nbm.module.author=Apache Geronimo

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java?rev=590001&r1=590000&r2=590001&view=diff
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
Tue Oct 30 02:20:43 2007
@@ -59,7 +59,7 @@
     }
 
     public Target[] getTargets() throws IllegalStateException {
-        Target[] targets = new Target[0];
+        Target[] targets = null;
         if (dm != null) {
             targets = dm.getTargets();
         }
@@ -86,6 +86,7 @@
         return dm.distribute(target, file, file2);
     }
 
+    @SuppressWarnings("deprecation")
     public ProgressObject distribute(Target[] target, InputStream is, InputStream is2) throws
IllegalStateException {
         return dm.distribute(target, is, is2);
     }

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoPluginUtils.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoPluginUtils.java?rev=590001&r1=590000&r2=590001&view=diff
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoPluginUtils.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoPluginUtils.java
Tue Oct 30 02:20:43 2007
@@ -157,32 +157,33 @@
         });
     }
 
-    public static MBeanServerConnection getRMIServer(String uri) {
+    public static MBeanServerConnection getRMIServer(String uri) throws IOException {
         MBeanServerConnection rmiServer = null;
+        InstanceProperties ip = InstanceProperties.getInstanceProperties(uri);
+        ClassLoader origClassLoader = Thread.currentThread().getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(getGeronimoClassLoader(ip.getProperty(GeronimoPluginProperties.PROPERTY_SERVER_DIR)));
         try {
-            InstanceProperties ip = InstanceProperties.getInstanceProperties(uri);
 
-            Map<String, String[]> env = new HashMap<String, String[]>();
+            Map<String, Object> env = new HashMap<String, Object>();
             String username = ip.getProperty(InstanceProperties.USERNAME_ATTR);
             String password = ip.getProperty(InstanceProperties.PASSWORD_ATTR);
             String[] credentials = new String[]{username, password};
             env.put(JMXConnector.CREDENTIALS, credentials);
 
-            Logger.getLogger("javax.management.remote.rmi").setLevel(Level.ALL);
-
             // FIXME: Create the JMXServiceURL based on information provided by user - hostname
and port
             JMXServiceURL address = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost/JMXConnector");
             JMXConnector jmxConnector = JMXConnectorFactory.connect(address, env);
             rmiServer = jmxConnector.getMBeanServerConnection();
-        } catch (MalformedURLException mue) {
-            mue.printStackTrace();
-        } catch (IOException ioe) {
-            ioe.printStackTrace();
+        } finally {
+            Thread.currentThread().setContextClassLoader(origClassLoader);
         }
         return rmiServer;
     }
 
     public static URLClassLoader getGeronimoClassLoader(String serverRoot) {
+        if (serverRoot == null) {
+            throw new IllegalArgumentException("serverRoot must not be null");
+        }
         URLClassLoader loader = null;
         try {
             List<URL> urlList = new ArrayList<URL>();
@@ -203,6 +204,10 @@
             urlList.add(new File(serverRoot + geronimo_deploy_jsr88).toURI().toURL());
             final String geronimo_javaee_deployment_spec_jar = "/repository/org/apache/geronimo/specs/geronimo-javaee-deployment_1.1MR3_spec/1.0-SNAPSHOT/geronimo-javaee-deployment_1.1MR3_spec-1.0-SNAPSHOT.jar";
             urlList.add(new File(serverRoot + geronimo_javaee_deployment_spec_jar).toURI().toURL());
+            final String openejb_jar = "/repository/org/apache/openejb/openejb-client/3.0.0-SNAPSHOT/openejb-client-3.0.0-SNAPSHOT.jar";
+            urlList.add(new File(serverRoot + openejb_jar).toURI().toURL());
+            final String ejb_spec_jar = "/repository/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0/geronimo-ejb_3.0_spec-1.0.jar";
+            urlList.add(new File(serverRoot + ejb_spec_jar).toURI().toURL());
             // FIXME: Fix the mess with jar versioning
             {
                 File[] libs = new File(serverRoot + DEPLOY_JSR88_PARTIAL_JAR_PATH).listFiles();

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoStartServer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoStartServer.java?rev=590001&r1=590000&r2=590001&view=diff
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoStartServer.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/GeronimoStartServer.java
Tue Oct 30 02:20:43 2007
@@ -45,8 +45,8 @@
  */
 public class GeronimoStartServer extends StartServer {
 
-    public static final String GERONIMO_SH = "/bin/geronimo.sh";
-    public static final String GERONIMO_BAT = "/bin/geronimo.bat";
+    public static final String GSHELL_SH = "/bin/gsh";
+    public static final String GSHELL_BAT = "/bin/gsh.bat";
 
     private GeronimoDeploymentManager dm;
 
@@ -74,7 +74,7 @@
 
         progressObject.changeState(StateType.RUNNING, msg);
 
-        RequestProcessor.getDefault().post(new GeronimoStartRunnable(progressObject), 0,
Thread.NORM_PRIORITY);
+        RequestProcessor.getDefault().post(new GeronimoStartRunnable(progressObject), 0,
Thread.currentThread().getPriority());
 
         return progressObject;
     }
@@ -87,7 +87,7 @@
 
         progressObject.changeState(StateType.RUNNING, msg);
 
-        RequestProcessor.getDefault().post(new GeronimoStopRunnable(progressObject), 0, Thread.NORM_PRIORITY);
+        RequestProcessor.getDefault().post(new GeronimoStopRunnable(progressObject), 0, Thread.currentThread().getPriority());
 
         return progressObject;
     }
@@ -116,9 +116,8 @@
             ObjectName searchPattern = new ObjectName(":role=Kernel");
             Set<ObjectName> kernel = mbServerConn.queryNames(searchPattern, null);
             ObjectName kernelObjectName = kernel.iterator().next();
-            result = (Boolean) mbServerConn.getAttribute(kernelObjectName, "running");
+            result = (Boolean) mbServerConn.getAttribute(kernelObjectName, "kernelFullyStarted");
         } catch (Exception ignored) {
-            ignored.printStackTrace();
         }
         return result;
     }
@@ -150,7 +149,7 @@
 
     private String getScriptName(InstanceProperties ip) {
         String serverLocation = ip.getProperty(GeronimoPluginProperties.PROPERTY_SERVER_DIR);
-        String startupScriptName = serverLocation + (Utilities.isWindows() ? GERONIMO_BAT
: GERONIMO_SH);
+        String startupScriptName = serverLocation + (Utilities.isWindows() ? GSHELL_BAT :
GSHELL_SH);
         return startupScriptName;
     }
 
@@ -258,7 +257,7 @@
                 return null;
             }
             // FIXME: Let user decide what params are used
-            String args = "run -vv";
+            String args = "start-server";
             return new NbProcessDescriptor(scriptName, args);
         }
 
@@ -343,7 +342,7 @@
                 return null;
             }
             // FIXME: Let user decide what params are used
-            String args = "stop --user system --password manager --port 1099";
+            String args = "stop-server";
             return new NbProcessDescriptor(scriptName, args);
         }
 

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java?rev=590001&r1=590000&r2=590001&view=diff
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
Tue Oct 30 02:20:43 2007
@@ -41,22 +41,27 @@
         setIconBaseWithExtension(ICON_BASE);
     }
 
+    @Override
     public String getDisplayName() {
         return NbBundle.getMessage(GeronimoManagerNode.class, "TXT_GeronimoManagerNode");
     }
 
+    @Override
     public String getShortDescription() {
         return "http://localhost:8080";
     }
 
+    @Override
     public javax.swing.Action[] getActions(boolean context) {
         return new javax.swing.Action[]{};
     }
     
+    @Override
     public boolean hasCustomizer() {
         return true;
     }
     
+    @Override
     public Component getCustomizer() {
         JPanel panel = new JPanel();
         panel.add(new JLabel("< Put your customizer implementation here! >"));

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/wizard/GeronimoServerLocationPanel.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/wizard/GeronimoServerLocationPanel.java?rev=590001&r1=590000&r2=590001&view=diff
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/wizard/GeronimoServerLocationPanel.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/org/apache/geronimo/netbeans/wizard/GeronimoServerLocationPanel.java
Tue Oct 30 02:20:43 2007
@@ -168,10 +168,12 @@
         locationField.setColumns(15);
         locationField.addKeyListener(new KeyAdapter() {
 
+            @Override
             public void keyTyped(KeyEvent event) {
                 fireChangeEvent();
             }
 
+            @Override
             public void keyReleased(KeyEvent event) {
                 fireChangeEvent();
             }



Mime
View raw message