| | |
| | | ClassPropertyDefinition pd = |
| | | d.getJavaImplementationClassPropertyDefinition(); |
| | | // Load the class and cast it to a DebugLogPublisher. |
| | | ErrorLogPublisher publisher = null; |
| | | Class<? extends ErrorLogPublisher> theClass; |
| | | try { |
| | | theClass = pd.loadClass(className, ErrorLogPublisher.class); |
| | | theClass.newInstance(); |
| | | publisher = theClass.newInstance(); |
| | | } catch (Exception e) { |
| | | int msgID = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS; |
| | | String message = getMessage(msgID, className, |
| | |
| | | // Determine the initialization method to use: it must take a |
| | | // single parameter which is the exact type of the configuration |
| | | // object. |
| | | theClass.getMethod("initializeErrorLogPublisher", config.definition() |
| | | .getServerConfigurationClass()); |
| | | Method method = theClass.getMethod("isConfigurationAcceptable", |
| | | ErrorLogPublisherCfg.class, |
| | | List.class); |
| | | Boolean acceptable = (Boolean) method.invoke(publisher, config, |
| | | unacceptableReasons); |
| | | |
| | | if (! acceptable) |
| | | { |
| | | return false; |
| | | } |
| | | } catch (Exception e) { |
| | | int msgID = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS; |
| | | String message = getMessage(msgID, className, |