Package com.sun.enterprise.admin.server.core

Examples of com.sun.enterprise.admin.server.core.CustomMBeanException


            final Hashtable properties  = configON.getKeyPropertyList();
            properties.put(serverNameKey, serverNameVal);
            final ObjectName ron = new ObjectName(configON.getDomain(), properties);
            return ( ron );
        } catch(final Exception e) {
            throw new CustomMBeanException(e);
        }
    }
View Full Code Here


            throw new CustomMBeanException(e);
        }
    }
    public static ObjectName getCascadingUnawareObjectName(final ObjectName cascadeON) throws CustomMBeanException {
        if (cascadeON == null)
            throw new CustomMBeanException(CMBStrings.get("InternalError", "getCascadingUnawareObjectName() received a null argument"));
        try {
            ObjectName ron = cascadeON;
            final String serverNameKey  = CustomMBeanConstants.SERVER_KEY;
            final Hashtable properties  = cascadeON.getKeyPropertyList(); // this may be unmodifiable
            if (properties.containsKey(serverNameKey)) {
                final Hashtable np = new Hashtable(properties);
                np.remove(serverNameKey);
                ron = new ObjectName(cascadeON.getDomain(), np);
            }
            return ( ron );
        } catch(final Exception e) {
            throw new CustomMBeanException(e);
        }       
    }
View Full Code Here

            final Class c = cl.loadClass(classname);
            logger.fine(CMBStrings.get("cmb.loadingMBean8", c.getName(), cl.getClass().getName(), c.getClassLoader().getClass().getName()));
            return ( c );
        } catch (final ClassNotFoundException cnfe) {
            logger.info(CMBStrings.get("cmb.loadingMBean3", mbean.getImplClassName(), cl.getClass().getName()));
            throw new CustomMBeanException(cnfe);
        } catch (final NoClassDefFoundError ncdfe) {
            logger.info(CMBStrings.get("cmb.loadingMBean4", mbean.getImplClassName(), cl.getClass().getName()));
            throw new CustomMBeanException(ncdfe);
        } catch (final Exception e) {
            throw new CustomMBeanException(e);
        }
    }
View Full Code Here

        try{
            name = c.getName();
            return c.newInstance();
         } catch (final InstantiationException ie) {
            logger.info(CMBStrings.get("cmb.loadingMBean5", name));
            throw new CustomMBeanException(ie);
        } catch (final IllegalAccessException iae) {
            logger.info(CMBStrings.get("cmb.loadingMBean6", name));
            throw new CustomMBeanException(iae);
        } catch (final ExceptionInInitializerError eie) {
            logger.info(CMBStrings.get("cmb.loadingMBean7", name));
            throw new CustomMBeanException(eie);
        }catch(Throwable t) {
            // yes -- we are catching a Throwable here.  Normally this is highly
            // discouraged.  But this is a special case.  We are calling the user's
            // code and he may be throwing a Throwable in the ctor...
           
            String message = CMBStrings.get("cmb.newingMBean", c.getName(), t);
            logger.warning(message);
            throw new CustomMBeanException(message, t);
        }
    }
View Full Code Here

        }
    }
   
    private ObjectName registerIt(final Object mo, final ObjectName on) throws CustomMBeanException {
        if(mo == null)
            throw new CustomMBeanException(CMBStrings.get("objNameNull"));
        try {
            final ObjectInstance oi = mbs.registerMBean(mo, on);
            return ( oi.getObjectName() );
        }catch(Exception e){
            throw new CustomMBeanException(e);
        }
    }
View Full Code Here

        }catch(CustomMBeanException cmbe) {
            // If we get a CMBE -- then everything is already documented...
            throw cmbe;
        }catch(Throwable t) {
            // indirect calls to user code -- thus Throwable!
            throw new CustomMBeanException(t);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.server.core.CustomMBeanException

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.