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  Changes    Path
  1.7       +63 -63    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.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 <pre>$Revision: 1.6 $</pre>
  + * @version <pre>$Revision: 1.7 $</pre>
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Peter Antman</a>
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Hiram Chirino</a>
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Jason Dillon</a>
  @@ -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.
  +    *
  +    * @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;
  +   }
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to