Monthly Archives: December 2012

What a year for XPages

The year started early with the release of Upgradepack 1 for domino.
We have got 3 fixpacks for domino and 6 releases of the extensionlibrary.
And so much knowledge published as blog posts/applications/custom controls/code snippets.
What a year!
I think that 2013 will bring alot of good stuff to. With the release of Domino 9.0 and hopefully Upgradepack 2.

Happy New Year to everybody!

IBM Champion I’m honored

I’m one of the lucky ones that have been awarded IBM Champion 2013 for Collaboration Solutions.

All the Champions 2013

Thanks again IBM and congratulations to everybody else who got awarded. 

XPages SSJS will run forever if you let it

If you add some code behind a button, and a user clicks that button. This code will run until it’s finished no matter what you do.

try{
var LoopBreak=0;var x=0
var thing=1
var now=@Text(@Now())
var nownow=""
while(thing==1){
LoopBreak++
print(now+":"+LoopBreak)
for(x=0;x<10000;x++){ nownow=@Text(@Now()) } if(LoopBreak>30){
break;
}
}
}catch(e){
print("Error:"+e.toString())
}
print("Done:"+now)

If you place the code above behind a button on an XPage.

(Of couse at your own risk, and not on a production server)

Open the XPage in a webbrowser, also open up so you can watch the server console in realtime.

Click on the button and close the browser window directly afterwards, and watch the server console.

The code will continue to run until it’s done, imagine what will happen if you remove the line LoopBreak++  you will get a infinite loop.

And the CPU of your server will boost up to 100% and you will not be able to stop your Domino server with out killing it.

So my tip to you is to always have a fail safe, a loop breaker for your loops.