• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Log4j - JMSAppender - ActiveMQ - JNDI

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I've been using log4j for a little while with common appenders like RollingFileAppender, ConsoleAppender etc... But one of the requirement of my new project is to use the JMSAppender... Oh and I'm kind of new to Java, have been doing Java only for the past 5 months.
So as a fresh java developer trying to setup JMSAppender to talk to a local instance of ActiveMQ has proved to be quite challenging. To top it all I keep reading about JNDI, which event though I kinda understand what it does, I'm not sure how that fits in this architecture.

The setup I need to have that to work on for now is my local dev box with Tomcat for the web app part that will use the JMSAppender to log messages to the ActiveMQ local server. I don't really know yet how to code the dequeuing part, but since I can't even seem to have a correct configuration going for simply queueing messages, I think I'll cross that bridge when I get there.

So far here is what I have in the log4j.xml concerning the JMSAppender:



I'm not exactly sure what the parameters InitialContextFactoryName, QueueBindingName and QueueConnectionFactoryBindingName should be... the values associated with those parameters are inspired by some very simple examples I've found online.

Anyone who has already done that could help me, or point me to the right direction by any chance?

Thank you,
Yann
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic