aspose file tools
The moose likes JBoss and the fly likes JMSAppender and jboss. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "JMSAppender and jboss." Watch "JMSAppender and jboss." New topic
Author

JMSAppender and jboss.

Indira Koncur
Greenhorn

Joined: Dec 26, 2007
Posts: 8
This is my question, I have the following setup in the jboss-log4j.xml on a Jboss server:

<appender name="JMS" class="org.apache.log4j.net.JMSAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="InitialContextFactoryName" value="org.jnp.interfaces.NamingContextFactory"/>
<param name="URLPkgPrefixes" value="org.jboss.naming"/>
<param name="ProviderURL" value="jnp://myhost.mydomain.com:1099"/>
<param name="Threshold" value="DEBUG"/>
<param name="TopicConnectionFactoryBindingName" value="ConnectionFactory"/>
<param name="TopicBindingName" value="topic/testTopic"/>
</appender>


Now, when I bring up this jboss server, not neccessarily will the myhost.mydomain.com be listening on port 1099. There are times where it could be down. However, if this myhost.mydomain.com is down, then my jboss server will fail to deploy correctly reporting a " javax.naming.CommunicationException: Failed to connect to server myhost.mydomain.com:1099[Root exception is java.net.ConnectException: Connection refused]]

How can I make it so that when my jboss server is starting up, and when it comes accross the JMS entry above in the jboss-log4j, it ignores it until that server myhost.mydomain.com:1099 is up? Any ideas?
Indira Koncur
Greenhorn

Joined: Dec 26, 2007
Posts: 8
Nobody's got a clue?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8143
    
  52

How can I make it so that when my jboss server is starting up, and when it comes accross the JMS entry above in the jboss-log4j, it ignores it until that server myhost.mydomain.com:1099 is up?


You probably will have to write your own custom appender for such a behaviour.


[My Blog] [JavaRanch Journal]
Indira Koncur
Greenhorn

Joined: Dec 26, 2007
Posts: 8
Dear Jaikiran Pai,

I appreciate your response. I definitely want to look further into your suggestion. I am just afraid I have never explored writing custom appenders in jboss. Can you provide me with an example or some kind of link where I can look further into this?

Thanks so much.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JMSAppender and jboss.
 
Similar Threads
Syslog with Jboss
log4j.xml for app log.
Configuring JMSAppender in JBoss
Issue in using the DatabaseServerLoginModule for encrypting the password using MD5
Jboss final start up message not comes up in console