logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <psm...@apache.org>
Subject RE: JMSReceiver - chainsaw
Date Wed, 09 Jun 2004 11:33:22 GMT
can't you put the weblogic jar in the JAVA_HOME\lib\ext ?

cheers,

Paul Smith
On Wed, 9 Jun 2004, Stephen Pain wrote:

>
> Thanks Paul - now I just need to work out how to add the weblogic.jar to the classpath
so that it's picked up by chainsaw.  Do you know how I can do this?
>
> Can't start chainsaw at the moment because I'm getting this error: java.lang.NoClassDefFoundError:
javax/jms/MessageListener - which is to be expected until I can get the classpath sorted.
 I assume that if I remove the JMSReceiver from the config file this will go away.
>
> I'll let you know if I have any success.
>
> Cheers,
> Stephen
>
> Phone x59668
>
>
>
>
>                      Paul Smith
>                      <psmith@apache.or        To:       Log4J Developers List <log4j-dev@logging.apache.org>
>                      g>                       cc:
>                                               Subject:  RE: JMSReceiver - chainsaw
>                      09/06/2004 10:43
>                      Please respond to
>                      "Log4J Developers
>                      List"
>
>
>
>
>
>
> I have made the changes, and signed and uploaded.  Now just crossing
> fingers.  I have added your name to the JMSReceiver java file, I hope you
> don't mind.
>
> cheers,
>
> Paul Smith
>
> On Wed, 9 Jun 2004, Stephen Pain wrote:
>
>>
>> here's the unified diff - sorry for the delay...
>>
>> Cheers,
>> Stephen
>>
>> $ diff -u JMSReceiver.java.old JMSReceiver.java
>> --- JMSReceiver.java.old        2004-06-07 10:38:01.186774200 +0100
>> +++ JMSReceiver.java    2004-06-07 10:35:27.096615800 +0100
>> @@ -7,6 +7,10 @@
>>
>> package org.apache.log4j.net;
>>
>> +import java.io.FileInputStream;
>> +import java.util.Hashtable;
>> +import java.util.Properties;
>> +
>> import javax.jms.Message;
>> import javax.jms.MessageListener;
>> import javax.jms.TopicConnection;
>> @@ -53,18 +57,21 @@
>>   protected String userId;
>>   protected String password;
>>   protected TopicConnection topicConnection;
>> +  protected String jndiPath;
>>
>>   private String remoteInfo;
>> +  private String providerUrl;
>>
>>   public JMSReceiver() { }
>>
>>   public JMSReceiver(String _topicFactoryName, String _topicName,
>> -    String _userId, String _password) {
>> +    String _userId, String _password, String _jndiPath) {
>>
>>       topicFactoryName = _topicFactoryName;
>>       topicName = _topicName;
>>       userId = _userId;
>>       password = _password;
>> +      jndiPath = _jndiPath;
>>   }
>>
>>   /**
>> @@ -125,6 +132,23 @@
>>   }
>>
>>   /**
>> +       * Sets the path to a properties file containing
>> +       * the initial context and jndi provider url
>> +       */
>> +  public void setJndiPath(String _jndiPath) {
>> +        jndiPath = _jndiPath;
>> +   }
>> +
>> +   /**
>> +       * Gets the path to a properties file containing
>> +       * the initial context and jndi provider url
>> +       */
>> +   public String getJndiPath() {
>> +        return jndiPath;
>> +   }
>> +
>> +
>> +  /**
>>    * Returns true if the receiver is the same class and they are
>>    * configured for the same properties, and super class also considers
>>    * them to be equivalent. This is used by PluginRegistry when determining
>> @@ -165,8 +189,19 @@
>>     if (!isActive()) {
>>       try {
>>         remoteInfo = topicFactoryName + ":" + topicName;
>> -
>> -        Context ctx = new InitialContext();
>> +
>> +               Context ctx = null;
>> +               if (jndiPath == null || jndiPath.equals("")) {
>> +                       ctx = new InitialContext();
>> +               } else {
>> +                       Properties p = new Properties();
>> +                       p.load(new FileInputStream(jndiPath));
>> +                       ctx = new InitialContext(p);
>> +               }
>> +
>> +               // give some more flexibility about the choice of a tab name
>> +               providerUrl = (String)ctx.getEnvironment().get(Context.PROVIDER_URL);
>> +
>>         TopicConnectionFactory topicConnectionFactory;
>>         topicConnectionFactory =
>>           (TopicConnectionFactory) lookup(ctx, topicFactoryName);
>> @@ -191,6 +226,7 @@
>>         topicConnection.start();
>>
>>         setActive(true);
>> +
>>       } catch(Exception e) {
>>         setActive(false);
>>         if (topicConnection != null) {
>> @@ -233,6 +269,7 @@
>>
>>        // store the known remote info in an event property
>>        event.setProperty("log4j.remoteSourceInfo", remoteInfo);
>> +               event.setProperty("log4j.jmsProviderUrl", providerUrl);
>>
>>        doPost(event);
>>       } else {
>>
>>
>>
>>
>>
>>
>>
>>                      Paul Smith
>>                      <psmith@apache.or        To:       Log4J Developers List
<log4j-dev@logging.apache.org>
>>                      g>                       cc:
>>                                               Subject:  RE: JMSReceiver - chainsaw
>>                      08/06/2004 23:13
>>                      Please respond to
>>                      "Log4J Developers
>>                      List"
>>
>>
>>
>>
>>
>>
>> you couldn't do me a huge favour and do this as a 'diff -u' could you?
>> (Unified diff), that way I can easily do this on my windows box inside the
>> ide.
>>
>> I won't be able to redo the webstart till tonight (another 12 hours from
>> now) because I forgot to email myself certificate from home so I can do
>> this sort of thing from work.
>>
>> I think your approach of being able to specify a path to the
>> jndi.properties file is the best one I can think of too, that doesn't
>> involve any Classloader+SecurityManager trickery (Classloaders get very
>> complicated in a Web start environment).
>>
>> Anyway, a Unified diff would help me a lot.
>>
>> cheers
>>
>> ,Paul
>>
>> On Tue, 8 Jun 2004, Stephen Pain wrote:
>>
>>>
>>> Here's the patch... still thinking about the Xbox!
>>>
>>> If you could get this in and then include JMSReceiver in the webstart jar it
would be a big help (release notes now say that JMSReceiver is included, but I'm still getting
class not found).
>>>
>>> Cheers,
>>> Stephen
>>>
>>> $ diff JMSReceiver.java.old JMSReceiver.java
>>> 9a10,13
>>>> import java.io.FileInputStream;
>>>> import java.util.Hashtable;
>>>> import java.util.Properties;
>>>>
>>> 55a60
>>>>   protected String jndiPath;
>>> 57a63
>>>>   private String providerUrl;
>>> 62c68
>>> <     String _userId, String _password) {
>>> ---
>>>>     String _userId, String _password, String _jndiPath) {
>>> 67a74
>>>>       jndiPath = _jndiPath;
>>> 127a135,151
>>>>       * Sets the path to a properties file containing
>>>>       * the initial context and jndi provider url
>>>>       */
>>>>   public void setJndiPath(String _jndiPath) {
>>>>        jndiPath = _jndiPath;
>>>>    }
>>>>
>>>>    /**
>>>>       * Gets the path to a properties file containing
>>>>       * the initial context and jndi provider url
>>>>       */
>>>>    public String getJndiPath() {
>>>>        return jndiPath;
>>>>    }
>>>>
>>>>
>>>>   /**
>>> 168,169c192,204
>>> <
>>> <         Context ctx = new InitialContext();
>>> ---
>>>>
>>>>               Context ctx = null;
>>>>               if (jndiPath == null || jndiPath.equals("")) {
>>>>                       ctx = new InitialContext();
>>>>               } else {
>>>>                       Properties p = new Properties();
>>>>                       p.load(new FileInputStream(jndiPath));
>>>>                       ctx = new InitialContext(p);
>>>>               }
>>>>
>>>>               // give some more flexibility about the choice of a tab name
>>>>               providerUrl = (String)ctx.getEnvironment().get(Context.PROVIDER_URL);
>>>>
>>> 193a229
>>>>
>>> 235a272
>>>>               event.setProperty("log4j.jmsProviderUrl", providerUrl);
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>                      Paul Smith
>>>                      <psmith@minotaur.        To:       Stephen Pain/DMGGM/DMG
UK/DeuBa@DMG UK
>>>                      apache.org>              cc:
>>>                                               Subject:  RE: JMSReceiver - chainsaw
>>>                      07/06/2004 02:29
>>>
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> If Rallisport Challenge 2 is really that good, maybe I should join the log4j-dev
list and submit a patch myself.   Or go & buy an Xbox :)
>>>
>>> You should buy an XBox.... AND submit a patch... :)
>>>
>>> Still getting my head around this new job, so this week might be a real
>>> right-off.
>>>
>>> I'll let you know my progress, whenever that happens.
>>>
>>> Paul
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution
of the material in this e-mail is strictly forbidden.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>>
>>
>>
>>
>> --
>>
>> This e-mail may contain confidential and/or privileged information. If you are not
the intended recipient (or have received this e-mail in error) please notify the sender immediately
and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>
>
>
>
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender immediately
and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message