return namedQueues.get(name);
}
public final void addNamedWorkQueue(String name, AutomaticWorkQueue q) {
namedQueues.put(name, q);
if (q instanceof AutomaticWorkQueueImpl) {
AutomaticWorkQueueImpl impl = (AutomaticWorkQueueImpl)q;
if (impl.isShared()) {
synchronized (impl) {
if (impl.getShareCount() == 0
&& imanager != null
&& imanager.getMBeanServer() != null) {
try {
imanager.register(new WorkQueueImplMBeanWrapper((AutomaticWorkQueueImpl)q, this));
} catch (JMException jmex) {
LOG.log(Level.WARNING , jmex.getMessage(), jmex);
}
}
impl.addSharedUser();
}
} else if (imanager != null) {
try {
imanager.register(new WorkQueueImplMBeanWrapper((AutomaticWorkQueueImpl)q, this));
} catch (JMException jmex) {