Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Logback: the reliable, generic, fast and flexible logging framework. Copyright (C) 1999-2011, QOS.ch. All rights reserved. This program and the accompanying materials are dual-licensed under either the terms of the Eclipse Public License v1.0 as published by the Eclipse Foundation or (per the licensee's choosing) under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
 
 package ch.qos.logback.core.net;
 
 
 
This class serves as a base class for JMSTopicAppender and JMSQueueAppender For more information about this appender, please refer to: http://logback.qos.ch/manual/appenders.html#JMSAppenderBase

Author(s):
Ceki Gülcü
Sébastien Pennec
 
 public abstract class JMSAppenderBase<E> extends AppenderBase<E> {
 
   protected String securityPrincipalName;
   protected String securityCredentials;
   protected String urlPkgPrefixes;
   protected String providerURL;
   protected String userName;
   protected String password;
   
   
   protected Object lookup(Context ctxString namethrows NamingException {
     try {
       return ctx.lookup(name);
     } catch (NameNotFoundException e) {
       addError("Could not find name [" + name + "].");
       throw e;
     }
   }
 
   public Context buildJNDIContext() throws NamingException {
     Context jndi = null;
 
     // addInfo("Getting initial context.");
     if ( != null) {
       Properties env = buildEnvProperties();
       jndi = new InitialContext(env);
     } else {
       jndi = new InitialContext();
     }
     return jndi;
   }
   
   public Properties buildEnvProperties() {
     Properties env = new Properties();
     if ( != null) {
       env.put(.);
     } else {
       addWarn("You have set InitialContextFactoryName option but not the "
           + "ProviderURL. This is likely to cause problems.");
     }
     if ( != null) {
     }
 
     if ( != null) {
       if ( != null) {
       } else {
         addWarn("You have set SecurityPrincipalName option but not the "
             + "SecurityCredentials. This is likely to cause problems.");
       }
     }
     return env;
   }
  
  
  
  
Returns the value of the InitialContextFactoryName option. See setInitialContextFactoryName(java.lang.String) for more details on the meaning of this option.
  }

  
Setting the InitialContextFactoryName method will cause this JMSAppender instance to use the javax.naming.InitialContext.(java.util.Hashtable) method instead of the no-argument constructor. If you set this option, you should also at least set the ProviderURL option.

See also setProviderURL(java.lang.String).

  public void setInitialContextFactoryName(String initialContextFactoryName) {
    this. = initialContextFactoryName;
  }
  public String getProviderURL() {
    return ;
  }
  public void setProviderURL(String providerURL) {
    this. = providerURL;
  }
  public String getURLPkgPrefixes() {
    return ;
  }
  public void setURLPkgPrefixes(String urlPkgPrefixes) {
    this. = urlPkgPrefixes;
  }
    return ;
  }
  public void setSecurityCredentials(String securityCredentials) {
    this. = securityCredentials;
  }
    return ;
  }
  public void setSecurityPrincipalName(String securityPrincipalName) {
    this. = securityPrincipalName;
  }
  public String getUserName() {
    return ;
  }

  
The user name to use when javax.jms.TopicConnectionFactory#createTopicConnection(String , String ) creating a topic session}. If you set this option, you should also set the Password option. See setPassword(java.lang.String).
  public void setUserName(String userName) {
    this. = userName;
  }
  public String getPassword() {
    return ;
  }

  
The password to use when creating a topic session.
  public void setPassword(String password) {
    this. = password;
  }
  
New to GrepCode? Check out our FAQ X