Package org.objectweb.speedo.mapper.rdb

Examples of org.objectweb.speedo.mapper.rdb.JDBCMapperAttributes


      PMapper mapper = (PMapper) component.getFcInterface("mapper");
      mapper.setMapperName(mapperName);
      mapper.setConnectionFactory(cf);

    } else {
      JDBCMapperAttributes jdbcma = (JDBCMapperAttributes) ma;

      //deprecated properties
      strval = getProperty(props, JDO_OPTION_CONNECTION_DRIVER_NAME_OLD, "", true);
      if (strval.length()>0) {
        logger.log(BasicLevel.WARN, LocaleHelper.getSpeedoRB().getString("property")
            + " " + JDO_OPTION_CONNECTION_DRIVER_NAME_OLD
            + LocaleHelper.getSpeedoRB().getString("deprecuse") + JDO_OPTION_CONNECTION_DRIVER_NAME);
        if (getProperty(props, JDO_OPTION_CONNECTION_DRIVER_NAME, null, false) == null) {
                    props.put(JDO_OPTION_CONNECTION_DRIVER_NAME, strval);
        }
      }
      strval = getProperty(props, JDO_OPTION_CONNECTION_DRIVER_NAME_OLD2, "", true);
      if (strval.length()>0) {
        logger.log(BasicLevel.WARN, LocaleHelper.getSpeedoRB().getString("property")
            + " " + JDO_OPTION_CONNECTION_DRIVER_NAME_OLD2
            + LocaleHelper.getSpeedoRB().getString("deprecuse") + JDO_OPTION_CONNECTION_DRIVER_NAME);
        if (getProperty(props, JDO_OPTION_CONNECTION_DRIVER_NAME, null, false) == null) {
                    props.put(JDO_OPTION_CONNECTION_DRIVER_NAME, strval);
        }
      }
      String jdbcDriverCN = getProperty(props, JDO_OPTION_CONNECTION_DRIVER_NAME, null, true);
      String jdbcUser = getProperty(props, JDO_OPTION_CONNECTION_USER_NAME, null, true);
      String jdbcUrl = getProperty(props, JDO_OPTION_CONNECTION_URL, null, true);
      String jdbcPass = getProperty(props, JDO_OPTION_CONNECTION_PASSWORD, null, true);
      logger.log(BasicLevel.INFO, LocaleHelper.getSpeedoRB().getString("jdbcdrv")
          + LocaleHelper.getSpeedoRB().getString("driver") + jdbcDriverCN
          + LocaleHelper.getSpeedoRB().getString("url") + jdbcUrl
          + LocaleHelper.getSpeedoRB().getString("user") + jdbcUser
          + LocaleHelper.getSpeedoRB().getString("mappernm") + mapperName);
      jdbcma.setMapperName(mapperName);
      jdbcma.setDriverClassName(jdbcDriverCN);
      jdbcma.setURL(jdbcUrl);
      jdbcma.setUserName(jdbcUser);
      jdbcma.setPassword(jdbcPass);
      jdbcma.setPoolConnection(true);

      //configure the pool of connection
      configurePool(getSubComponent(speedo, CONNECTION_POOL_PATH),
              "Connection pool: ",
          CONNECTION_POOL_MIN,
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.mapper.rdb.JDBCMapperAttributes

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.