Package com.sun.appserv.server

Examples of com.sun.appserv.server.ServerLifecycle


    protected void startLifecycleServices(String[][] s, ServerContext sc) {
        services = new ServerLifecycle[s.length];
        for (int i =0; i < s.length; i ++) {
            try {
                String service = s[i][1];
                ServerLifecycle slc = (ServerLifecycle)
                Class.forName(service).newInstance();
                services[i] = slc;
                slc.onInitialization(sc);
            } catch (Exception e) {
                _logger.log(Level.WARNING, e.getMessage(), e);
            }
        }

        for (ServerLifecycle slc : services) {
            try {
                slc.onStartup(sc);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        for (ServerLifecycle slc : services) {
            try {
                slc.onReady(sc);
            } catch (Exception e) {
                _logger.log(Level.WARNING, e.getMessage(), e);
            }
        }
    }
View Full Code Here


                    if (service[0].equals(ods[0])) {
                        continue allServices;
                    }
               }
               try {
                   final ServerLifecycle serverLifecycle =
                    super.instantiateOneServerLifecycle( serverContext, service[1] );
                   serviceList.add( serverLifecycle );
               } catch (Exception ex) {
                   _logger.log(Level.SEVERE, "server.exception", ex);
                   throw new ServerLifecycleException(ex.getMessage());
View Full Code Here

        throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        //final TimingDelta delta = new TimingDelta();
       
        final Class c  = Class.forName( classname );
      
        ServerLifecycle item = null;

        // call a constructor that takes a ServerContext if it exists, since
        // some services might make efficient use of it during construction.
        // otherwise use a no-argument constructor
        try {
View Full Code Here

    public void onShutdown() throws ServerLifecycleException
    {
 
        // shutdown the built-in runtime services (in the reverse order).
        for (int i = services.size(); i > 0; i--) {
            final ServerLifecycle service = services.get(i-1);

      _logger.log(Level.FINE,"service.shutdown", services.get(i-1));
            try {
                service.onShutdown();
            } catch (Exception e) {
            //do nothing since we want to continue shutting down other LFC
            //modules
                    _logger.log(Level.WARNING, "server.exception", e);      
            }           
View Full Code Here

          _logger.log(Level.FINE, "exception : " +t);
      }
  }
// terminate the built-in runtime services (in the reverse order)
        for (int i = services.size(); i > 0; i--) {
            final ServerLifecycle service = services.get(i-1);

      _logger.log(Level.FINE,"service.shutdown",
          services.get(i-1));
      try {
            service.onTermination();
      } catch (Exception e) {
    //do nothing since we want to continue shutting down other LFC
    //modules
                _logger.log(Level.WARNING, "server.exception", e)
      }
View Full Code Here

TOP

Related Classes of com.sun.appserv.server.ServerLifecycle

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.