Skip to content

Instantly share code, notes, and snippets.

View tobias's full-sized avatar

Toby Crawley tobias

View GitHub Profile
<< ~/w/torquebox/torquebox-dists >>
$ gem list
*** LOCAL GEMS ***
blankslate (2.1.2.4)
bundler (1.2.3)
edn (1.0.0)
jruby-win32ole (0.8.5)
parslet (1.4.0)
Unhandled exception
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:490)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:446)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:359)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
#!/bin/sh
exec java -jar $0 "$@"

Two issues:

  • an AtTrigger completes on nodeA, then nodeA goes away, and nodeB refires the trigger
  • an AtTrigger with a :repeat > 0 starts on nodeA, then nodeA goes away before it has completed, and nodeB runs it :repeat times instead of just the remaining count

A potential solution

@tobias
tobias / core.clj
Last active December 15, 2015 19:10
(ns bogus-speed-test.core
(:require [immutant.messaging :as m]))
(def thread-done-count (atom 0))
(def q "some.queue")
(def listener (atom nil))
(m/start q :durable false)
~/w/clojure/basic-ring
☻ lein immutant undeploy ../oc-speed
Switching project scope to /Users/tobias/work/clojure/oc-speed
Undeployed /Users/tobias/work/clojure/immutant/build/assembly/target/stage/immutant/jboss/standalone/deployments/oc-speed.clj
(let [arg-count (count args)
[path args] (if (or (= 2 arg-count) (even? arg-count))
[(first args) (next args)]
["/" args])
[handler & {:as opts}] args]
(if (symbol? handler)
`(start* ~path (var ~handler) ~opts)
`(start* ~path ~handler ~opts)))
#!/bin/bash
while [ $? -eq 0 ]
do
echo "running $*"
$*
done
growlnotify -s -m "BOOM!"
(tabular
(fact "context-path normalization"
(.getContextPath (make-md {"context-path" ?given})) => ?expected)
?expected ?given
"/foo" "/foo"
"/foo" "/foo/"
"/foo" "foo"
"/" "/"
nil nil
"/" "")
Deleting module javax.xml.jaxp-provider... DONE
Deleting module org.apache.juddi.juddi-client... DONE
Deleting module org.jboss.as.jpa... DONE
Deleting module org.jboss.as.clustering.singleton... DONE
Deleting module org.jboss.as.webservices.server.integration... DONE
Deleting module org.codehaus.jackson.jackson-xc... DONE
Deleting module org.jaxen... DONE
Deleting module org.jboss.as.osgi... DONE
Deleting module org.jboss.ws.tools.wsprovide... DONE
Deleting module org.opensaml... DONE