Package java.util.logging

Examples of java.util.logging.ErrorManager


                            Thread.currentThread().getContextClassLoader();
                        if (cl == null)
                            cl = ClassLoader.getSystemClassLoader();
                        return Class.forName( className, true,cl).newInstance();
                    } catch( Exception e ) {
                        new ErrorManager().error(
                            "Error In Instantiating Class " + className, e,
                            ErrorManager.GENERIC_FAILURE );
                    }
                    return null;
               }
View Full Code Here


            Config cfg =
                ServerBeansFactory.getConfigBean(sc.getConfigContext());
            return cfg.getLogService().isLogToConsole();

        } catch ( Exception ex ) {
            new ErrorManager().error(
                "Error while geting echo-log-messages-to-stderr attribute of " +
                " log-service ", ex, ErrorManager.GENERIC_FAILURE );
      return false;
        }
    }
View Full Code Here

                    logLevel = Level.parse(val);
                } catch (Exception noSuch) {  //no such module name,such as "core", in <module-log-levels>
                }
      }
        } catch ( Exception e ) {
            new ErrorManager().error( "Error In Setting Initial Loglevel", e,
                ErrorManager.GENERIC_FAILURE );
        }
        return logLevel;
    }
View Full Code Here

            final ServerLogManager mgr = getInstance();
            while( listIterator.hasNext( ) ) {
                mgr.initializeLogger( (Logger) listIterator.next() );
            }
        } catch( Exception e ) {
            new ErrorManager().error(
                "Exception caught in reInitializeServerLoggers ",
                 e, ErrorManager.GENERIC_FAILURE );
        }
    }
View Full Code Here

                return null;
            }
            return ServerBeansFactory.getConfigBean(
                sc.getConfigContext()).getAlertService( );
        } catch( Exception e ) {
            new ErrorManager().error( "Error In getAlertService  ", e,
                ErrorManager.GENERIC_FAILURE );
        }
        return null;
    }
View Full Code Here

        try {
            listener = (NotificationListener) instantiateAndConfigure(
                listenerConfig.getListenerClassName( ),
                    listenerConfig.getElementProperty( ) );
        } catch( Exception e ) {   
            new ErrorManager().error(
                "Error In Notification Listener Config ", e,
                          ErrorManager.GENERIC_FAILURE );
        }
        return listener;
    }
View Full Code Here

        NotificationFilter filter = null;
        try {
            filter = (NotificationFilter) instantiateAndConfigure(
                filterClassName, properties );
        } catch( Exception e ) {
            new ErrorManager().error(
                "Error In Notification Filter Config ", e,
                          ErrorManager.GENERIC_FAILURE );
        }
        return filter;
    }
View Full Code Here

                    if ( ( methodName.startsWith( "set" ) )
                       && ( methodName.endsWith( propertyName ) ) )
                    {
                        Class[] parameterTypes = methods[j].getParameterTypes( );
                        if( parameterTypes.length != 1 ) {
                            new ErrorManager().error(
                                "Only one Parameter is allowed for the setter " +
                                " Method: " + methodName +
                                " has invalid signature", new Exception(),
                                ErrorManager.GENERIC_FAILURE );
                        }

                        String parameterType = parameterTypes[0].getName();
                        Object[] parameters = new Object[1];

                        if( parameterType.equals( "java.lang.String") ) {
                            parameters[0] = propertyValue;
                        } else if( parameterType.equals( "byte" ) ) {
                            parameters[0] =
                                new Byte( propertyValue.getBytes()[0]);
                        } else if( parameterType.equals( "int" ) ) {
                            parameters[0] = new Integer(propertyValue);
                        } else if( parameterType.equals( "float" ) ) {
                            parameters[0] = new Float(propertyValue);
                        } else if( parameterType.equals( "double") ) {
                            parameters[0] = new Double(propertyValue);
                        } else if( parameterType.equals( "char" ) ) {
                            parameters[0] =
                                new Character(propertyValue.charAt(0));
                        } else if( parameterType.equals("boolean") ) {
                            parameters[0] = new Boolean(propertyValue);
                        } else if( parameterType.equals("long") ) {
                            parameters[0] = new Long(propertyValue);
                        } else if( parameterType.equals("short") ) {
                            parameters[0] = new Short(propertyValue);
                        } else {
                            new ErrorManager().error(
                                "Only the basic primitive types can be set " +
                                "as properties to NotificationListener and " +
                                " NotificationFilter ", new Exception(),
                                ErrorManager.GENERIC_FAILURE );
                            continue;
                        }
                        methods[j].invoke( o,  parameters );
                    }
                }
            }
        } catch( Exception e ) {
            new ErrorManager().error(
                "Error While Setting properties to Notification Listener or " +
                " Filter ", e, ErrorManager.GENERIC_FAILURE );
        }
    }
View Full Code Here

                        ClassLoader cl =
                            Thread.currentThread().getContextClassLoader();
                        if (cl == null)
                            cl = ClassLoader.getSystemClassLoader();
                        return Class.forName( className, true, cl).newInstance();                    } catch( Exception e ) {
                        new ErrorManager().error(
                            "Error In Instantiating Class " + className, e,
                            ErrorManager.GENERIC_FAILURE );
                    }
                    return null;
               }
View Full Code Here

                    ).getMBeanServer();
            mbeanServer.addNotificationListener(
                new ObjectName( MBEAN_SERVER_DELEGATE_OBJECT_NAME ),
                registrationListener, (NotificationFilter) null,(Object) null );
        } catch( Exception e ) {
            new ErrorManager().error(
                "Error In registerning MBeanServerNotificationListener ", e,
                ErrorManager.GENERIC_FAILURE );
        }
    }
View Full Code Here

TOP

Related Classes of java.util.logging.ErrorManager

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.