Skip to content

Commit

Permalink
Throw if hornetq ns is used in-container [IMMUTANT-544]
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed Mar 30, 2015
1 parent d31b661 commit e4e4271
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions messaging/src/immutant/messaging/hornetq.clj
Expand Up @@ -26,8 +26,10 @@
(defn ^JMSServerManager server-manager
"Retrieves the local JMS server mananger instance."
[]
(when-let [^HQMessaging broker (broker nil)]
(.jmsServerManager broker)))
(if (pu/in-container?)
(throw (IllegalStateException. "immutant.messaging.hornetq functions can't be used in-container"))
(when-let [^HQMessaging broker (broker nil)]
(.jmsServerManager broker))))

(defn ^:private ^String jms-name [dest]
(if-let [wd (-> dest meta :wrapped-destination)]
Expand Down

0 comments on commit e4e4271

Please sign in to comment.