Package com.sun.messaging.jmq.jmsserver.service

Examples of com.sun.messaging.jmq.jmsserver.service.Service


     @throws IllegalStateException if the broker is already stopped
     */
    public JMSService getJMSService(String serviceName)
        throws IllegalStateException  {
  ServiceManager sm = Globals.getServiceManager();
  Service svc;
  IMQService imqSvc;
  IMQDirectService imqDirectSvc;

  if (sm == null)  {
      return (null);
View Full Code Here


        si.minThreads = props.getIntProperty(SERVICE_PREFIX + name + ".min_threads");
        si.maxThreads = props.getIntProperty(SERVICE_PREFIX + name + ".max_threads");

        si.type = sm.getServiceType(name);

        Service service = sm.getService(name);
       
        if (service != null) {
            si.nConnections = cm.getNumConnections(service);
            si.state = service.getState();

            if (service instanceof IMQService) {
                IMQService ss = (IMQService)service;
                si.currentThreads = ss.getActiveThreadpool();
                si.minThreads = ss.getMinThreadpool();
View Full Code Here

  Long cxnId = (Long)cmd_props.get(MessageType.JMQ_CONNECTION_ID);

        int status = Status.OK;
        String errMsg = null;

        Service s = null;


        HAMonitorService hamonitor = Globals.getHAMonitorService();
        if (hamonitor != null && hamonitor.inTakeover()) {
            status = Status.ERROR;
View Full Code Here

     
  }
 
    private JMSService getJMSService(String serviceName) throws IllegalStateException {
    ServiceManager sm = Globals.getServiceManager();
    Service svc;
    IMQService imqSvc;
    IMQDirectService imqDirectSvc;

    if (sm == null) {
      return (null);
View Full Code Here

                    msg = "Error notifying consumer  " + target +
                         " because " + ex.toString();
                    logger.logStack(Logger.INFO,msg, ex);
                }
            } else if (cmdarg.equals("bkr") || cmdarg.equals("svc")) {
                Service s = null;
                if (target != null) {
                    s = Globals.getServiceManager().getService(
                        target);
                    if (s == null) {
                        msg = "Unknown service " + target ;
View Full Code Here

    }

    private Hashtable getAllCxnInfo(String svc)
        throws Exception
    {
        Service s = null;
        Hashtable debugHash = new Hashtable();
        if (svc != null) {
            s = Globals.getServiceManager().getService(svc);
            debugHash.put("threadPool", getThreadPoolInfo(svc));
            debugHash.put("threads", SupportUtil.getAllStackTraces(""));
View Full Code Here

                ht.put(name, getSvcInfo(name));
            }
            return ht;

        }
        Service s = Globals.getServiceManager().getService(
                        svcname);
        if (s ==  null) {
            throw new Exception("unknown service " + svcname);
        }
        return s.getDebugState();
    }
View Full Code Here

                ht.put(name, getThreadPoolInfo(name));
            }
            return ht;

        }
        Service s = Globals.getServiceManager().getService(
                        svcname);
        if (s ==  null) {
            throw new Exception("unknown service " + svcname);
        }
        return ((com.sun.messaging.jmq.jmsserver.service.imq.IMQService)s).getPoolDebugState();
View Full Code Here

  ServiceInfo info = (ServiceInfo)getBodyObject(cmd_msg);
        int status = Status.OK;
        String errMsg = null;

  ServiceManager sm = Globals.getServiceManager();
        Service svc = null;

        HAMonitorService hamonitor = Globals.getHAMonitorService();
        if (hamonitor != null && hamonitor.inTakeover()) {
            status = Status.ERROR;
            errMsg =  rb.getString(rb.E_CANNOT_PROCEED_TAKEOVER_IN_PROCESS);

            logger.log(Logger.ERROR, this.getClass().getName() + ": " + errMsg);
  } else  {
        if (info.name == null || ((svc= sm.getService(info.name)) == null)) {
            status = Status.ERROR;
            errMsg = rb.getString( rb.X_NO_SUCH_SERVICE,
                (info.name == null ? "<null>" : info.name));
        }
        }

        // OK .. set the service information
        if (status == Status.OK) {
            if (! (svc instanceof IMQService)) {
                status = Status.ERROR;
                errMsg = "Internal Error: can updated non-standard Service";
            } else {
            // XXX - really we want to do this through properties, I need
            // to repair this by fcs
                try {
                    IMQService stsvc = (IMQService)svc;
                    int port = -1;
                    int min = -1;
                    int max = -1;
                    if (info.isModified(info.PORT)) {
                        port = info.port;
                    }
                    if (info.isModified(info.MIN_THREADS)) {
                        min = info.minThreads;
                    }
                    if (info.isModified(info.MAX_THREADS)) {
                        max = info.maxThreads;
                    }
                    if (port != -1 || min !=-1 || max != -1) {
                        stsvc.updateService(port, min, max);
                    } else {
                        status = Status.ERROR;
                        errMsg = rb.getString( rb.X_NO_SERVICE_PROPS_SET,
                            info.name);
                    }
                } catch (Exception ex) {
                    logger.log(Logger.WARNING, rb.W_ERROR_UPDATING_SERVICE,
      svc.getName(), ex);
                    status = Status.ERROR;
        errMsg = getMessageFromException(ex);
                }
            }
        }
View Full Code Here

        int status = Status.OK;
        String errMsg = null;

  Vector v = new Vector();

        Service s = null;


  /*
   * Only one of {JMQServiceName,JMQConnectionID} will be set.
   *
 
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsserver.service.Service

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.