# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /home/marigan/cvs/nb60/serverplugins/jboss4 # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: src/org/netbeans/modules/j2ee/jboss4/nodes/JBWebApplicationsChildren.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/JBWebApplicationsChildren.java Base (1.2) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/JBWebApplicationsChildren.java Locally Modified (Based On 1.2) *************** *** 82,88 **** if("jmx-console.war".equals(name)) { // Excluding it. It's system package continue; } ! String descr = (String)Util.getMBeanParameter(dm, "jbossWebDeploymentDescriptor", elem.getCanonicalName(), String.class); // NOI18N context = Util.getWebContextRoot(descr); } else { --- 82,88 ---- if("jmx-console.war".equals(name)) { // Excluding it. It's system package continue; } ! String descr = (String)Util.getMBeanParameter(dm, "jbossWebDeploymentDescriptor", elem.getCanonicalName()); // NOI18N context = Util.getWebContextRoot(descr); } else { *************** *** 94,100 **** } name += ".war"; // NOI18N ! context = (String)Util.getMBeanParameter(dm, "path", elem.getCanonicalName(), String.class); // NOI18N } keys.add(new JBWebModuleNode(name, lookup, url + context)); } catch (Exception ex) { --- 94,100 ---- } name += ".war"; // NOI18N ! context = (String)Util.getMBeanParameter(dm, "path", elem.getCanonicalName()); // NOI18N } keys.add(new JBWebModuleNode(name, lookup, url + context)); } catch (Exception ex) { Index: src/org/netbeans/modules/j2ee/jboss4/ide/ui/Bundle.properties *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/Bundle.properties Base (1.8) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/Bundle.properties Locally Modified (Based On 1.8) *************** *** 31,37 **** LBL_BrowseButton=Br&owse... ! MSG_InvalidServerLocation=Provide a valid JBoss Application Server 4 Installation Location LBL_ChooserName=Choose JBoss Server's Installation Location --- 31,37 ---- LBL_BrowseButton=Br&owse... ! MSG_InvalidServerLocation=Provide a valid JBoss Application Server 4 or 5 Installation Location LBL_ChooserName=Choose JBoss Server's Installation Location Index: src/org/netbeans/modules/j2ee/jboss4/nodes/Util.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/Util.java Base (1.3) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/Util.java Locally Modified (Based On 1.3) *************** *** 20,37 **** package org.netbeans.modules.j2ee.jboss4.nodes; import java.io.ByteArrayInputStream; import java.io.IOException; import java.lang.reflect.InvocationTargetException; ! import java.lang.reflect.Method; import java.net.URLClassLoader; import java.util.Set; import javax.enterprise.deploy.shared.ModuleType; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.QueryExp; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; --- 20,42 ---- package org.netbeans.modules.j2ee.jboss4.nodes; import java.io.ByteArrayInputStream; + import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException; ! import java.net.URL; import java.net.URLClassLoader; + import java.util.ArrayList; + import java.util.List; import java.util.Set; import javax.enterprise.deploy.shared.ModuleType; + import javax.management.AttributeNotFoundException; + import javax.management.InstanceNotFoundException; + import javax.management.MBeanException; + import javax.management.MBeanServerConnection; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.QueryExp; + import javax.management.ReflectionException; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties; *************** *** 55,61 **** /** * Lookup a JBoss4 RMI Adaptor */ ! public static Object getRMIServer(Lookup lookup) { return getRMIServer((JBDeploymentManager)lookup.lookup(JBDeploymentManager.class)); } --- 63,69 ---- /** * Lookup a JBoss4 RMI Adaptor */ ! public static MBeanServerConnection getRMIServer(Lookup lookup) { return getRMIServer((JBDeploymentManager)lookup.lookup(JBDeploymentManager.class)); } *************** *** 62,68 **** /** * Lookup a JBoss4 RMI Adaptor */ ! public static Object getRMIServer(JBDeploymentManager manager) { return manager.getRMIServer(); } --- 70,76 ---- /** * Lookup a JBoss4 RMI Adaptor */ ! public static MBeanServerConnection getRMIServer(JBDeploymentManager manager) { return manager.getRMIServer(); } *************** *** 172,214 **** * * @return MBean attribute */ ! public static Object getMBeanParameter(JBDeploymentManager dm, String name, String targetObject, Class paramClass) { ClassLoader oldLoader = null; InstanceProperties ip = dm.getInstanceProperties(); try{ ! oldLoader = Thread.currentThread().getContextClassLoader(); ! ! URLClassLoader loader = JBDeploymentFactory.getJBClassLoader(ip.getProperty(JBPluginProperties.PROPERTY_ROOT_DIR), ! ip.getProperty(JBPluginProperties.PROPERTY_SERVER_DIR)); ! Thread.currentThread().setContextClassLoader(loader); ! ! Object srv = dm.refreshRMIServer(); ! ! Class objectName = loader.loadClass("javax.management.ObjectName"); // NOI18N ! Method getInstance = objectName.getMethod("getInstance", new Class[] {String.class} ); // NOI18N ! Object target = getInstance.invoke(null, new Object[]{targetObject}); // NOI18N ! Class[] params = new Class[]{loader.loadClass("javax.management.ObjectName"), paramClass}; // NOI18N ! Method getAttribute = srv.getClass().getMethod("getAttribute", params); // NOI18N ! return getAttribute.invoke(srv, new Object[]{target, name}); // NOI18N ! ! } catch (NullPointerException ex) { ! // It's normal behaviour when the server is off ! return null; ! } catch (IllegalAccessException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (ClassNotFoundException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (NoSuchMethodException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (InvocationTargetException ex) { ! // It's normal behaviour when the server is off ! return null; ! } finally{ ! if (oldLoader != null) { ! Thread.currentThread().setContextClassLoader(oldLoader); } - } return null; } --- 180,210 ---- * * @return MBean attribute */ ! public static Object getMBeanParameter(JBDeploymentManager dm, String name, String targetObject) { ClassLoader oldLoader = null; InstanceProperties ip = dm.getInstanceProperties(); + MBeanServerConnection server = dm.refreshRMIServer(); try{ ! return server.getAttribute(new ObjectName(targetObject), name); ! } catch (MBeanException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (AttributeNotFoundException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (InstanceNotFoundException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (ReflectionException ex) { ! ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (IOException ex) { ! ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (MalformedObjectNameException ex) { ! ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); ! } catch (NullPointerException ex) { ! ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } return null; *************** *** 219,224 **** --- 212,220 ---- * @return context-root of web application */ public static String getWebContextRoot(String dd) { + if(dd == null) + return null; + Document doc = null; try { Index: src/org/netbeans/modules/j2ee/jboss4/JBDeploymentFactory.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentFactory.java Base (1.13) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentFactory.java Locally Modified (Based On 1.13) *************** *** 30,38 **** --- 30,41 ---- import java.security.CodeSource; import java.security.PermissionCollection; import java.security.Permissions; + import java.util.ArrayList; + import java.util.Arrays; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; + import java.util.List; import java.util.Set; import org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginUtils; import org.openide.ErrorManager; *************** *** 92,98 **** if (name.indexOf("jndi.properties") != -1) {// || name.indexOf("i18n_user.properties") != -1) { // NOI18N return Collections.enumeration(Collections.emptyList()); } - return super.getResources(name); } } --- 95,100 ---- *************** *** 100,119 **** public static URLClassLoader getJBClassLoader(String serverRoot, String domainRoot){ try { ! // dom4j.jar library for JBoss Application Server 4.0.4 and lower File dom404 = new File(serverRoot + "/lib/dom4j.jar"); // dom4j.jar library for JBoss Application Server 4.0.5 File dom405 = new File(domainRoot + "/lib/dom4j.jar"); ! URL urls[] = new URL[]{ ! new File(serverRoot + "/client/jbossall-client.jar").toURI().toURL(), //NOI18N ! new File(serverRoot + "/client/jboss-common-client.jar").toURI().toURL(), //NOI18N ! new File(serverRoot + "/client/jboss-deployment.jar").toURI().toURL(), //NOI18N ! new File(serverRoot + "/client/jnp-client.jar").toURI().toURL(), //NOI18N ! (dom404.exists()) ? (dom404.toURI().toURL()) : (dom405.toURI().toURL()) //NOI18N ! }; ! URLClassLoader loader = new JBClassLoader(urls, JBDeploymentFactory.class.getClassLoader()); return loader; } catch (Exception e) { ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, e); --- 102,146 ---- public static URLClassLoader getJBClassLoader(String serverRoot, String domainRoot){ try { ! // dom4j.jar library for JBoss Application Server 4.0.4 and JBoss Application Server 5.0 File dom404 = new File(serverRoot + "/lib/dom4j.jar"); // dom4j.jar library for JBoss Application Server 4.0.5 File dom405 = new File(domainRoot + "/lib/dom4j.jar"); ! // jboss-common-client.jar JBoss Application Server 4.x ! File client40 = new File(serverRoot + "/client/jboss-common-client.jar"); ! ! // jboss-common-client.jar JBoss Application Server 4.x ! File client50 = new File(serverRoot + "/client/jboss-client.jar"); ! ! // jboss-common-core.jar for JBoss Application Server 5.0 ! File core50 = new File(serverRoot + "/client/jboss-common-core.jar"); ! ! // jboss-logging-spi.jar for JBoss Application Server 5.0 ! File logging50 = new File(serverRoot + "/client/jboss-logging-spi.jar"); ! ! ! List urlList = new ArrayList(); ! ! urlList.add(new File(serverRoot + "/client/jbossall-client.jar").toURI().toURL()); ! urlList.add(new File(serverRoot + "/client/jboss-deployment.jar").toURI().toURL()); ! urlList.add(new File(serverRoot + "/client/jnp-client.jar").toURI().toURL()); ! urlList.add((dom404.exists()) ? (dom404.toURI().toURL()) : (dom405.toURI().toURL())); ! ! if(client40.exists()) ! urlList.add(client40.toURI().toURL()); ! ! if(client50.exists()) ! urlList.add(client50.toURI().toURL()); ! ! if(core50.exists()) ! urlList.add(core50.toURI().toURL()); ! ! if(logging50.exists()) ! urlList.add(logging50.toURI().toURL()); ! ! URLClassLoader loader = new JBClassLoader(urlList.toArray(new URL[] {}), JBDeploymentManager.class.getClassLoader()); return loader; } catch (Exception e) { ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, e); *************** *** 176,183 **** String jbURI = uri; try { jbURI = uri.substring(0, uri.indexOf("&")); // NOI18N ! } ! catch (Exception e) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); } --- 203,209 ---- String jbURI = uri; try { jbURI = uri.substring(0, uri.indexOf("&")); // NOI18N ! } catch (Exception e) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); } *************** *** 196,203 **** if (!DISCONNECTED_URI.equals(uri)) { throw new DeploymentManagerCreationException("JBoss instance " + uri + " is not registered in the IDE."); // NOI18N } ! } ! else { df = getFactory(uri); if (df == null) { throw new DeploymentManagerCreationException(NbBundle.getMessage(JBDeploymentFactory.class, "MSG_ERROR_CREATING_DM", uri)); // NOI18N --- 222,228 ---- if (!DISCONNECTED_URI.equals(uri)) { throw new DeploymentManagerCreationException("JBoss instance " + uri + " is not registered in the IDE."); // NOI18N } ! } else { df = getFactory(uri); if (df == null) { throw new DeploymentManagerCreationException(NbBundle.getMessage(JBDeploymentFactory.class, "MSG_ERROR_CREATING_DM", uri)); // NOI18N *************** *** 207,214 **** String jbURI = uri; try { jbURI = uri.substring(0, uri.indexOf("&")); // NOI18N ! } ! catch (Exception e) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); } --- 232,238 ---- String jbURI = uri; try { jbURI = uri.substring(0, uri.indexOf("&")); // NOI18N ! } catch (Exception e) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); } *************** *** 217,223 **** public String getProductVersion() { ! return NbBundle.getMessage (JBDeploymentFactory.class, "LBL_JBossFactoryVersion"); } public String getDisplayName() { --- 241,247 ---- public String getProductVersion() { ! return NbBundle.getMessage(JBDeploymentFactory.class, "LBL_JBossFactoryVersion"); } public String getDisplayName() { *************** *** 232,248 **** String serverLocation = getDefaultInstallLocation(); String domainLocation = serverLocation + File.separator + "server" + File.separator + "default"; // NOI18N setRemovability(serverInstanceDir, domainLocation); ! if (JBPluginUtils.isGoodJBServerLocation(new File(serverLocation))) { ! if (JBPluginUtils.isGoodJBInstanceLocation(new File(domainLocation))) { if (!isAlreadyRegistered(serverInstanceDir, domainLocation)) { String host = "localhost"; // NOI18N String port = JBPluginUtils.getHTTPConnectorPort(domainLocation); // NOI18N register(serverInstanceDir, serverLocation, domainLocation, host, port); } } } } ! catch (IOException ioe) { ErrorManager.getDefault().log(ErrorManager.EXCEPTION, ioe.getMessage()); } } --- 256,279 ---- String serverLocation = getDefaultInstallLocation(); String domainLocation = serverLocation + File.separator + "server" + File.separator + "default"; // NOI18N setRemovability(serverInstanceDir, domainLocation); ! if (JBPluginUtils.isGoodJBServerLocation4x(new File(serverLocation))) { ! if (JBPluginUtils.isGoodJBInstanceLocation4x(new File(domainLocation))) { if (!isAlreadyRegistered(serverInstanceDir, domainLocation)) { String host = "localhost"; // NOI18N String port = JBPluginUtils.getHTTPConnectorPort(domainLocation); // NOI18N register(serverInstanceDir, serverLocation, domainLocation, host, port); } } + } else if (JBPluginUtils.isGoodJBServerLocation5x(new File(serverLocation))) { + if (JBPluginUtils.isGoodJBInstanceLocation5x(new File(domainLocation))) { + if (!isAlreadyRegistered(serverInstanceDir, domainLocation)) { + String host = "localhost"; // NOI18N + String port = JBPluginUtils.getHTTPConnectorPort(domainLocation); // NOI18N + register(serverInstanceDir, serverLocation, domainLocation, host, port); } } ! } ! } catch (IOException ioe) { ErrorManager.getDefault().log(ErrorManager.EXCEPTION, ioe.getMessage()); } } *************** *** 280,287 **** String installedLocationCan = new File(installedLocation).getCanonicalPath(); if (domainLocationCan.equals(installedLocationCan)) { instanceFO.setAttribute(InstanceProperties.REMOVE_FORBIDDEN, Boolean.TRUE); ! } ! else { if (instanceFO.getAttribute(InstanceProperties.REMOVE_FORBIDDEN) != null) { instanceFO.setAttribute(InstanceProperties.REMOVE_FORBIDDEN, Boolean.FALSE); } --- 311,317 ---- String installedLocationCan = new File(installedLocation).getCanonicalPath(); if (domainLocationCan.equals(installedLocationCan)) { instanceFO.setAttribute(InstanceProperties.REMOVE_FORBIDDEN, Boolean.TRUE); ! } else { if (instanceFO.getAttribute(InstanceProperties.REMOVE_FORBIDDEN) != null) { instanceFO.setAttribute(InstanceProperties.REMOVE_FORBIDDEN, Boolean.FALSE); } Index: src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginProperties.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginProperties.java Base (1.6) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginProperties.java Locally Modified (Based On 1.6) *************** *** 143,149 **** public boolean isCurrentServerLocationValid(){ if (getInstallLocation()!=null) ! return (JBPluginUtils.isGoodJBServerLocation(new File(getInstallLocation()))); else return false; } --- 143,149 ---- public boolean isCurrentServerLocationValid(){ if (getInstallLocation()!=null) ! return (JBPluginUtils.isGoodJBServerLocation4x(new File(getInstallLocation())) || JBPluginUtils.isGoodJBServerLocation5x(new File(getInstallLocation()))); else return false; } Index: src/org/netbeans/modules/j2ee/jboss4/JBDeploymentManager.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentManager.java Base (1.16) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/JBDeploymentManager.java Locally Modified (Based On 1.16) *************** *** 20,25 **** --- 20,26 ---- import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; + import javax.management.MBeanServerConnection; import javax.naming.NameNotFoundException; import javax.naming.NamingException; import org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties; *************** *** 49,54 **** --- 50,56 ---- import org.netbeans.modules.j2ee.jboss4.config.EjbDeploymentConfiguration; import org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginProperties; import org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginUtils; + import org.openide.ErrorManager; /** * *************** *** 58,64 **** private DeploymentManager dm; private String realUri; ! private Object rmiServer; private int debuggingPort = 8787; --- 60,66 ---- private DeploymentManager dm; private String realUri; ! private MBeanServerConnection rmiServer; private int debuggingPort = 8787; *************** *** 109,115 **** return instanceProperties; } ! public synchronized Object getRMIServer() { if(rmiServer == null) { ClassLoader oldLoader = null; --- 111,117 ---- return instanceProperties; } ! public synchronized MBeanServerConnection getRMIServer() { if(rmiServer == null) { ClassLoader oldLoader = null; *************** *** 124,146 **** Hashtable env = new Hashtable(); // Sets the jboss naming environment - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.LoginInitialContextFactory"); env.put(Context.PROVIDER_URL, "jnp://localhost:"+JBPluginUtils.getJnpPort(ip.getProperty(JBPluginProperties.PROPERTY_SERVER_DIR))); ! env.put(Context.SECURITY_PRINCIPAL, props.getUsername()); ! env.put(Context.SECURITY_CREDENTIALS, props.getPassword()); env.put(Context.OBJECT_FACTORIES, "org.jboss.naming"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); env.put("jnp.disableDiscovery", Boolean.TRUE); - // set the java.security.auth.login.config system property needed by InitialContext final String JAVA_SEC_AUTH_LOGIN_CONF = "java.security.auth.login.config"; // NOI18N String oldAuthConf = System.getProperty(JAVA_SEC_AUTH_LOGIN_CONF); ! System.setProperty(JAVA_SEC_AUTH_LOGIN_CONF, props.getRootDir() + "/client/auth.conf"); // NOI18N // Gets naming context InitialContext ctx = new InitialContext(env); if (oldAuthConf != null) { System.setProperty(JAVA_SEC_AUTH_LOGIN_CONF, oldAuthConf); --- 126,151 ---- Hashtable env = new Hashtable(); // Sets the jboss naming environment env.put(Context.PROVIDER_URL, "jnp://localhost:"+JBPluginUtils.getJnpPort(ip.getProperty(JBPluginProperties.PROPERTY_SERVER_DIR))); ! env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory"); env.put(Context.OBJECT_FACTORIES, "org.jboss.naming"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); env.put("jnp.disableDiscovery", Boolean.TRUE); final String JAVA_SEC_AUTH_LOGIN_CONF = "java.security.auth.login.config"; // NOI18N + File securityConf = new File(props.getRootDir(), "/client/auth.conf"); String oldAuthConf = System.getProperty(JAVA_SEC_AUTH_LOGIN_CONF); ! ! if(securityConf.exists()) { ! env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.LoginInitialContextFactory"); ! env.put(Context.SECURITY_PRINCIPAL, props.getUsername()); ! env.put(Context.SECURITY_CREDENTIALS, props.getPassword()); ! System.setProperty(JAVA_SEC_AUTH_LOGIN_CONF, securityConf.getAbsolutePath()); // NOI18N ! } ! // Gets naming context InitialContext ctx = new InitialContext(env); + if (oldAuthConf != null) { System.setProperty(JAVA_SEC_AUTH_LOGIN_CONF, oldAuthConf); } else { *************** *** 145,154 **** } // Lookup RMI Adaptor ! rmiServer = ctx.lookup("/jmx/invoker/RMIAdaptor"); } catch (NameNotFoundException ex) { } catch (NamingException ex) { ! // Nothing to do } finally { if (oldLoader != null) Thread.currentThread().setContextClassLoader(oldLoader); --- 153,163 ---- } // Lookup RMI Adaptor ! rmiServer = (MBeanServerConnection) ctx.lookup("/jmx/invoker/RMIAdaptor"); } catch (NameNotFoundException ex) { + ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } catch (NamingException ex) { ! ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } finally { if (oldLoader != null) Thread.currentThread().setContextClassLoader(oldLoader); *************** *** 158,164 **** return rmiServer; } ! public synchronized Object refreshRMIServer() { rmiServer = null; return getRMIServer(); } --- 167,173 ---- return rmiServer; } ! public synchronized MBeanServerConnection refreshRMIServer() { rmiServer = null; return getRMIServer(); } Index: src/org/netbeans/modules/j2ee/jboss4/nodes/JBEarModulesChildren.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/JBEarModulesChildren.java Base (1.2) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/nodes/JBEarModulesChildren.java Locally Modified (Based On 1.2) *************** *** 74,80 **** else if(elem.getKeyProperty("j2eeType").equals("WebModule")) { String url = "http://"+dm.getHost()+":"+dm.getPort(); String context = Util.getWebContextRoot((String)Util.getMBeanParameter(dm, "jbossWebDeploymentDescriptor", ! elem.getCanonicalName(), String.class)); keys.add(new JBWebModuleNode(name, lookup, (context == null) ? null : url+context)); } } catch (Exception ex) { --- 74,80 ---- else if(elem.getKeyProperty("j2eeType").equals("WebModule")) { String url = "http://"+dm.getHost()+":"+dm.getPort(); String context = Util.getWebContextRoot((String)Util.getMBeanParameter(dm, "jbossWebDeploymentDescriptor", ! elem.getCanonicalName())); keys.add(new JBWebModuleNode(name, lookup, (context == null) ? null : url+context)); } } catch (Exception ex) { Index: src/org/netbeans/modules/j2ee/jboss4/ide/ui/AddServerPropertiesPanel.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/AddServerPropertiesPanel.java Base (1.9) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/AddServerPropertiesPanel.java Locally Modified (Based On 1.9) *************** *** 58,70 **** if(panel.isLocalServer()){ // wrong domain path String path = panel.getDomainPath(); ! if (!JBPluginUtils.isGoodJBInstanceLocation(new File(path))){ wizard.putProperty(PROP_ERROR_MESSAGE,NbBundle.getMessage(AddServerPropertiesPanel.class, "MSG_WrongDomainPath")); return false; } ServerInstance[] si = ServerRegistry.getInstance().getServerInstances(); --- 58,69 ---- if(panel.isLocalServer()){ // wrong domain path String path = panel.getDomainPath(); ! if (!JBPluginUtils.isGoodJBInstanceLocation4x(new File(path))){ ! if (!JBPluginUtils.isGoodJBInstanceLocation5x(new File(path))){ wizard.putProperty(PROP_ERROR_MESSAGE,NbBundle.getMessage(AddServerPropertiesPanel.class, "MSG_WrongDomainPath")); return false; } + } ServerInstance[] si = ServerRegistry.getInstance().getServerInstances(); Index: src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginUtils.java *** /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginUtils.java Base (1.9) --- /home/marigan/cvs/nb60/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/ui/JBPluginUtils.java Locally Modified (Based On 1.9) *************** *** 54,60 **** Hashtable result = new Hashtable(); // String domainListFile = File.separator+"common"+File.separator+"nodemanager"+File.separator+"nodemanager.domains"; // NOI18N ! if (isGoodJBServerLocation(new File(serverLocation))){ File file = new File(serverLocation + File.separator + "server"); // NOI18N String[] files = file.list(new FilenameFilter(){ --- 54,60 ---- Hashtable result = new Hashtable(); // String domainListFile = File.separator+"common"+File.separator+"nodemanager"+File.separator+"nodemanager.domains"; // NOI18N ! if (isGoodJBServerLocation4x(new File(serverLocation)) || isGoodJBServerLocation5x(new File(serverLocation))){ File file = new File(serverLocation + File.separator + "server"); // NOI18N String[] files = file.list(new FilenameFilter(){ *************** *** 67,73 **** for(int i =0; i -1) { + if (VERBOSE) { + System.out.println("STARTING message fired"); + } + fireStartProgressEvent(StateType.RUNNING, createProgressMessage("MSG_START_SERVER_IN_PROGRESS")); + } + else if (line.indexOf("JBoss (MX MicroKernel)") > -1 && line.indexOf("Started in") > -1) {//NOI18N if (VERBOSE) { System.out.println("STARTED message fired"); *************** *** 197,202 **** --- 204,218 ---- notifyStartupThread(); } else + if (line.indexOf("JBoss (Microcontainer)") > -1 && line.indexOf("Started in") > -1) {//NOI18N + if (VERBOSE) { + System.out.println("STARTED message fired"); + } + checkStartProgress = false; + actionStatus = JBStartServer.ACTION_STATUS.SUCCESS; + notifyStartupThread(); + } + else if (line.indexOf("Shutdown complete") > -1) { checkStartProgress = false; actionStatus = JBStartServer.ACTION_STATUS.FAILURE;