Package com.sun.jini.admin

Examples of com.sun.jini.admin.DestroyAdmin.destroy()


                        try {
                            Subject.doAsPrivileged(subject,
                                                   new PrivilegedExceptionAction<Void>() {
                                                       public Void run() throws Exception {
                                                           try {
                                                               dAdmin.destroy();
                                                           } catch (Exception e) {
                                                               //e.printStackTrace();
                                                           }
                                                           return (null);
                                                       }
View Full Code Here


                        } catch (PrivilegedActionException e) {
                            e.printStackTrace();
                        }
                    } else {
                        try {
                            dAdmin.destroy();
                        } catch (Exception e) {
                            //e.printStackTrace();
                        }
                    }
View Full Code Here

    void doDestroyService(final Object service, final Uuid serviceUuid, boolean clean) throws RemoteException {
        logger.trace("Obtaining DestroyAdmin for [{}]", LoggingUtil.getLoggingName(svcElement));
        Administrable admin = (Administrable)service;
        DestroyAdmin destroyAdmin = (DestroyAdmin)admin.getAdmin();
        logger.trace("DestroyAdmin obtained, destroy the service [{}]", LoggingUtil.getLoggingName(svcElement));
        destroyAdmin.destroy();
        logger.trace("The service [{}] has been destroyed", LoggingUtil.getLoggingName(svcElement));
    }

    /**
     * Relocate (move) a ServiceBean to a different ServiceBeanInstantiator
View Full Code Here

         */
        public void succeeded(final ServiceBeanInstance jsbInstance) throws RemoteException {
            try {
                Administrable admin = (Administrable)original.getService();
                DestroyAdmin destroyAdmin = (DestroyAdmin)admin.getAdmin();
                destroyAdmin.destroy();
            } catch(Exception e) {
                if(mgrLogger.isTraceEnabled()) {
                    mgrLogger.trace("[{}] Destroying original service", LoggingUtil.getLoggingName(svcElement), e);
                } else {
                    mgrLogger.info("[{}] Destroying original service", LoggingUtil.getLoggingName(svcElement));
View Full Code Here

            Assert.assertNotNull("Expected non-null OperationalStringManager", mgr);
            testManager.waitForDeployment(mgr);
            File marker = ForkImpl.getMarkerFile();
            Assert.assertTrue("The marker file should exist", marker.exists());
            DestroyAdmin dAdmin = (DestroyAdmin)cybernode.getAdmin();
            dAdmin.destroy();
            long t0 = System.currentTimeMillis();
            long maxWait=60*1000;
            long interval = 1000;
            long waited = 0;
            while(marker.exists() && waited <maxWait) {
View Full Code Here

                            Administrable admin = (Administrable)serviceProxy;
                            Object adminObject = admin.getAdmin();

                            if(adminObject instanceof DestroyAdmin) {
                                DestroyAdmin destroyAdmin = (DestroyAdmin)adminObject;
                                destroyAdmin.destroy();
                                setDiscarded();
                                //container.discarded(identifier);
                                terminated.set(true);
                            } else {
                                logger.debug("No DestroyAdmin capabilities for {}", serviceProxy.getClass().getName());
View Full Code Here

                            context.getServiceElement().getName());
                try {
                    Administrable admin =
                        (Administrable)mgr.getServiceBeanInstance().getService();
                    DestroyAdmin dAdmin = (DestroyAdmin) admin.getAdmin();
                    dAdmin.destroy();
                } catch(Exception ex) {
                    logger.error("Unable to destroy service ["+context.getServiceElement().getName()+"] ", ex);
                }
            } else {
                getSLA().resetHighThreshold();
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.