Skip to content

Commit

Permalink
Add in-vm-server for starting an embedded server
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoduncan committed Jan 18, 2011
1 parent b38c9d4 commit 8a09797
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/src/hornetq_clj/server.clj
Expand Up @@ -37,6 +37,11 @@
(def netty-acceptor-factory
"org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory")

(def in-vm-connector-factory
"org.hornetq.core.remoting.impl.invm.InVMConnectorFactory")
(def in-vm-acceptor-factory
"org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory")

(defn stomp-server
[options]
(server (merge-with
Expand All @@ -48,3 +53,12 @@
{:factory-class-name netty-acceptor-factory
:protocol "stomp"
:port 61613}]})))

(defn in-vm-server
[options]
(server (merge-with
conj
options
{:connectors [{:name "invm-connector"
:factory-class-name in-vm-connector-factory}]
:acceptors [{:factory-class-name in-vm-acceptor-factory}]})))

0 comments on commit 8a09797

Please sign in to comment.