avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-logkit/src/java/org/apache/log/output/jms AbstractJMSTarget.java JMSQueueTarget.java JMSTopicTarget.java
Date Sat, 18 May 2002 03:14:26 GMT
donaldp     02/05/17 20:14:26

  Modified:    .        build.xml
               src/java/org/apache/log/output AbstractTarget.java
               src/java/org/apache/log/output/jms AbstractJMSTarget.java
                        JMSQueueTarget.java JMSTopicTarget.java
  Log:
  Allow JMS targets to have error handler passed in so that they can report errors if it occurs
on initial connection.
  
  Submitted by: david.gray@hic.gov.au
  
  Revision  Changes    Path
  1.75      +1 -1      jakarta-avalon-logkit/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/build.xml,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- build.xml	17 Apr 2002 09:51:53 -0000	1.74
  +++ build.xml	18 May 2002 03:14:26 -0000	1.75
  @@ -20,7 +20,7 @@
       Give user a chance to override without editing this file
       (and without typing -D each time he compiles it)
     -->
  -  <property file=".ant.properties"/>
  +  <property file="ant.properties"/>
     <property file="${user.home}/.ant.properties"/>
   
     <property name="name" value="logkit"/>
  
  
  
  1.6       +14 -0     jakarta-avalon-logkit/src/java/org/apache/log/output/AbstractTarget.java
  
  Index: AbstractTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/AbstractTarget.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractTarget.java	27 Mar 2002 22:07:57 -0000	1.5
  +++ AbstractTarget.java	18 May 2002 03:14:26 -0000	1.6
  @@ -29,6 +29,20 @@
       ///Flag indicating that log session is finished (aka target has been closed)
       private boolean m_isOpen;
   
  +    public AbstractTarget()
  +    {
  +
  +    }
  +
  +    public AbstractTarget( final ErrorHandler errorHandler )
  +    {
  +        if( errorHandler == null )
  +        {
  +            throw new NullPointerException( "errorHandler specified cannot be null" );
  +        }
  +        setErrorHandler( errorHandler );
  +    }
  +
       /**
        * Provide component with ErrorHandler.
        *
  
  
  
  1.6       +8 -0      jakarta-avalon-logkit/src/java/org/apache/log/output/jms/AbstractJMSTarget.java
  
  Index: AbstractJMSTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/jms/AbstractJMSTarget.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractJMSTarget.java	27 Mar 2002 22:07:58 -0000	1.5
  +++ AbstractJMSTarget.java	18 May 2002 03:14:26 -0000	1.6
  @@ -12,6 +12,7 @@
   import javax.jms.TopicConnection;
   import javax.jms.TopicPublisher;
   import javax.jms.TopicSession;
  +import org.apache.log.ErrorHandler;
   import org.apache.log.LogEvent;
   import org.apache.log.output.AbstractTarget;
   
  @@ -28,6 +29,13 @@
   
       public AbstractJMSTarget( final MessageBuilder builder )
       {
  +        m_builder = builder;
  +    }
  +
  +    public AbstractJMSTarget( final MessageBuilder builder,
  +                              final ErrorHandler errorHandler )
  +    {
  +        super( errorHandler );
           m_builder = builder;
       }
   
  
  
  
  1.4       +12 -0     jakarta-avalon-logkit/src/java/org/apache/log/output/jms/JMSQueueTarget.java
  
  Index: JMSQueueTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/jms/JMSQueueTarget.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JMSQueueTarget.java	27 Mar 2002 22:07:58 -0000	1.3
  +++ JMSQueueTarget.java	18 May 2002 03:14:26 -0000	1.4
  @@ -14,6 +14,7 @@
   import javax.jms.QueueSender;
   import javax.jms.QueueSession;
   import javax.jms.Session;
  +import org.apache.log.ErrorHandler;
   
   /**
    * A target that writes to a JMS Queue.
  @@ -43,6 +44,17 @@
                              final Queue queue )
       {
           super( builder );
  +        m_factory = factory;
  +        m_queue = queue;
  +        open();
  +    }
  +
  +    public JMSQueueTarget( final MessageBuilder builder,
  +                           final QueueConnectionFactory factory,
  +                           final Queue queue,
  +                           final ErrorHandler handler )
  +    {
  +        super( builder, handler );
           m_factory = factory;
           m_queue = queue;
           open();
  
  
  
  1.6       +12 -0     jakarta-avalon-logkit/src/java/org/apache/log/output/jms/JMSTopicTarget.java
  
  Index: JMSTopicTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/jms/JMSTopicTarget.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JMSTopicTarget.java	27 Mar 2002 22:07:58 -0000	1.5
  +++ JMSTopicTarget.java	18 May 2002 03:14:26 -0000	1.6
  @@ -14,6 +14,7 @@
   import javax.jms.TopicConnectionFactory;
   import javax.jms.TopicPublisher;
   import javax.jms.TopicSession;
  +import org.apache.log.ErrorHandler;
   
   /**
    * A target that writes to a JMS Topic.
  @@ -43,6 +44,17 @@
                              final Topic topic )
       {
           super( builder );
  +        m_factory = factory;
  +        m_topic = topic;
  +        open();
  +    }
  +
  +    public JMSTopicTarget( final MessageBuilder builder,
  +                           final TopicConnectionFactory factory,
  +                           final Topic topic,
  +                           final ErrorHandler handler )
  +    {
  +        super( builder, handler );
           m_factory = factory;
           m_topic = topic;
           open();
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message