Examples of ServiceManager


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

    return (null);
     
  }
 
    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);
    }
View Full Code Here

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

      DestType.toString(mytype) + ":" +
      destination + ")",  ex);
            }
            msgtype = "DESTINATION";
        } else
            ServiceManager sm = Globals.getServiceManager();
            MetricManager mm = Globals.getMetricManager();
            MetricCounters mc = null;

            if (service != null &&
                sm.getServiceType(service) == ServiceType.UNKNOWN) {

                status = Status.NOT_FOUND;
                errMsg = rb.getString(rb.X_NO_SUCH_SERVICE, service);
            } else {
          // If service is null getMetricCounters() will get counters
View Full Code Here

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

  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));
        }
        }
View Full Code Here

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

     * Returns a List of service names that are visible to
     * the outside
     */
    public static List getVisibleServiceNames()  {

        ServiceManager sm = Globals.getServiceManager();
        List serviceNames = sm.getAllServiceNames();
  return (serviceNames);
    }
View Full Code Here

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

     * @throws BrokerException If service can't be paused/resumed
     */
    public static void pauseService(boolean pause, String serviceName)
        throws BrokerException, IllegalArgumentException {

  ServiceManager sm = Globals.getServiceManager();
        Set activeServices = null;
        BrokerResources rb = Globals.getBrokerResources();

        if (serviceName != null && sm.getService(serviceName) == null) {
            throw new IllegalArgumentException(rb.getString(
                rb.X_NO_SUCH_SERVICE, serviceName));
        }

        if (pause) {
            if (serviceName == null) {
                sm.pauseAllActiveServices(ServiceType.NORMAL, true);
            } else {
                sm.pauseService(serviceName, true);
            }
        } else {
            if (serviceName == null) {
                sm.resumeAllActiveServices(ServiceType.NORMAL);
            } else {
                sm.resumeService(serviceName);
            }
        }
    }
View Full Code Here

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

    }

    private void updateService(int port, int min, int max)
      throws IOException, PropertyUpdateException,
      BrokerException  {
  ServiceManager sm = Globals.getServiceManager();
  Service svc = sm.getService(getName());
  IMQService stsvc;

  if (svc == null)  {
      throw new BrokerException(rb.getString(rb.X_NO_SUCH_SERVICE, getName()));
  }
View Full Code Here

Examples of com.sun.star.comp.servicemanager.ServiceManager

      dcp = dcp.substring(index + 1).trim();

      rootOid = dcp.trim().trim();
    }

    ServiceManager serviceManager = new ServiceManager();
    serviceManager.addFactories(neededServices);

    XAcceptor xAcceptor = (XAcceptor)UnoRuntime.queryInterface(XAcceptor.class, serviceManager.createInstance("com.sun.star.connection.Acceptor"));

    System.err.println("waiting for connect...");
    XConnection xConnection = xAcceptor.accept(conDcp);

    XBridgeFactory xBridgeFactory = (XBridgeFactory)UnoRuntime.queryInterface(XBridgeFactory.class, serviceManager.createInstance("com.sun.star.bridge.BridgeFactory"));
    XBridge xBridge = xBridgeFactory.createBridge(conDcp + ";" + protDcp, protDcp, xConnection, new InstanceProvider());

  }
View Full Code Here

Examples of jeeves.server.dispatchers.ServiceManager

        if (session == null) {
            session = new UserSession();
        }

        try {
            final ServiceManager serviceManager = context.getBean(ServiceManager.class);
            serviceManager.dispatch(request, session, context);
        } catch (Exception e) {
            Log.error(Log.XLINK_PROCESSOR, "Failed to parse result xml" + request.getService());
            throw new ServiceExecutionFailedException(request.getService(), e);
        } finally {
            // set old context back as thread local
View Full Code Here

Examples of net.sf.crispy.impl.ServiceManager

            server.start();
            Properties prop = new Properties();
            prop.put( Property.EXECUTOR_CLASS, EJExecutor.class.getName() );
            prop.put( EJExecutor.EJOE_SERIALIZATION_ADAPTER, XStreamAdapter.class.getName() );
            prop.put( EJExecutor.EJOE_USE_PERSISTENT_CONNECTION, Boolean.toString( true ) );
            manager = new ServiceManager( prop );
            stService = (ISimpleTypes) manager.createService( ISimpleTypes.class );
        }
    }
View Full Code Here

Examples of org.apache.abdera.protocol.server.ServiceManager

import junit.framework.TestCase;

public class UtilityTest extends TestCase {

  public static void testServiceManager() throws Exception {
    ServiceManager sm = ServiceManager.getInstance();
    assertNotNull(sm);
    assertNotNull(sm.newServiceContext(new HashMap<String,String>()));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.