Lines 56-61
Link Here
|
56 |
import org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties; |
56 |
import org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties; |
57 |
import org.netbeans.modules.j2ee.jboss4.JBDeploymentManager; |
57 |
import org.netbeans.modules.j2ee.jboss4.JBDeploymentManager; |
58 |
import org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginProperties; |
58 |
import org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginProperties; |
|
|
59 |
import org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginUtils; |
59 |
import org.netbeans.modules.j2ee.jboss4.util.JBProperties; |
60 |
import org.netbeans.modules.j2ee.jboss4.util.JBProperties; |
60 |
import org.openide.execution.NbProcessDescriptor; |
61 |
import org.openide.execution.NbProcessDescriptor; |
61 |
import org.openide.filesystems.FileObject; |
62 |
import org.openide.filesystems.FileObject; |
Lines 124-131
Link Here
|
124 |
} |
125 |
} |
125 |
|
126 |
|
126 |
JBProperties properties = dm.getProperties(); |
127 |
JBProperties properties = dm.getProperties(); |
127 |
StringBuilder credentialsParams = new StringBuilder(32); |
128 |
StringBuilder additionalParams = new StringBuilder(32); |
128 |
credentialsParams.append(" -u ").append(properties.getUsername()).append(" -p ").append(properties.getPassword()); // NOI18N |
129 |
int jnpPort = JBPluginUtils.getJnpPortNumber(ip.getProperty(JBPluginProperties.PROPERTY_SERVER_DIR)); |
|
|
130 |
if (dm.getProperties().getServerVersion().compareTo(JBPluginUtils.JBOSS_6_0_0) < 0) { |
131 |
additionalParams.append(" -s jnp://localhost:").append(jnpPort); // NOI18N |
132 |
} else { |
133 |
// FIXME changed for JBoss 6 |
134 |
// see http://community.jboss.org/message/546904 |
135 |
// and http://community.jboss.org/wiki/StartStopJBoss |
136 |
} |
137 |
|
138 |
additionalParams.append(" -u ").append(properties.getUsername()); // NOI18N |
139 |
additionalParams.append(" -p ").append(properties.getPassword()); // NOI18N |
140 |
|
129 |
// Currently there is a problem stopping JBoss when Profiler agent is loaded. |
141 |
// Currently there is a problem stopping JBoss when Profiler agent is loaded. |
130 |
// As a workaround for now, --halt parameter has to be used for stopping the server. |
142 |
// As a workaround for now, --halt parameter has to be used for stopping the server. |
131 |
// NbProcessDescriptor pd = (startServer.getMode() == JBStartServer.MODE.PROFILE ? |
143 |
// NbProcessDescriptor pd = (startServer.getMode() == JBStartServer.MODE.PROFILE ? |
Lines 134-140
Link Here
|
134 |
|
146 |
|
135 |
/* 2008-09-10 The usage of --halt doesn't solve the problem on Windows; it even creates another problem |
147 |
/* 2008-09-10 The usage of --halt doesn't solve the problem on Windows; it even creates another problem |
136 |
of NB Profiler not being notified about the fact that the server was stopped */ |
148 |
of NB Profiler not being notified about the fact that the server was stopped */ |
137 |
NbProcessDescriptor pd = new NbProcessDescriptor(serverStopFileName, "--shutdown " + credentialsParams); // NOI18N |
149 |
NbProcessDescriptor pd = new NbProcessDescriptor( |
|
|
150 |
serverStopFileName, "--shutdown " + additionalParams); // NOI18N |
138 |
|
151 |
|
139 |
Process stoppingProcess = null; |
152 |
Process stoppingProcess = null; |
140 |
try { |
153 |
try { |