Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-928

additional logging requested for interceptor instantiation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.0
    • None
    • Controls
    • None
    • Beehive dist built from SVN r280592

    Description

      After going through the Wiki page about interceptors (http://wiki.apache.org/beehive/Controls/AnnotationBasedFeatures) I created an interceptor but wasn't getting the results I expected. When the interceptor is instantiated, a failure to find the interceptor class is currently silently ignored; please consider logging the failure.

      Proposed patch (note that I don't really like using SEP - just don't see any other logging used in the Controls Runtime):
      — trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/ControlBean.java
      @@ -932,6 +933,10 @@
      try
      {
      i = (Interceptor) getControlService( getControlBeanContext().getClassLoader().loadClass( n ), null );
      + if( i == null )

      { + System.err.println( "interceptor (" + n + + ") not found in current classpath" ); + }

      }
      catch ( Exception e )

      { @@ -939,7 +944,7 @@ // isn't present on this system at runtime (ClassNotFoundException), or if the container of the // control didn't registers the service. - // TODO log a message here to that effect, but just swallow the exception for now. + System.err.println( "failed to instantiate interceptor: " + e ); }

      finally
      {

      Attachments

        Activity

          People

            Unassigned Unassigned
            jerjohns Jeremiah Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: