Package org.nasutekds.server.admin.std.server

Examples of org.nasutekds.server.admin.std.server.WorkQueueCfg


         managementContext.getRootConfiguration();


    // Get the work queue configuration and register with it as a change
    // listener.
    WorkQueueCfg workQueueConfig = rootConfiguration.getWorkQueue();
    workQueueConfig.addChangeListener(this);


    // Get the work queue class, and load and instantiate an instance of it
    // using that configuration.
    WorkQueueCfgDefn definition = WorkQueueCfgDefn.getInstance();
    ClassPropertyDefinition propertyDefinition =
         definition.getJavaClassPropertyDefinition();
    Class<? extends WorkQueue> workQueueClass =
         propertyDefinition.loadClass(workQueueConfig.getJavaClass(),
                                      WorkQueue.class);

    try
    {
      WorkQueue workQueue = workQueueClass.newInstance();

      Method method = workQueue.getClass().getMethod("initializeWorkQueue",
          workQueueConfig.configurationClass());
      method.invoke(workQueue, workQueueConfig);

      return workQueue;
    }
    catch (Exception e)
    {
      Message message = ERR_CONFIG_WORK_QUEUE_INITIALIZATION_FAILED.
          get(workQueueConfig.getJavaClass(),
              String.valueOf(workQueueConfig.dn()),
              stackTraceToSingleLineString(e));
      throw new InitializationException(message, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.nasutekds.server.admin.std.server.WorkQueueCfg

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.