Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
bonita
bonita-studio
Commits
af5d059d
Commit
af5d059d
authored
Feb 12, 2016
by
Romain Bioteau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix endless loop when tomcat fails to start
parent
0e6997c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
25 deletions
+11
-25
bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/BOSWebServerManager.java
...src/org/bonitasoft/studio/engine/BOSWebServerManager.java
+11
-25
No files found.
bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/BOSWebServerManager.java
View file @
af5d059d
...
...
@@ -176,7 +176,7 @@ public class BOSWebServerManager {
public
synchronized
void
startServer
(
final
IProgressMonitor
monitor
)
{
if
(!
serverIsStarted
())
{
BonitaHomeUtil
.
initBonitaHome
();
copyTomcatBundleInWorkspace
(
monitor
);
copyTomcatBundleInWorkspace
(
monitor
);
monitor
.
subTask
(
Messages
.
startingWebServer
);
if
(
BonitaStudioLog
.
isLoggable
(
IStatus
.
OK
))
{
BonitaStudioLog
.
debug
(
"Starting tomcat..."
,
...
...
@@ -251,27 +251,13 @@ public class BOSWebServerManager {
}
private
void
waitServerRunning
(
final
IProgressMonitor
monitor
)
{
int
totalTime
=
0
;
while
(
totalTime
<
MAX_SERVER_START_TIME
&&
tomcat
!=
null
&&
tomcat
.
getServerState
()
!=
IServer
.
STATE_STARTED
)
{
try
{
Thread
.
sleep
(
1000
);
if
(
BonitaStudioLog
.
isLoggable
(
IStatus
.
OK
))
{
BonitaStudioLog
.
debug
(
"Tomcat server state: "
+
tomcat
.
getServerState
(),
EnginePlugin
.
PLUGIN_ID
);
}
totalTime
=
totalTime
+
1000
;
}
catch
(
final
InterruptedException
e
)
{
BonitaStudioLog
.
error
(
e
,
EnginePlugin
.
PLUGIN_ID
);
}
}
if
(
BonitaStudioLog
.
isLoggable
(
IStatus
.
OK
))
{
if
(
tomcat
.
getServerState
()
==
IServer
.
STATE_STARTED
)
{
BonitaStudioLog
.
debug
(
"Tomcat server started."
,
EnginePlugin
.
PLUGIN_ID
);
}
else
{
BonitaStudioLog
.
debug
(
"Tomcat failed to start."
,
BonitaStudioLog
.
debug
(
"Tomcat failed to start.
Check the log file for more informations. (bonita.log or catalina.log)
"
,
EnginePlugin
.
PLUGIN_ID
);
if
(!
PlatformUtil
.
isHeadless
())
{
Display
.
getDefault
().
syncExec
(
new
Runnable
()
{
@Override
...
...
@@ -282,8 +268,8 @@ public class BOSWebServerManager {
Messages
.
cannotStartTomcatMessage
);
}
});
return
;
}
return
;
}
connectWithRetries
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment