I'm very busy preparing the sessions I'll be giving next week @BestBuy HQ in Minneapolis. And you might expect that by now this is like a cut cake (or whatever the English equivalent for that idiom is) for me, no surprises inside ...
Not so, NetKernel surprises me at least once every single day. So when I reviewed the Can I run multiple instances of NetKernel on the same host but on different ports question with Peter Rodgers (aka Thor, don't be misguided by his new twitter account @transrept where he supposedly shows his softer side), his solution (the answer is Yes) was different from mine.
I would - obviously I thought - go into the fulcrum modules and change the port in the [moduleroot]/etc/HTTPServerConfig.xml file :
<SystemProperty name="netkernel.http.frontend.port" default="8081" />
<SystemProperty name="netkernel.http.backend.port" default="1061" />
How could I have known (read the manuals Tom, read the manuals ...) that a SystemProperty tag in a Jetty configuration actually means Java SystemProperty ?
So much more conveniently (and way less intrusive) you can change the way the NetKernel instance is started by changing [install]/bin/jvmsettings.cnf :
-Xmx512m -Xms512m -XX:SoftRefLRUPolicyMSPerMB=100 -Dfile.encoding=UTF-8 -Dnetkernel.http.frontend.port=8081 -Dnetkernel.http.backend.port=1061
The fulcrums will pick this up and ignore the default (another hint that should have told me there was another way to do it) attribute.
Enjoy !
P.S. Of course full credits for this fine tip go to Thor (I wouldn't dare otherwise, have you seen the hammer he carries ?) !
P.P.S. Excellent post by Tony Butterfield (no known aka's) on his Durable Scope blog.