1 18 package org.apache.activemq.ra; 19 20 28 public class InboundContextSupport { 29 private static final ThreadLocal threadLocal = new ThreadLocal (); 30 31 38 public static InboundContext getActiveSessionAndProducer() { 39 return (InboundContext) threadLocal.get(); 40 } 41 42 43 50 public static void register(InboundContext sessionAndProducer) { 51 threadLocal.set(sessionAndProducer); 52 } 53 54 61 public static void unregister(InboundContext sessionAndProducer) { 62 threadLocal.set(null); 63 } 64 } 65 | Popular Tags |