You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Stephen Pain <st...@db.com> on 2004/06/08 12:33:19 UTC
RE: JMSReceiver - chainsaw
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
RE: JMSReceiver - chainsaw
Posted by Paul Smith <ps...@apache.org>.
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