Package com.volantis.mcs.management.tracking

Examples of com.volantis.mcs.management.tracking.PageTrackerException


                // unset the manager and server
                manager = null;
                server = null;
                throw pte; // rethrow the exception
            } catch (MalformedObjectNameException mone) {
                throw new PageTrackerException("The ObjectName provided is malformed:" +
                        " " + PAGE_TRACKER_NAME, mone);
            }
            return manager;
        }
    }
View Full Code Here


            try {
                server = MBeanServerFactory.createMBeanServer(JMX_DOMAIN);
                // thats right. There is no common base class for the
                // exceptions this throws so catch them all.
            } catch (SecurityException se) {
                throw new PageTrackerException("You do not have permission to" +
                        "create an MBeanServer", se);
            } catch (JMRuntimeException jre) {
                throw new PageTrackerException("Could not create MBeanServer. " +
                        "This can occur for two reasons.\n1) the property " +
                        "\"javax.management.builder.initial\" is set but " +
                        "the specified class cannot be instanciated.\n2) " +
                        "The instanciated class is returning null from " +
                        "calls to its \"newMBeanServerDelegate\" or" +
                        "\"newMBeanServer\" method.", jre);
            } catch (ClassCastException cce) {
                throw new PageTrackerException("The class specified in " +
                        "\"javax.management.builder.initial\" is" +
                        "not assignment compatible with MBeanServerBuilder",
                        cce);
            }
        } else {
            // if our MBeanServer is not registered then throw an exception
            // as someone else has deregistered it.
            if (!isMBeanServerRegistered(server)) {
                String errorMessage = "The Volantis MBeanServer does not " +
                        "appear to be registered with the factory. It is " +
                        "likely that someone else has deregistered it.";
                throw new PageTrackerException(errorMessage);
            }
        }

        registerBeanWithServer();
    }
View Full Code Here

            // catch all the exceptions known to man and provide helpful
            // messages. PageTrackerExceptions from isRegistered are passed
            // through
            // @todo later internationalize these
        } catch (InstanceAlreadyExistsException iaee) {
            throw new PageTrackerException("Could not register bean: " + manager +
                    " (" + beanName + ") with server " + server +
                    " as instance already exists", iaee);
        } catch (MBeanRegistrationException mbre) {
            throw new PageTrackerException("Could not register bean: " + manager +
                    " (" + beanName + ") with server " + server +
                    " as preregister threw an exception", mbre);
        } catch (NotCompliantMBeanException ncmbe) {
            throw new PageTrackerException("Could not register object: " + manager +
                    " (" + beanName + ") with server " + server +
                    " as the object is not a complient MBean", ncmbe);
        } catch (RuntimeOperationsException roe) {
            throw new PageTrackerException("Could not register bean: " + manager +
                    " (" + beanName + ") with server " + server +
                    " as an illegal argument was provided.", roe);
        }
    }
View Full Code Here

        // MBeanServerFactory by searching though all registered Servers
        ArrayList servers = null;
        try {
            servers = MBeanServerFactory.findMBeanServer(null);
        } catch (SecurityException se) {
            throw new PageTrackerException("You do not have permission to " +
                    "execute the findMBeanServer method.", se);
        }

        Iterator serverIt = servers.listIterator();
        boolean foundServer = false;
View Full Code Here

TOP

Related Classes of com.volantis.mcs.management.tracking.PageTrackerException

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.