This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 214554
Collapse All | Expand All

(-)a/j2ee.ant/antsrc/org/netbeans/modules/j2ee/ant/StartServer.java (+14 lines)
Lines 64-69 Link Here
64
 */
64
 */
65
public class StartServer extends Task implements Deployment.Logger {
65
public class StartServer extends Task implements Deployment.Logger {
66
66
67
    // default profiling timeout
68
    private static final long DEFAULT_TIMEOUT = 1200000; // in millis
69
67
    /**
70
    /**
68
     * Holds value of property debugmode.
71
     * Holds value of property debugmode.
69
     */
72
     */
Lines 114-119 Link Here
114
                    si.startDebug(ui);
117
                    si.startDebug(ui);
115
                } else if (profilemode) {
118
                } else if (profilemode) {
116
                    si.startProfile(false, ui);
119
                    si.startProfile(false, ui);
120
                    // TODO whole this thing would deserve a better solution
121
                    long start = System.nanoTime();
122
                    while (!si.isReallyRunning()
123
                            && DEFAULT_TIMEOUT > ((System.nanoTime() - start) / 1000000)) {
124
                        try {
125
                            Thread.sleep(100);
126
                        } catch (InterruptedException ex) {
127
                            Thread.currentThread().interrupt();
128
                            // proceed to exit
129
                        }
130
                    }
117
                } else {
131
                } else {
118
                    si.start(ui);
132
                    si.start(ui);
119
                }
133
                }
(-)a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java (-1 / +3 lines)
Lines 2027-2033 Link Here
2027
            setServerState(ServerInstance.STATE_PROFILER_BLOCKING);
2027
            setServerState(ServerInstance.STATE_PROFILER_BLOCKING);
2028
        } else if (profState == ProfilerSupport.STATE_PROFILING
2028
        } else if (profState == ProfilerSupport.STATE_PROFILING
2029
                    || profState == ProfilerSupport.STATE_RUNNING) {
2029
                    || profState == ProfilerSupport.STATE_RUNNING) {
2030
            initCoTarget();
2030
            if (isReallyRunning()) {
2031
                initCoTarget();
2032
            }
2031
            setServerState(ServerInstance.STATE_PROFILING);
2033
            setServerState(ServerInstance.STATE_PROFILING);
2032
        } else {
2034
        } else {
2033
            setServerState(ServerInstance.STATE_STOPPED);
2035
            setServerState(ServerInstance.STATE_STOPPED);

Return to bug 214554