Examples of ManagementService

  • org.apache.ode.axis2.service.ManagementService
    Axis2 wrapper for process and instance management interfaces.
  • org.camunda.bpm.engine.ManagementService
    Service for admin and maintenance operations on the process engine. These operations will typically not be used in a workflow driven application, but are used in for example the operational console. @author Tom Baeyens @author Joram Barrez @author Falko Menge @author Thorben Lindhauer
  • org.hornetq.core.server.management.ManagementService
    @author Jeff Mesnil @version $Revision$

  • Examples of org.apache.derby.iapi.services.jmx.ManagementService

            // First, register any MBeans. We do this before we start accepting
            // connections from the clients to ease testing of JMX (DERBY-3689).
            // This way we know that once we can connect to the network server,
            // the MBeans will be available.
            ManagementService mgmtService = ((ManagementService)
                    Monitor.getSystemModule(Module.JMX));

            final Object versionMBean = mgmtService.registerMBean(
                               new Version(
                                       getNetProductVersionHolder(),
                                       SystemPermission.SERVER),
                               VersionMBean.class,
                               "type=Version,jar=derbynet.jar");
            final Object networkServerMBean = mgmtService.registerMBean(
                                new NetworkServerMBeanImpl(this),
                                NetworkServerMBean.class,
                                "type=NetworkServer");

            // We accept clients on a separate thread so we don't run into a problem
            // blocking on the accept when trying to process a shutdown
            final ClientThread clientThread = AccessController.doPrivileged(
                    new PrivilegedExceptionAction<ClientThread>() {
                        public ClientThread run() throws Exception {
                            return new ClientThread(thisControl, serverSocket);
                        }
                    });
            clientThread.start();

            try {
                // wait until we are told to shutdown or someone sends an InterruptedException
                synchronized(shutdownSync) {
                    try {
                        while (!shutdown) {
                            shutdownSync.wait();
                        }
                    }
                    catch (InterruptedException e)
                    {
                        shutdown = true;
                    }
                }
               
                try {
                    AccessController.doPrivileged(
                            new PrivilegedAction<Void>() {
                                public Void run() {
                                // Need to interrupt the memcheck thread if it is sleeping.
                                    if (mc != null)
                                        mc.interrupt();

                                    //interrupt client thread
                                    clientThread.interrupt();

                                    return null;
                               }
                            });
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }
               
                // Close out the sessions
                synchronized(sessionTable) {
                    for (Session session : sessionTable.values())
                    {
                        try {
                            session.close();
                        } catch (Exception exception) {
                            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                        }
                    }
                }

                synchronized (threadList)
                {
                    //interupt any connection threads still active
                    for (final DRDAConnThread threadi : threadList)
                    {
                        try {
                            threadi.close();
                            AccessController.doPrivileged(
                                    new PrivilegedAction<Void>() {
                                        public Void run() {
                                            threadi.interrupt();
                                            return null;
                                        }
                                    });
                        } catch (Exception exception) {
                            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                        }
                    }
                    threadList.clear();
                }

                // close the listener socket
                try{
                   serverSocket.close();
                }catch(IOException e){
                    consolePropertyMessage("DRDA_ListenerClose.S", true);
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }

                // Wake up those waiting on sessions, so
                // they can close down
                try{
                    synchronized (runQueue) {
                        runQueue.notifyAll();
                    }
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }
               
                // And now unregister any MBeans.
                try {
                    mgmtService.unregisterMBean(versionMBean);
                    mgmtService.unregisterMBean(networkServerMBean);
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }

                if (shutdownDatabasesOnShutdown) {
    View Full Code Here

    Examples of org.apache.derby.iapi.services.jmx.ManagementService

            // First, register any MBeans. We do this before we start accepting
            // connections from the clients to ease testing of JMX (DERBY-3689).
            // This way we know that once we can connect to the network server,
            // the MBeans will be available.
            ManagementService mgmtService = ((ManagementService)
                    Monitor.getSystemModule(Module.JMX));

            final Object versionMBean = mgmtService.registerMBean(
                               new Version(
                                       getNetProductVersionHolder(),
                                       SystemPermission.SERVER),
                               VersionMBean.class,
                               "type=Version,jar=derbynet.jar");
            final Object networkServerMBean = mgmtService.registerMBean(
                                new NetworkServerMBeanImpl(this),
                                NetworkServerMBean.class,
                                "type=NetworkServer");

            // We accept clients on a separate thread so we don't run into a problem
            // blocking on the accept when trying to process a shutdown
            final ClientThread clientThread = AccessController.doPrivileged(
                    new PrivilegedExceptionAction<ClientThread>() {
                        public ClientThread run() throws Exception {
                            return new ClientThread(thisControl, serverSocket);
                        }
                    });
            clientThread.start();

            try {
                // wait until we are told to shutdown or someone sends an InterruptedException
                synchronized(shutdownSync) {
                    try {
                        while (!shutdown) {
                            shutdownSync.wait();
                        }
                    }
                    catch (InterruptedException e)
                    {
                        shutdown = true;
                    }
                }
               
                try {
                    AccessController.doPrivileged(
                            new PrivilegedAction<Void>() {
                                public Void run() {
                                // Need to interrupt the memcheck thread if it is sleeping.
                                    if (mc != null)
                                        mc.interrupt();

                                    //interrupt client thread
                                    clientThread.interrupt();

                                    return null;
                               }
                            });
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }
               
                // Close out the sessions
                synchronized(sessionTable) {
                    for (Session session : sessionTable.values())
                    {
                        try {
                            session.close();
                        } catch (Exception exception) {
                            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                        }
                    }
                }

                synchronized (threadList)
                {
                    //interupt any connection threads still active
                    for (final DRDAConnThread threadi : threadList)
                    {
                        try {
                            threadi.close();
                            AccessController.doPrivileged(
                                    new PrivilegedAction<Void>() {
                                        public Void run() {
                                            threadi.interrupt();
                                            return null;
                                        }
                                    });
                        } catch (Exception exception) {
                            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                        }
                    }
                    threadList.clear();
                }

                // close the listener socket
                try{
                   serverSocket.close();
                }catch(IOException e){
                    consolePropertyMessage("DRDA_ListenerClose.S", true);
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }

                // Wake up those waiting on sessions, so
                // they can close down
                try{
                    synchronized (runQueue) {
                        runQueue.notifyAll();
                    }
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }
               
                // And now unregister any MBeans.
                try {
                    mgmtService.unregisterMBean(versionMBean);
                    mgmtService.unregisterMBean(networkServerMBean);
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }

                if (shutdownDatabasesOnShutdown) {
    View Full Code Here

    Examples of org.apache.derby.iapi.services.jmx.ManagementService

                    }
                  );
        clientThread.start();
           
            // Now that we are up and running, register any MBeans
            ManagementService mgmtService = ((ManagementService)
                    Monitor.getSystemModule(Module.JMX));
           
            final Object versionMBean = mgmtService.registerMBean(
                               new Version(
                                       getNetProductVersionHolder(),
                                       SystemPermission.SERVER),
                               VersionMBean.class,
                               "type=Version,jar=derbynet.jar");
            final Object networkServerMBean = mgmtService.registerMBean(
                                new NetworkServerMBeanImpl(this),
                                NetworkServerMBean.class,
                                "type=NetworkServer");
                         
        try {
          // wait until we are told to shutdown or someone sends an InterruptedException
              synchronized(shutdownSync) {
                  try {
              shutdownSync.wait();
                  }
                  catch (InterruptedException e)
                  {
                      shutdown = true;
                  }
              }
             
              try {
                  AccessController.doPrivileged(
                          new PrivilegedAction() {
                              public Object run()  {
                              // Need to interrupt the memcheck thread if it is sleeping.
                                  if (mc != null)
                                      mc.interrupt();

                                  //interrupt client thread
                                  clientThread.interrupt();

                                  return null;
                             }
                          });
              } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
              }
         
           // Close out the sessions
           synchronized(sessionTable) {
             for (Enumeration e = sessionTable.elements(); e.hasMoreElements(); )
             { 
               Session session = (Session) e.nextElement();
               try {
                 session.close();
               } catch (Exception exception) {
                     consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
               }
             }
           }

          synchronized (threadList)
          {
             //interupt any connection threads still active
             for (int i = 0; i < threadList.size(); i++)
             {
               try {
                 final DRDAConnThread threadi = (DRDAConnThread)threadList.get(i);
                        
                  threadi.close();
                 AccessController.doPrivileged(
                       new PrivilegedAction() {
                         public Object run() {
                           threadi.interrupt();
                           return null;
                         }
                       });
               } catch (Exception exception) {
                     consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
               }
             }
             threadList.clear();
          }
            
            // close the listener socket
            try{
               serverSocket.close();
            }catch(IOException e){
            consolePropertyMessage("DRDA_ListenerClose.S", true);
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }

          // Wake up those waiting on sessions, so
          // they can close down
            try{
            synchronized (runQueue) {
              runQueue.notifyAll();
           
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }
             
              // And now unregister any MBeans.
            try {
                mgmtService.unregisterMBean(versionMBean);
                mgmtService.unregisterMBean(networkServerMBean);
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }

          if (shutdownDatabasesOnShutdown) {
    View Full Code Here

    Examples of org.apache.derby.iapi.services.jmx.ManagementService

            // First, register any MBeans. We do this before we start accepting
            // connections from the clients to ease testing of JMX (DERBY-3689).
            // This way we know that once we can connect to the network server,
            // the MBeans will be available.
            ManagementService mgmtService = ((ManagementService)
                    Monitor.getSystemModule(Module.JMX));

            final Object versionMBean = mgmtService.registerMBean(
                               new Version(
                                       getNetProductVersionHolder(),
                                       SystemPermission.SERVER),
                               VersionMBean.class,
                               "type=Version,jar=derbynet.jar");
            final Object networkServerMBean = mgmtService.registerMBean(
                                new NetworkServerMBeanImpl(this),
                                NetworkServerMBean.class,
                                "type=NetworkServer");

            // We accept clients on a separate thread so we don't run into a problem
            // blocking on the accept when trying to process a shutdown
            final ClientThread clientThread = AccessController.doPrivileged(
                    new PrivilegedExceptionAction<ClientThread>() {
                        public ClientThread run() throws Exception {
                            return new ClientThread(thisControl, serverSocket);
                        }
                    });
            clientThread.start();

            try {
                // wait until we are told to shutdown or someone sends an InterruptedException
                synchronized(shutdownSync) {
                    try {
                        while (!shutdown) {
                            shutdownSync.wait();
                        }
                    }
                    catch (InterruptedException e)
                    {
                        shutdown = true;
                    }
                }
               
                try {
                    AccessController.doPrivileged(
                            new PrivilegedAction<Void>() {
                                public Void run() {
                                // Need to interrupt the memcheck thread if it is sleeping.
                                    if (mc != null)
                                        mc.interrupt();

                                    //interrupt client thread
                                    clientThread.interrupt();

                                    return null;
                               }
                            });
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }
               
                // Close out the sessions
                synchronized(sessionTable) {
                    for (Session session : sessionTable.values())
                    {
                        try {
                            session.close();
                        } catch (Exception exception) {
                            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                        }
                    }
                }

                synchronized (threadList)
                {
                    //interupt any connection threads still active
                    for (final DRDAConnThread threadi : threadList)
                    {
                        try {
                            threadi.close();
                            AccessController.doPrivileged(
                                    new PrivilegedAction<Void>() {
                                        public Void run() {
                                            threadi.interrupt();
                                            return null;
                                        }
                                    });
                        } catch (Exception exception) {
                            consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                        }
                    }
                    threadList.clear();
                }

                // close the listener socket
                try{
                   serverSocket.close();
                }catch(IOException e){
                    consolePropertyMessage("DRDA_ListenerClose.S", true);
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }

                // Wake up those waiting on sessions, so
                // they can close down
                try{
                    synchronized (runQueue) {
                        runQueue.notifyAll();
                    }
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }
               
                // And now unregister any MBeans.
                try {
                    mgmtService.unregisterMBean(versionMBean);
                    mgmtService.unregisterMBean(networkServerMBean);
                } catch (Exception exception) {
                    consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
                }

                if (shutdownDatabasesOnShutdown) {
    View Full Code Here

    Examples of org.apache.derby.iapi.services.jmx.ManagementService

            // First, register any MBeans. We do this before we start accepting
            // connections from the clients to ease testing of JMX (DERBY-3689).
            // This way we know that once we can connect to the network server,
            // the MBeans will be available.
            ManagementService mgmtService = ((ManagementService)
                    Monitor.getSystemModule(Module.JMX));

            final Object versionMBean = mgmtService.registerMBean(
                               new Version(
                                       getNetProductVersionHolder(),
                                       SystemPermission.SERVER),
                               VersionMBean.class,
                               "type=Version,jar=derbynet.jar");
            final Object networkServerMBean = mgmtService.registerMBean(
                                new NetworkServerMBeanImpl(this),
                                NetworkServerMBean.class,
                                "type=NetworkServer");

        // We accept clients on a separate thread so we don't run into a problem
        // blocking on the accept when trying to process a shutdown
        final ClientThread clientThread =  
          (ClientThread) AccessController.doPrivileged(
                    new PrivilegedExceptionAction() {
                      public Object run() throws Exception
                      {
                        return new ClientThread(thisControl,
                                    serverSocket);
                      }
                    }
                  );
        clientThread.start();

        try {
          // wait until we are told to shutdown or someone sends an InterruptedException
              synchronized(shutdownSync) {
                  try {
                        while (!shutdown) {
                            shutdownSync.wait();
                        }
                  }
                  catch (InterruptedException e)
                  {
                      shutdown = true;
                  }
              }
             
              try {
                  AccessController.doPrivileged(
                          new PrivilegedAction() {
                              public Object run()  {
                              // Need to interrupt the memcheck thread if it is sleeping.
                                  if (mc != null)
                                      mc.interrupt();

                                  //interrupt client thread
                                  clientThread.interrupt();

                                  return null;
                             }
                          });
              } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
              }
         
           // Close out the sessions
           synchronized(sessionTable) {
             for (Enumeration e = sessionTable.elements(); e.hasMoreElements(); )
             { 
               Session session = (Session) e.nextElement();
               try {
                 session.close();
               } catch (Exception exception) {
                     consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
               }
             }
           }

          synchronized (threadList)
          {
             //interupt any connection threads still active
             for (int i = 0; i < threadList.size(); i++)
             {
               try {
                 final DRDAConnThread threadi = (DRDAConnThread)threadList.get(i);
                        
                  threadi.close();
                 AccessController.doPrivileged(
                       new PrivilegedAction() {
                         public Object run() {
                           threadi.interrupt();
                           return null;
                         }
                       });
               } catch (Exception exception) {
                     consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
               }
             }
             threadList.clear();
          }
            
            // close the listener socket
            try{
               serverSocket.close();
            }catch(IOException e){
            consolePropertyMessage("DRDA_ListenerClose.S", true);
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }

          // Wake up those waiting on sessions, so
          // they can close down
            try{
            synchronized (runQueue) {
              runQueue.notifyAll();
           
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }
             
              // And now unregister any MBeans.
            try {
                mgmtService.unregisterMBean(versionMBean);
                mgmtService.unregisterMBean(networkServerMBean);
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }

          if (shutdownDatabasesOnShutdown) {
    View Full Code Here

    Examples of org.apache.derby.iapi.services.jmx.ManagementService

                    }
                  );
        clientThread.start();
           
            // Now that we are up and running, register any MBeans
            ManagementService mgmtService = ((ManagementService)
                    Monitor.getSystemModule(Module.JMX));
           
            final Object versionMBean = mgmtService.registerMBean(
                               new Version(
                                       getNetProductVersionHolder(),
                                       SystemPermission.SERVER),
                               VersionMBean.class,
                               "type=Version,jar=derbynet.jar");
            final Object networkServerMBean = mgmtService.registerMBean(
                                new NetworkServerMBeanImpl(this),
                                NetworkServerMBean.class,
                                "type=NetworkServer");
                         
        try {
          // wait until we are told to shutdown or someone sends an InterruptedException
              synchronized(shutdownSync) {
                  try {
                        while (!shutdown) {
                            shutdownSync.wait();
                        }
                  }
                  catch (InterruptedException e)
                  {
                      shutdown = true;
                  }
              }
             
              try {
                  AccessController.doPrivileged(
                          new PrivilegedAction() {
                              public Object run()  {
                              // Need to interrupt the memcheck thread if it is sleeping.
                                  if (mc != null)
                                      mc.interrupt();

                                  //interrupt client thread
                                  clientThread.interrupt();

                                  return null;
                             }
                          });
              } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
              }
         
           // Close out the sessions
           synchronized(sessionTable) {
             for (Enumeration e = sessionTable.elements(); e.hasMoreElements(); )
             { 
               Session session = (Session) e.nextElement();
               try {
                 session.close();
               } catch (Exception exception) {
                     consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
               }
             }
           }

          synchronized (threadList)
          {
             //interupt any connection threads still active
             for (int i = 0; i < threadList.size(); i++)
             {
               try {
                 final DRDAConnThread threadi = (DRDAConnThread)threadList.get(i);
                        
                  threadi.close();
                 AccessController.doPrivileged(
                       new PrivilegedAction() {
                         public Object run() {
                           threadi.interrupt();
                           return null;
                         }
                       });
               } catch (Exception exception) {
                     consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
               }
             }
             threadList.clear();
          }
            
            // close the listener socket
            try{
               serverSocket.close();
            }catch(IOException e){
            consolePropertyMessage("DRDA_ListenerClose.S", true);
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }

          // Wake up those waiting on sessions, so
          // they can close down
            try{
            synchronized (runQueue) {
              runQueue.notifyAll();
           
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }
             
              // And now unregister any MBeans.
            try {
                mgmtService.unregisterMBean(versionMBean);
                mgmtService.unregisterMBean(networkServerMBean);
            } catch (Exception exception) {
                consolePrintAndIgnore("DRDA_UnexpectedException.S", exception, true);
            }

          if (shutdownDatabasesOnShutdown) {
    View Full Code Here

    Examples of org.apache.ode.axis2.service.ManagementService

                }

                File deploymentDir = new File(_workRoot, "processes");
                _poller = new DeploymentPoller(deploymentDir, this);

                _mgtService = new ManagementService();
                _mgtService.enableService(_axisConfig, _server, _store, _appRoot.getAbsolutePath());
               
                new DeploymentWebService().enableService(_axisConfig, _server, _store, _poller, _appRoot.getAbsolutePath(), _workRoot
                        .getAbsolutePath());
    View Full Code Here

    Examples of org.apache.ode.axis2.service.ManagementService

                }

                File deploymentDir = new File(_workRoot, "processes");
                _poller = new DeploymentPoller(deploymentDir, this);

                new ManagementService().enableService(_axisConfig, _server, _store, _appRoot.getAbsolutePath());
                new DeploymentWebService().enableService(_axisConfig, _server, _store, _poller, _appRoot.getAbsolutePath(), _workRoot
                        .getAbsolutePath());

                _store.loadAll();
    View Full Code Here

    Examples of org.apache.ode.axis2.service.ManagementService

                }

                File deploymentDir = new File(_workRoot, "processes");
                _poller = new DeploymentPoller(deploymentDir, this);

                _mgtService = new ManagementService();
                _mgtService.enableService(_axisConfig, _server, _store, _appRoot.getAbsolutePath());

                new DeploymentWebService().enableService(_axisConfig, _server, _store, _poller, _appRoot.getAbsolutePath(), _workRoot
                        .getAbsolutePath());
    View Full Code Here

    Examples of org.apache.ode.axis2.service.ManagementService

            _poller = getDeploymentPollerExt();
            if( _poller == null ) {
                _poller = new DeploymentPoller(_store.getDeployDir(), this);
            }

            _mgtService = new ManagementService();
            _mgtService.enableService(_axisConfig, _bpelServer, _store, _appRoot.getAbsolutePath());

            try {
                __log.debug("Initializing Deployment Web Service");
                new DeploymentWebService().enableService(_axisConfig, _store, _poller, _appRoot.getAbsolutePath(), _workRoot.getAbsolutePath());
    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.