use of com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService in project openmq by eclipse-ee4j.
the class BrokerInstanceImpl method getJMSService.
private JMSService getJMSService(String serviceName) throws IllegalStateException {
ServiceManager sm = Globals.getServiceManager();
Service svc;
IMQService imqSvc;
IMQDirectService imqDirectSvc;
if (sm == null) {
return (null);
}
svc = sm.getService(serviceName);
if (svc == null) {
return (null);
}
if (!(svc instanceof IMQService)) {
return (null);
}
imqSvc = (IMQService) svc;
if (!imqSvc.isDirect()) {
return (null);
}
if (!(imqSvc instanceof IMQDirectService)) {
return (null);
}
imqDirectSvc = (IMQDirectService) imqSvc;
return imqDirectSvc.getJMSService();
}
use of com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService in project openmq by eclipse-ee4j.
the class JMSRA_BrokerProcess method getJMSService.
/**
* Return the named JMS Service that supports 'DIRECT' in-JVM Java EEJMS clients.
*
* @param serviceName The name of the service to return
*
* @throws IllegalStateException if the broker is already stopped
*/
@Override
public JMSService getJMSService(String serviceName) throws IllegalStateException {
ServiceManager sm = Globals.getServiceManager();
Service svc;
IMQService imqSvc;
IMQDirectService imqDirectSvc;
if (sm == null) {
return (null);
}
svc = sm.getService(serviceName);
if (svc == null) {
return (null);
}
if (!(svc instanceof IMQService)) {
return (null);
}
imqSvc = (IMQService) svc;
if (!imqSvc.isDirect()) {
return (null);
}
if (!(imqSvc instanceof IMQDirectService)) {
return (null);
}
imqDirectSvc = (IMQDirectService) imqSvc;
return imqDirectSvc.getJMSService();
}
Aggregations