Hi,
I'm starting a job within a command script (startup.bxs). The job is a worker running the whole life of the application. It is not possible to run an other command script (shutdown.bxs) as long the job hasn't terminated. Calling xquery-scripts (shutdown.xq) will be possible anyway.
Any Idea what's blocking the shutdown.bxs command script?
Thank in advanced
Jan
---
startup.bxs:
<commands> <xquery> Q{java:java.lang.System}setProperty("xq.machine.shutdown", "false") </xquery> <xquery><![CDATA[ jobs:eval( '( hof:until( function($f) { xs:boolean(Q{java:java.lang.System}getProperty("xq.machine.shutdown") = "true") }, function($f) { trace( concat( prof:current-ms(), " Job: ", jobs:current() ) ), prof:sleep(1000) }, () ), trace( concat( prof:current-ms(), " Job: ", jobs:current(), " shutdown" ) ) )' ) ]]></xquery> <jobs-list/> <xquery>trace("Hello")</xquery> </commands>
shutdown.bxs (not able to run after startup.bxs):
<commands> <jobs-list/> <xquery> Q{java:java.lang.System}setProperty("xq.machine.shutdown", "true") </xquery> </commands>
shutdown.xq (will work):
Q{java:java.lang.System}setProperty("xq.machine.shutdown", "true")