Java 类org.apache.catalina.realm.JDBCRealm 实例源码

项目:lazycat    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent
 *            MBean Name of the associated parent component
 *
 * @exception Exception
 *                if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, String connectionName, String connectionPassword,
        String connectionURL) throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }

}
项目:tomcat7    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent MBean Name of the associated parent component
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, 
    String connectionName, String connectionPassword, String connectionURL)
    throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }   

}
项目:lams    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent MBean Name of the associated parent component
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, 
    String connectionName, String connectionPassword, String connectionURL)
    throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }   

}
项目:apache-tomcat-7.0.73-with-comment    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent MBean Name of the associated parent component
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, 
    String connectionName, String connectionPassword, String connectionURL)
    throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }   

}
项目:class-guard    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent MBean Name of the associated parent component
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, 
    String connectionName, String connectionPassword, String connectionURL)
    throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }   

}
项目:apache-tomcat-7.0.57    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent MBean Name of the associated parent component
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, 
    String connectionName, String connectionPassword, String connectionURL)
    throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }   

}
项目:apache-tomcat-7.0.57    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent MBean Name of the associated parent component
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, 
    String connectionName, String connectionPassword, String connectionURL)
    throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }   

}
项目:WBSAirback    文件:MBeanFactory.java   
/**
 * Create a new JDBC Realm.
 *
 * @param parent MBean Name of the associated parent component
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public String createJDBCRealm(String parent, String driverName, 
    String connectionName, String connectionPassword, String connectionURL)
    throws Exception {

    // Create a new JDBCRealm instance
    JDBCRealm realm = new JDBCRealm();
    realm.setDriverName(driverName);
    realm.setConnectionName(connectionName);
    realm.setConnectionPassword(connectionPassword);
    realm.setConnectionURL(connectionURL);

    // Add the new instance to its parent component
    ObjectName pname = new ObjectName(parent);
    ContainerBase containerBase = getParentContainerFromParent(pname);
    // Add the new instance to its parent component
    containerBase.setRealm(realm);
    // Return the corresponding MBean name
    ObjectName oname = realm.getObjectName();

    if (oname != null) {
        return (oname.toString());
    } else {
        return null;
    }   

}