[JBoss-dev] CVS update: jboss/src/main/org/jboss/jms/jndi JBossMQProvider.java
User: user57 Date: 01/07/06 17:50:57 Modified:src/main/org/jboss/jms/jndi JBossMQProvider.java Log: o Added some logging, to help track down a loading error. Revision ChangesPath 1.6 +22 -1 jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java Index: JBossMQProvider.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JBossMQProvider.java 2001/06/22 22:41:21 1.5 +++ JBossMQProvider.java 2001/07/07 00:50:57 1.6 @@ -23,13 +23,15 @@ import javax.naming.InitialContext; import javax.naming.NamingException; +import org.apache.log4j.Category; + /** * A JMS provider adapter for JBossMQ. * * Created: Fri Dec 22 09:34:04 2000 * 6/22/01 - hchirino - The queue/topic jndi references are now configed via JMX * - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * @author mailto:[EMAIL PROTECTED]";>Peter Antman * @author mailto:[EMAIL PROTECTED]";>Hiram Chirino * @author mailto:[EMAIL PROTECTED]";>Jason Dillon @@ -49,6 +51,9 @@ private static final String SECURITY_MANAGER = "java.naming.rmi.security.manager"; +/** Instance logger. */ +private transient Category log = Category.getInstance(this.getClass()); + /** Flag to enable JNDI security manager. */ private String hasJndiSecurityManager = "yes"; @@ -57,8 +62,17 @@ */ public JBossMQProvider() { // empty +log.debug("initializing"); } +/** Override of standard de-serialization to re-create logger. */ +private void readObject(java.io.ObjectInputStream in) +throws java.io.IOException, ClassNotFoundException +{ +in.defaultReadObject(); +this.log = Category.getInstance(this.getClass()); +} + /** * Create a new InitialContext suitable for this JMS provider. * @@ -70,6 +84,7 @@ Context ctx = null; if (providerURL == null) { // Use default +log.debug("no provider url; connecting to local JNDI"); ctx = new InitialContext(); // Only for JBoss embedded now } else { // Try another location @@ -79,8 +94,14 @@ props.put(Context.PROVIDER_URL, providerURL); props.put(SECURITY_MANAGER, hasJndiSecurityManager); props.put(Context.URL_PKG_PREFIXES, URL_PKG_PREFIXES); + +log.debug("connecting to remote JNDI with props: " + props); ctx = new InitialContext(props); } + +if (log.isDebugEnabled()) { +log.debug("created context: " + ctx); +} return ctx; } } ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/jms/jndi JBossMQProvider.java
User: user57 Date: 01/07/06 17:59:18 Modified:src/main/org/jboss/jms/jndi JBossMQProvider.java Log: o emacs was tricking me into beliving that this was formatted correctly, but is was not... by far. Revision ChangesPath 1.7 +63 -63jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java Index: JBossMQProvider.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- JBossMQProvider.java 2001/07/07 00:50:57 1.6 +++ JBossMQProvider.java 2001/07/07 00:59:18 1.7 @@ -31,7 +31,7 @@ * Created: Fri Dec 22 09:34:04 2000 * 6/22/01 - hchirino - The queue/topic jndi references are now configed via JMX * - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @author mailto:[EMAIL PROTECTED]";>Peter Antman * @author mailto:[EMAIL PROTECTED]";>Hiram Chirino * @author mailto:[EMAIL PROTECTED]";>Jason Dillon @@ -39,69 +39,69 @@ public class JBossMQProvider extends AbstractJMSProviderAdapter { -/** The initial context factory to use. */ - public static final String INITIAL_CONTEXT_FACTORY = -"org.jnp.interfaces.NamingContextFactory"; - -/** The url package prefixes. */ - public static final String URL_PKG_PREFIXES = -"org.jboss.naming"; - -/** The security manager to use. */ - private static final String SECURITY_MANAGER = -"java.naming.rmi.security.manager"; + /** The initial context factory to use. */ + public static final String INITIAL_CONTEXT_FACTORY = + "org.jnp.interfaces.NamingContextFactory"; + + /** The url package prefixes. */ + public static final String URL_PKG_PREFIXES = + "org.jboss.naming"; + + /** The security manager to use. */ + private static final String SECURITY_MANAGER = + "java.naming.rmi.security.manager"; -/** Instance logger. */ -private transient Category log = Category.getInstance(this.getClass()); + /** Instance logger. */ + private transient Category log = Category.getInstance(this.getClass()); -/** Flag to enable JNDI security manager. */ - private String hasJndiSecurityManager = "yes"; + /** Flag to enable JNDI security manager. */ + private String hasJndiSecurityManager = "yes"; -/** - * Default no-argument constructor. - */ - public JBossMQProvider() { -// empty -log.debug("initializing"); - } - -/** Override of standard de-serialization to re-create logger. */ -private void readObject(java.io.ObjectInputStream in) -throws java.io.IOException, ClassNotFoundException -{ -in.defaultReadObject(); -this.log = Category.getInstance(this.getClass()); -} - -/** - * Create a new InitialContext suitable for this JMS provider. - * - * @return An InitialContext suitable for this JMS provider. - * - * @throws NamingException Failed to construct context. - */ - public Context getInitialContext() throws NamingException { - Context ctx = null; - if (providerURL == null) { - // Use default -log.debug("no provider url; connecting to local JNDI"); - ctx = new InitialContext(); // Only for JBoss embedded now - } else { - // Try another location - Hashtable props = new Hashtable(); - props.put(Context.INITIAL_CONTEXT_FACTORY, - INITIAL_CONTEXT_FACTORY); - props.put(Context.PROVIDER_URL, providerURL); - props.put(SECURITY_MANAGER, hasJndiSecurityManager); - props.put(Context.URL_PKG_PREFIXES, URL_PKG_PREFIXES); - -log.debug("connecting to remote JNDI with props: " + props); - ctx = new InitialContext(props); - } - -if (log.isDebugEnabled()) { -log.debug("created context: " + ctx); -} - return ctx; - } + /** +* Default no-argument constructor. +*/ + public JBossMQProvider() { + // empty + log.debug("initializing"); + } + + /** Override of standard de-serialization to re-create logger. */ + private void readObject(java.io.ObjectInputStream in) + throws java.io.IOException, ClassNotFoundException + { + in.defaultReadObject(); + this.log = Category.getInstance(this.getClass()); + } + + /** +* Create a new InitialContext suitable for this JMS provider. +* +* @return An InitialContext suitable for this JMS provider. +* +* @
[JBoss-dev] CVS update: jboss/src/main/org/jboss/jms/jndi JBossMQProvider.java JMSProviderLoader.java
User: ejort Date: 02/01/05 04:08:53 Modified:src/main/org/jboss/jms/jndi JBossMQProvider.java JMSProviderLoader.java Log: Guarded debug logging Revision ChangesPath 1.8 +7 -4 jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java Index: JBossMQProvider.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JBossMQProvider.java 2001/07/07 00:59:18 1.7 +++ JBossMQProvider.java 2002/01/05 12:08:53 1.8 @@ -31,7 +31,7 @@ * Created: Fri Dec 22 09:34:04 2000 * 6/22/01 - hchirino - The queue/topic jndi references are now configed via JMX * - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * @author mailto:[EMAIL PROTECTED]";>Peter Antman * @author mailto:[EMAIL PROTECTED]";>Hiram Chirino * @author mailto:[EMAIL PROTECTED]";>Jason Dillon @@ -82,9 +82,11 @@ */ public Context getInitialContext() throws NamingException { Context ctx = null; + boolean debug = log.isDebugEnabled(); if (providerURL == null) { // Use default - log.debug("no provider url; connecting to local JNDI"); + if (debug) +log.debug("no provider url; connecting to local JNDI"); ctx = new InitialContext(); // Only for JBoss embedded now } else { // Try another location @@ -95,11 +97,12 @@ props.put(SECURITY_MANAGER, hasJndiSecurityManager); props.put(Context.URL_PKG_PREFIXES, URL_PKG_PREFIXES); - log.debug("connecting to remote JNDI with props: " + props); + if (debug) +log.debug("connecting to remote JNDI with props: " + props); ctx = new InitialContext(props); } - if (log.isDebugEnabled()) { + if (debug) { log.debug("created context: " + ctx); } return ctx; 1.8 +4 -3 jboss/src/main/org/jboss/jms/jndi/JMSProviderLoader.java Index: JMSProviderLoader.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jms/jndi/JMSProviderLoader.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JMSProviderLoader.java2001/11/12 06:52:17 1.7 +++ JMSProviderLoader.java2002/01/05 12:08:53 1.8 @@ -40,7 +40,7 @@ * * @author mailto:[EMAIL PROTECTED]";>Hiram Chirino * @author mailto:[EMAIL PROTECTED]";>Jason Dillon - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ public class JMSProviderLoader extends ServiceMBeanSupport @@ -173,8 +173,9 @@ private void bind(Context ctx, String name, Object val) throws NamingException { - log.debug("attempting to bind " + val + " to " + name); - + if (log.isDebugEnabled()) + log.debug("attempting to bind " + val + " to " + name); + // Bind val to name in ctx, and make sure that all // intermediate contexts exist Name n = ctx.getNameParser("").parse(name); ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/jms/jndi JBossMQProvider.java JMSProviderLoader.java
User: ejort Date: 02/01/12 13:14:29 Modified:src/main/org/jboss/jms/jndi JBossMQProvider.java JMSProviderLoader.java Log: Remove directory reference to log4j Category in preparation for log4j 1.2 Revision ChangesPath 1.9 +6 -6 jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java Index: JBossMQProvider.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jms/jndi/JBossMQProvider.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- JBossMQProvider.java 2002/01/05 12:08:53 1.8 +++ JBossMQProvider.java 2002/01/12 21:14:29 1.9 @@ -23,7 +23,7 @@ import javax.naming.InitialContext; import javax.naming.NamingException; -import org.apache.log4j.Category; +import org.jboss.logging.Logger; /** * A JMS provider adapter for JBossMQ. @@ -31,12 +31,12 @@ * Created: Fri Dec 22 09:34:04 2000 * 6/22/01 - hchirino - The queue/topic jndi references are now configed via JMX * - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @author mailto:[EMAIL PROTECTED]";>Peter Antman * @author mailto:[EMAIL PROTECTED]";>Hiram Chirino * @author mailto:[EMAIL PROTECTED]";>Jason Dillon */ -public class JBossMQProvider +public class JBossMQProvider extends AbstractJMSProviderAdapter { /** The initial context factory to use. */ @@ -52,8 +52,8 @@ "java.naming.rmi.security.manager"; /** Instance logger. */ - private transient Category log = Category.getInstance(this.getClass()); - + private transient Logger log = Logger.getLogger(this.getClass()); + /** Flag to enable JNDI security manager. */ private String hasJndiSecurityManager = "yes"; @@ -70,7 +70,7 @@ throws java.io.IOException, ClassNotFoundException { in.defaultReadObject(); - this.log = Category.getInstance(this.getClass()); + this.log = Logger.getLogger(this.getClass()); } /** 1.9 +6 -11 jboss/src/main/org/jboss/jms/jndi/JMSProviderLoader.java Index: JMSProviderLoader.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jms/jndi/JMSProviderLoader.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- JMSProviderLoader.java2002/01/05 12:08:53 1.8 +++ JMSProviderLoader.java2002/01/12 21:14:29 1.9 @@ -5,12 +5,12 @@ * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -26,8 +26,6 @@ import javax.naming.NamingException; import javax.naming.NameNotFoundException; -import org.apache.log4j.Category; - import org.jboss.configuration.ConfigurationException; import org.jboss.system.ServiceMBeanSupport; @@ -35,20 +33,17 @@ * A JMX service to load a JMSProviderAdapter and register it. * * Created: Wed Nov 29 14:07:07 2000 - * + * * 6/22/01 - hchirino - The queue/topic jndi references are now configed via JMX * * @author mailto:[EMAIL PROTECTED]";>Hiram Chirino * @author mailto:[EMAIL PROTECTED]";>Jason Dillon - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ */ -public class JMSProviderLoader +public class JMSProviderLoader extends ServiceMBeanSupport - implements JMSProviderLoaderMBean + implements JMSProviderLoaderMBean { - /** Instance logger. */ - private final Category log = Category.getInstance(this.getClass()); - /** The provider adapter which we are loading. */ protected JMSProviderAdapter providerAdapter; ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development