User: user57
Date: 01/12/08 23:31:39
Modified: src/main/org/jboss/mq/server QueueManager.java
TopicManager.java
Log:
o use more descriptive name for logging category
Revision Changes Path
1.8 +16 -12 jbossmq/src/main/org/jboss/mq/server/QueueManager.java
Index: QueueManager.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/server/QueueManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- QueueManager.java 2001/11/29 23:10:09 1.7
+++ QueueManager.java 2001/12/09 07:31:39 1.8
@@ -5,14 +5,14 @@
* See terms of license at gnu.org.
*/
package org.jboss.mq.server;
+
import java.util.HashMap;
import java.util.Hashtable;
-
import java.util.Iterator;
import java.util.LinkedList;
import java.util.TreeSet;
-import javax.jms.DeliveryMode;
+import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.management.*;
@@ -20,18 +20,20 @@
import org.jboss.mq.*;
import org.jboss.system.ServiceMBeanSupport;
-
import org.jboss.naming.Util;
+import org.jboss.logging.Logger;
/**
- * This class is a message queue which is stored (hashed by Destination) on the
- * JMS provider
+ * This class is a message queue which is stored (hashed by Destination)
+ * on the JMS provider
*
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Hiram Chirino</a>
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*/
-public class QueueManager extends ServiceMBeanSupport implements QueueManagerMBean
+public class QueueManager
+ extends ServiceMBeanSupport
+ implements QueueManagerMBean
{
JMSQueue destination;
SpyQueue queue;
@@ -57,7 +59,7 @@
*
* @return java.lang.String
*/
- public java.lang.String getQueueName()
+ public String getQueueName()
{
return queueName;
}
@@ -90,8 +92,6 @@
{
this.jbossMQService = jbossMQService;
}
-
-
/**
* #Description of the Method
@@ -100,7 +100,6 @@
*/
public void startService() throws Exception
{
-
if (queueName == null || queueName.length() == 0)
{
throw new Exception("QueueName was not set");
@@ -132,6 +131,10 @@
{
throw new MalformedObjectNameException("Property 'name' not provided");
}
+
+ // re-setup the logger with a more descriptive name
+ log = Logger.getLogger(getClass().getName() + "#" + queueName);
+
return name;
}
@@ -155,7 +158,8 @@
Util.rebind(ic,name,queue);
jndiName = name;
jndiBound = true;
- log.info("Bound queue '"+queueName+"' to JNDI name '"+jndiName+"'");
+
+ log.info("Bound to JNDI name: " + jndiName);
}
/**
1.8 +8 -8 jbossmq/src/main/org/jboss/mq/server/TopicManager.java
Index: TopicManager.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/server/TopicManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TopicManager.java 2001/11/29 23:10:09 1.7
+++ TopicManager.java 2001/12/09 07:31:39 1.8
@@ -6,8 +6,6 @@
*/
package org.jboss.mq.server;
-
-
import java.util.Collection;
import java.util.HashMap;
import java.util.Hashtable;
@@ -23,6 +21,7 @@
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.mq.DurableSubcriptionID;//Typo!!!
import org.jboss.naming.Util;
+import org.jboss.logging.Logger;
/**
* This class is a message queue which is stored (hashed by Destination) on the
@@ -30,7 +29,7 @@
*
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Hiram Chirino</a>
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*/
public class TopicManager
extends ServiceMBeanSupport
@@ -60,7 +59,7 @@
*
* @return java.lang.String
*/
- public java.lang.String getTopicName()
+ public String getTopicName()
{
return topicName;
}
@@ -82,8 +81,6 @@
{
this.jbossMQService = jbossMQService;
}
-
-
/**
* #Description of the Method
@@ -92,7 +89,6 @@
*/
public void startService() throws Exception
{
-
if (topicName == null || topicName.length() == 0)
{
throw new Exception("TopicName was not set");
@@ -135,6 +131,10 @@
{
throw new MalformedObjectNameException("Property 'name' not provided");
}
+
+ // re-setup the logger with a more descriptive name
+ log = Logger.getLogger(getClass().getName() + "#" + topicName);
+
return name;
}
@@ -158,7 +158,7 @@
Util.rebind(ic,name,topic);
jndiName = name;
jndiBound = true;
- log.info("Bound topic '"+topicName+"' to JNDI name '"+jndiName+"'");
+ log.info("Bound to JNDI name: " + jndiName);
}
/**
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development