Package fr.norsys.mapper.console.mapping

Examples of fr.norsys.mapper.console.mapping.Property


  private void fillConnection(Application application, Vector properties) {
    Connection connection = new Connection();
    connection.setId(UIDGenerator.generateId());
    for (Iterator it = properties.iterator(); it.hasNext();) {
      Property property = (Property) it.next();
      if (Context.PROVIDER_URL.equals(property.getKey())) {
        connection.setUrl(getValue(property.getVal(), application
            .getVariables()));
      } else if (Context.SECURITY_PRINCIPAL.equals(property.getKey())) {
        connection.setUser(getValue(property.getVal(), application
            .getVariables()));
      } else if (Context.SECURITY_CREDENTIALS.equals(property.getKey())) {
        connection.setPass(getValue(property.getVal(), application
            .getVariables()));
      } else if ("jndi.connection.pool.minPoolSize".equals(property
          .getKey())) {
        connection.setMinPoolSize(getValue(property.getVal(),
            application.getVariables()));
      } else if ("jndi.connection.pool.maxPoolSize".equals(property
          .getKey())) {
        connection.setMaxPoolSize(getValue(property.getVal(),
            application.getVariables()));
      } else if ("jndi.connection.pool.timeout".equals(property.getKey())) {
        connection.setTimeoutPool(getValue(property.getVal(),
            application.getVariables()));
      } else if ("jndi.connection.name".equals(property.getKey())) {
        connection.setName(getValue(property.getVal(), application
            .getVariables()));
      }
    }
    application.setConnection(connection);
    application.setConnectionName(connection.getName());
View Full Code Here


    Connection connection = application.getConnection();
    mapperConfig.getJndiMapper().getSource().setName(connection.getName());
    Config config = mapperConfig.getJndiMapper().getSource().getConfig();
    config.getProperties().add(
        new Property(Context.INITIAL_CONTEXT_FACTORY,
            "com.sun.jndi.ldap.LdapCtxFactory"));
    config.getProperties().add(
        new Property(Context.PROVIDER_URL, connection.getUrl()));
    config.getProperties().add(
        new Property(Context.SECURITY_PRINCIPAL, connection.getUser()));
    config.getProperties()
        .add(
            new Property(Context.SECURITY_CREDENTIALS, connection
                .getPass()));
    config.getProperties().add(
        new Property("jndi.connection.pool.minPoolSize", connection
            .getMinPoolSize()));
    config.getProperties().add(
        new Property("jndi.connection.pool.maxPoolSize", connection
            .getMaxPoolSize()));
    config.getProperties().add(
        new Property("jndi.connection.pool.timeout", connection
            .getTimeoutPool()));
    config.getProperties().add(
        new Property("jndi.connection.name", connection.getName()));

    mapperConfig.getSubConfig().setName(
        "http://norsys.fr/framework-ldap/jndi-configuration.dtd");
    mapperConfig.getSubConfig().setClasse(
        "fr.norsys.mapper.jndi.JNDIXMLConfigurator");
View Full Code Here

TOP

Related Classes of fr.norsys.mapper.console.mapping.Property

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.