[JBoss-dev] CVS update: jbossmq/src/main/org/jboss/mq/server QueueManager.java TopicManager.java
User: user57 Date: 02/02/12 23:51:54 Modified:src/main/org/jboss/mq/server QueueManager.java TopicManager.java Log: o Implemented JNDI unbind during stop(), still needs more work to finish the stop impls Revision ChangesPath 1.13 +70 -62jbossmq/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.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- QueueManager.java 13 Feb 2002 00:15:01 - 1.12 +++ QueueManager.java 13 Feb 2002 07:51:54 - 1.13 @@ -4,6 +4,7 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ + package org.jboss.mq.server; import java.util.HashMap; @@ -28,12 +29,12 @@ 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 Hiram Chirino - * @version$Revision: 1.12 $ + * @version$Revision: 1.13 $ */ public class QueueManager extends ServiceMBeanSupport @@ -43,33 +44,17 @@ SpyQueue queue; String queueName; String jndiName; - boolean jndiBound = false; + boolean jndiBound; private ObjectName jbossMQService; - /** -* Gets the Name attribute of the QueueManager object -* -* @returnThe Name value -*/ - public String getName() - { - return "JBossMQQueue"; - } - - /** -* Insert the method's description here. Creation date: (7/1/2001 11:30:33 -* AM) -* -* @returnjava.lang.String -*/ public String getQueueName() { return queueName; } /** -* Gets the QueueDepth attribute of the QueueManager object +* Gets the QueueDepth attribute of the QueueManager object * * @returnThe QueueDepth value * @exception Exception Description of Exception @@ -81,6 +66,7 @@ /** * Get the value of JBossMQService. +* * @return value of JBossMQService. */ public ObjectName getJBossMQService() @@ -90,6 +76,7 @@ /** * Set the value of JBossMQService. +* * @param v Value to assign to JBossMQService. */ public void setJBossMQService(ObjectName jbossMQService) @@ -97,48 +84,56 @@ this.jbossMQService = jbossMQService; } - /** -* #Description of the Method -* -* @exception Exception Description of Exception -*/ - public void startService() throws Exception + protected void startService() throws Exception { if (queueName == null || queueName.length() == 0) { - throw new Exception("QueueName was not set"); + throw new IllegalStateException("QueueName was not set"); } - JMSServer server = (JMSServer)getServer().invoke(jbossMQService, "getJMSServer", new Object[]{}, new String[]{}); + JMSServer jmsServer = (JMSServer) + server.invoke(jbossMQService, + "getJMSServer", + new Object[0], + new String[0]); queue = new SpyQueue(queueName); - destination = new JMSQueue(queue, null, server); - + destination = new JMSQueue(queue, null, jmsServer); -// server.addDestination(queue, destination); - - try { - server.addDestination(queue, destination); + jmsServer.addDestination(queue, destination); + jmsServer.getPersistenceManager().restoreQueue(destination, queue); - //server.getPersistenceManager().initQueue(destination); - server.getPersistenceManager().restoreQueue(destination, queue); - if (jndiName == null) - setJNDIName("queue/"+queueName); - else - setJNDIName(jndiName); //in config phase, all we did was store the name, and not actually bind + if (jndiName == null) { + setJNDIName("queue/" + queueName); } - catch (JMSException e) { - log.warn("Couldn't add queue", e); + else { + // in config phase, all we did was store the name, and not actually bind + setJNDIName(jndiName); } - } - protected void stopService() - { - log.warn("queue stop not yet implemented"); + protected void stopService() throws Exception + { + // unbind from JNDI + if (jndiBound) { + InitialContext ctx = new InitialContext();
[JBoss-dev] CVS update: jbossmq/src/main/org/jboss/mq/server QueueManager.java TopicManager.java
User: user57 Date: 02/02/12 16:15:01 Modified:src/main/org/jboss/mq/server QueueManager.java TopicManager.java Log: o Changed logger cat seperator to '.' for consistency. I don't like it really, but I figure that if debugging a problem one would look at the full log file, so this is just for some confirmation that things are working o Changed error to warn for stopService(), as there isn't anything to really do about this at the moment. o Unmasking a rethrown exception Revision ChangesPath 1.12 +6 -4 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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- QueueManager.java 11 Feb 2002 22:45:28 - 1.11 +++ QueueManager.java 13 Feb 2002 00:15:01 - 1.12 @@ -33,7 +33,7 @@ * * @author Norbert Lataille ([EMAIL PROTECTED]) * @author Hiram Chirino - * @version$Revision: 1.11 $ + * @version$Revision: 1.12 $ */ public class QueueManager extends ServiceMBeanSupport @@ -127,13 +127,15 @@ else setJNDIName(jndiName); //in config phase, all we did was store the name, and not actually bind } - catch (JMSException e) {log.warn("Couldn't add queue "+e.getMessage());} + catch (JMSException e) { + log.warn("Couldn't add queue", e); + } } protected void stopService() { - log.error("queue stop not yet implemented"); + log.warn("queue stop not yet implemented"); } protected ObjectName getObjectName(MBeanServer server, ObjectName name) throws javax.management.MalformedObjectNameException @@ -145,7 +147,7 @@ } // re-setup the logger with a more descriptive name - log = Logger.getLogger(getClass().getName() + ":" + queueName); + log = Logger.getLogger(getClass().getName() + "." + queueName); return name; } 1.13 +8 -5 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.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- TopicManager.java 11 Feb 2002 22:45:28 - 1.12 +++ TopicManager.java 13 Feb 2002 00:15:01 - 1.13 @@ -36,7 +36,7 @@ * * @author Norbert Lataille ([EMAIL PROTECTED]) * @author Hiram Chirino -* @version$Revision: 1.12 $ +* @version$Revision: 1.13 $ */ public class TopicManager extends ServiceMBeanSupport @@ -129,7 +129,9 @@ else setJNDIName(jndiName); //In config phase, we only stored the name, and didn't actually bind it } - catch (JMSException e) {log.warn("Couldn't add topic "+e.getMessage());} + catch (JMSException e) { + log.warn("Couldn't add topic", e); + } } @@ -137,10 +139,11 @@ { // FIXME marcf: implement the removal of the service // The behavior to be fixed is a "rebuild the server, it hot deploys, destination exists" - log.error("queue stop not yet implemented"); + log.warn("queue stop not yet implemented"); } - protected ObjectName getObjectName(MBeanServer server, ObjectName name) throws javax.management.MalformedObjectNameException + protected ObjectName getObjectName(MBeanServer server, ObjectName name) + throws javax.management.MalformedObjectNameException { topicName = name.getKeyProperty("name"); if (topicName == null || topicName.length() == 0) @@ -149,7 +152,7 @@ } // re-setup the logger with a more descriptive name - log = Logger.getLogger(getClass().getName() + ":" + topicName); + log = Logger.getLogger(getClass().getName() + "." + topicName); return name; } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmq/src/main/org/jboss/mq/server QueueManager.java
User: lqd Date: 02/01/31 05:14:42 Modified:src/main/org/jboss/mq/server Tag: Branch_2_4 QueueManager.java Log: - re-setup logger to use the Queue's name in logging output Revision ChangesPath No revision No revision 1.2.2.2 +43 -16jbossmq/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.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- QueueManager.java 2001/08/23 03:57:12 1.2.2.1 +++ QueueManager.java 2002/01/31 13:14:41 1.2.2.2 @@ -21,6 +21,7 @@ import org.jboss.mq.*; import org.jboss.util.ServiceMBeanSupport; +import org.jboss.logging.Logger; /** * This class is a message queue which is stored (hashed by Destination) on the @@ -29,36 +30,43 @@ * @author Norbert Lataille ([EMAIL PROTECTED]) * @author Hiram Chirino ([EMAIL PROTECTED]) * @createdAugust 16, 2001 - * @version$Revision: 1.2.2.1 $ + * @version$Revision: 1.2.2.2 $ */ -public class QueueManager extends org.jboss.util.ServiceMBeanSupport implements QueueManagerMBean { +public class QueueManager + extends org.jboss.util.ServiceMBeanSupport + implements QueueManagerMBean +{ JMSQueue destination; SpyQueue queue; String queueName; - public String getName() { + public String getName() + { return "JBossMQQueue"; } /** -* Insert the method's description here. Creation date: (7/1/2001 11:30:33 -* AM) +* Get the name of the Queue * * @returnjava.lang.String */ - public java.lang.String getQueueName() { + public java.lang.String getQueueName() + { return queueName; } public int getQueueDepth() - throws Exception { + throws Exception + { return destination.queue.messages.size(); } public void initService() - throws Exception { + throws Exception + { - if ( queueName == null || queueName.length() == 0 ) { + if ( queueName == null || queueName.length() == 0 ) + { throw new Exception( "QueueName was not set" ); } @@ -67,20 +75,30 @@ queue = new SpyQueue( queueName ); destination = new JMSQueue( queue, null, server ); - server.addDestination( queue, destination ); + try + { + server.addDestination( queue, destination ); + // server.getPersistenceManager().restoreQueue( destination, queue ); + } catch ( JMSException e ) + { + log.warn( "Couldn't add queue: " + e.getMessage() ); + } - } + } public void startService() - throws Exception { + throws Exception + { //Get an InitialContext InitialContext ctx = new InitialContext(); javax.naming.Context subctx; - try { + try + { subctx = ( javax.naming.Context )ctx.lookup( "queue" ); - } catch ( javax.naming.NamingException e ) { + } catch ( javax.naming.NamingException e ) + { subctx = ctx.createSubcontext( "queue" ); } subctx.rebind( queueName, queue ); @@ -88,11 +106,20 @@ } protected ObjectName getObjectName( MBeanServer server, ObjectName name ) - throws javax.management.MalformedObjectNameException { + throws javax.management.MalformedObjectNameException + { queueName = name.getKeyProperty( "name" ); - if ( queueName == null || queueName.length() == 0 ) { + if ( queueName == null || queueName.length() == 0 ) + { throw new MalformedObjectNameException( "Property 'name' not provided" ); } + + // re-setup the logger with a more descriptive name + log = Logger.getLogger(getClass().getName() + "#" + queueName); + return name; } } +/* +vim:tabstop=3:expandtab:shiftwidth=3 +*/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbossmq/src/main/org/jboss/mq/server QueueManager.java TopicManager.java
User: mnf999 Date: 02/01/20 07:09:48 Modified:src/main/org/jboss/mq/server QueueManager.java TopicManager.java Log: Be more quiet on existing topics, print a warn Revision ChangesPath 1.9 +10 -2 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.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- QueueManager.java 2001/12/09 07:31:39 1.8 +++ QueueManager.java 2002/01/20 15:09:47 1.9 @@ -29,7 +29,7 @@ * * @author Norbert Lataille ([EMAIL PROTECTED]) * @author Hiram Chirino - * @version$Revision: 1.8 $ + * @version$Revision: 1.9 $ */ public class QueueManager extends ServiceMBeanSupport @@ -110,13 +110,21 @@ queue = new SpyQueue(queueName); destination = new JMSQueue(queue, null, server); - server.addDestination(queue, destination); + +// server.addDestination(queue, destination); + + try { + server.addDestination(queue, destination); + //server.getPersistenceManager().initQueue(destination); server.getPersistenceManager().restoreQueue(destination, queue); if (jndiName == null) setJNDIName("queue/"+queueName); else setJNDIName(jndiName); //in config phase, all we did was store the name, and not actually bind + } + catch (JMSException e) {log.warn("Couldn't add queue "+e.getMessage());} + } protected void stopService() 1.9 +78 -69jbossmq/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.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- TopicManager.java 2001/12/09 07:31:39 1.8 +++ TopicManager.java 2002/01/20 15:09:48 1.9 @@ -1,9 +1,9 @@ /* - * JBoss, the OpenSource J2EE webOS - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ +* JBoss, the OpenSource J2EE webOS +* +* Distributable under LGPL license. +* See terms of license at gnu.org. +*/ package org.jboss.mq.server; import java.util.Collection; @@ -24,106 +24,115 @@ import org.jboss.logging.Logger; /** - * This class is a message queue which is stored (hashed by Destination) on the - * JMS provider - * - * @author Norbert Lataille ([EMAIL PROTECTED]) - * @author Hiram Chirino - * @version$Revision: 1.8 $ - */ +* This class is a message queue which is stored (hashed by Destination) on the +* JMS provider +* +* @author Norbert Lataille ([EMAIL PROTECTED]) +* @author Hiram Chirino +* @version$Revision: 1.9 $ +*/ public class TopicManager - extends ServiceMBeanSupport - implements TopicManagerMBean, MBeanRegistration +extends ServiceMBeanSupport +implements TopicManagerMBean, MBeanRegistration { - + JMSTopic destination; SpyTopic topic; String topicName; String jndiName; boolean jndiBound = false; private ObjectName jbossMQService; - + /** -* Gets the Name attribute of the TopicManager object -* -* @returnThe Name value -*/ + * Gets the Name attribute of the TopicManager object + * + * @returnThe Name value + */ public String getName() { return "JBossMQTopic"; } - + /** -* Insert the method's description here. Creation date: (7/1/2001 11:27:22 -* AM) -* -* @returnjava.lang.String -*/ + * Insert the method's description here. Creation date: (7/1/2001 11:27:22 + * AM) + * + * @returnjava.lang.String + */ public String getTopicName() { return topicName; } - + /** -* Get the value of JBossMQService. -* @return value of JBossMQService. -*/ + * Get the value of JBossMQService. + * @return value of JBossMQService. + */ public ObjectName getJBossMQService() { return jbossMQService; } /** -* Set the value of JBossMQService. -* @param v Value to assign to JBossMQService. -*/ + * Set the value of JBossMQService. + * @param v Value to assign to JBossMQService. + */ public void setJBossMQService(ObjectName jbossMQService) { this.jbossMQService = jbossMQService; } - + /** -* #Description of the Method -* -* @exception Exception Description of Exception -*/ + * #Descr
[JBoss-dev] CVS update: jbossmq/src/main/org/jboss/mq/server QueueManager.java TopicManager.java
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 ChangesPath 1.8 +16 -12jbossmq/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 Hiram Chirino - * @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 @@ * * @returnjava.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 Hiram Chirino - * @version$Revision: 1.7 $ + * @version$Revision: 1.8 $ */ public class TopicManager extends ServiceMBeanSupport @@ -60,7 +59,7 @@ * * @returnjava.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(get
[JBoss-dev] CVS update: jbossmq/src/main/org/jboss/mq/server QueueManager.java QueueManagerMBean.java TopicManager.java TopicManagerMBean.java
User: dbudworth Date: 01/11/29 15:10:09 Modified:src/main/org/jboss/mq/server QueueManager.java QueueManagerMBean.java TopicManager.java TopicManagerMBean.java Log: Added JNDI name property. Defaults to [topic|queue]/[topicname|queuename] It doesn't enforce topics or queues to be listed under topic/* | queue/*, so that may need to be changed (I don't know if that's a requirement, but testing seemed to work out ok). Revision ChangesPath 1.7 +39 -14jbossmq/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.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- QueueManager.java 2001/11/28 00:55:29 1.6 +++ QueueManager.java 2001/11/29 23:10:09 1.7 @@ -29,13 +29,16 @@ * * @author Norbert Lataille ([EMAIL PROTECTED]) * @author Hiram Chirino - * @version$Revision: 1.6 $ + * @version$Revision: 1.7 $ */ public class QueueManager extends ServiceMBeanSupport implements QueueManagerMBean { JMSQueue destination; SpyQueue queue; String queueName; + String jndiName; + boolean jndiBound = false; + private ObjectName jbossMQService; /** @@ -111,19 +114,10 @@ server.addDestination(queue, destination); //server.getPersistenceManager().initQueue(destination); server.getPersistenceManager().restoreQueue(destination, queue); - //Get an InitialContext - InitialContext ctx = new InitialContext(); - javax.naming.Context subctx; - try - { - subctx = (javax.naming.Context)ctx.lookup("queue"); - } - catch (javax.naming.NamingException e) - { - subctx = ctx.createSubcontext("queue"); - } - Util.rebind(subctx,queueName,queue); - + if (jndiName == null) + setJNDIName("queue/"+queueName); + else + setJNDIName(jndiName); //in config phase, all we did was store the name, and not actually bind } protected void stopService() @@ -139,5 +133,36 @@ throw new MalformedObjectNameException("Property 'name' not provided"); } return name; + } + + /** +* Sets the JNDI name for this queue +* @param name Name to bind this queue to in the JNDI tree +*/ + public synchronized void setJNDIName(String name) throws Exception{ + if (queue == null){ //nothing to bind yet, startService will recall us + jndiName = name; + return; + } + if (name == null) + throw new InvalidAttributeValueException("Queue JNDI names can't be null"); + InitialContext ic = new InitialContext(); + if (jndiName != null && jndiBound){ + Util.unbind(ic,jndiName); //Remove old jndi name + jndiName = null; + jndiBound = false; + } + Util.rebind(ic,name,queue); + jndiName = name; + jndiBound = true; + log.info("Bound queue '"+queueName+"' to JNDI name '"+jndiName+"'"); + } + + /** +* Gets the JNDI name use by this queue +* @return The JNDI name currently in use +*/ + public String getJNDIName(){ + return jndiName; } } 1.6 +13 -1 jbossmq/src/main/org/jboss/mq/server/QueueManagerMBean.java Index: QueueManagerMBean.java === RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/server/QueueManagerMBean.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- QueueManagerMBean.java2001/11/10 21:38:05 1.5 +++ QueueManagerMBean.java2001/11/29 23:10:09 1.6 @@ -15,7 +15,7 @@ * @author Hiram Chirino * @author mailto:[EMAIL PROTECTED]";>david jencks * @see - * @version$Revision: 1.5 $ + * @version$Revision: 1.6 $ */ public interface QueueManagerMBean extends ServiceMBean @@ -46,4 +46,16 @@ * @param v Value to assign to JBossMQService. */ void setJBossMQService(ObjectName jbossMQService); + + /** +* Sets the JNDI name for this queue +* @param name Name to bind this queue to in the JNDI tree +*/ + void setJNDIName(String name) throws Exception; + + /** +* Gets the JNDI name use by this queue +* @return The JNDI name currently in use +*/ + String getJNDIName(); } 1.7 +40 -13jbossmq/src/main/org/jboss/mq/server/TopicManager.java Index: TopicManager.java === RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/server/TopicManager
[JBoss-dev] CVS update: jbossmq/src/main/org/jboss/mq/server QueueManager.java TopicManager.java
User: dbudworth Date: 01/11/27 16:55:29 Modified:src/main/org/jboss/mq/server QueueManager.java TopicManager.java Log: Added support for deep topic and queue names Passes run-basic-testsuite, so if something is broken the test needs updating. TopicManager/QueueManager, uses org.jboss.naming.Util to auto-create subcontexts PersistenceManager/MessageLog updated to support deep subdirectories in db/jbossmq/file Revision ChangesPath 1.6 +4 -2 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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- QueueManager.java 2001/11/10 21:38:05 1.5 +++ QueueManager.java 2001/11/28 00:55:29 1.6 @@ -21,13 +21,15 @@ import org.jboss.mq.*; import org.jboss.system.ServiceMBeanSupport; +import org.jboss.naming.Util; + /** * This class is a message queue which is stored (hashed by Destination) on the * JMS provider * * @author Norbert Lataille ([EMAIL PROTECTED]) * @author Hiram Chirino - * @version$Revision: 1.5 $ + * @version$Revision: 1.6 $ */ public class QueueManager extends ServiceMBeanSupport implements QueueManagerMBean { @@ -120,7 +122,7 @@ { subctx = ctx.createSubcontext("queue"); } - subctx.rebind(queueName, queue); + Util.rebind(subctx,queueName,queue); } 1.6 +3 -3 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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TopicManager.java 2001/11/10 21:38:05 1.5 +++ TopicManager.java 2001/11/28 00:55:29 1.6 @@ -22,6 +22,7 @@ import org.jboss.mq.*; import org.jboss.system.ServiceMBeanSupport; import org.jboss.mq.DurableSubcriptionID;//Typo!!! +import org.jboss.naming.Util; /** * This class is a message queue which is stored (hashed by Destination) on the @@ -29,7 +30,7 @@ * * @author Norbert Lataille ([EMAIL PROTECTED]) * @author Hiram Chirino - * @version$Revision: 1.5 $ + * @version$Revision: 1.6 $ */ public class TopicManager extends ServiceMBeanSupport @@ -124,8 +125,7 @@ { subctx = ctx.createSubcontext("topic"); } - subctx.rebind(topicName, topic); - + Util.rebind(subctx,topicName,topic); } protected void stopService() ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development