[
https://issues.apache.org/jira/browse/SM-2118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087527#comment-13087527
]
Nickolay Martinov commented on SM-2118:
---------------------------------------
In our slightly modified start script we delete marker file before launching
java process:
test -f $rootDir/$startupFinishedMarkerFileName && rm
$rootDir/$startupFinishedMarkerFileName
Then after launching java process we wait until container finishes starting:
periods=$(( $start_timeout / $start_poll_period ))
while ps -p $pid && test $periods -gt 0 && ! test -f
$rootDir/$startupFinishedMarkerFileName
do
sleep $start_poll_period
periods=$(( $periods - 1 ))
done
This ensures that container is fully initialized before anyone tries to do
something with it. This works on RHEL 5.3 and HP-UX i11.
> Container is in inconsistent state just after start
> ---------------------------------------------------
>
> Key: SM-2118
> URL: https://issues.apache.org/jira/browse/SM-2118
> Project: ServiceMix
> Issue Type: Improvement
> Components: servicemix-core
> Affects Versions: 3.3.2
> Environment: Linux, HP-UX, jdk6
> Reporter: Nickolay Martinov
> Labels: patch
> Attachments: servicemix-core-wait-for-smx-to-finish-starting.patch
>
>
> Start script returns control just after java process was launched. But
> components and service assemblies that were previously installed/deployed
> will continue to be loaded/initialized in background. This process may time
> few seconds but in reality when large number of components and SAs were
> previously deployed it may take minutes on busy server. If container was
> started by some script and then this script does something with container
> (like checking state of components and SAs, deploying things, etc) it is very
> likely to fail. Instead smx start script should hold control until container
> actually finishes starting up or time outs.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira