Examples of JDBCConnectionFactory


Examples of org.apache.openejb.resource.jdbc.JdbcConnectionFactory

                for (Binding binding : Collections.list(bindings)) {
                    Object value = binding.getObject();
                    if (value instanceof ConnectorReference) {
                        Object connectionFactory = ((ConnectorReference)value).getObject();
                        if (connectionFactory instanceof JdbcConnectionFactory) {
                            JdbcConnectionFactory jdbc = (JdbcConnectionFactory) connectionFactory;
                            String path = getPath(jdbc);
                            if (path != null) {
                                if (dbIndex > 9) {
                                    throw new ServiceException("Hsql Server can only host 10 database connections");
                                }
View Full Code Here

Examples of org.apache.openejb.resource.jdbc.JdbcConnectionFactory

                    res.setResponseCode(ResponseCodes.JNDI_CONTEXT);
                    return;
                } else if (object == null) {
                    throw new NullPointerException("lookup of '"+name+"' returned null");
                } else if (object instanceof JdbcConnectionFactory){
                    JdbcConnectionFactory cf = (JdbcConnectionFactory) object;
                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getJdbcDriver(), cf.getJdbcUrl(), cf.getDefaultUserName(), cf.getDefaultPassword());
                    res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                    res.setResult(dataSourceMetaData);
                    return;
                } else if (object instanceof ConnectionFactory){
                    res.setResponseCode(ResponseCodes.JNDI_RESOURCE);
View Full Code Here

Examples of org.uengine.util.dao.JDBCConnectionFactory

  }
 
  public static void main(String args[]) throws Exception{
    DefinitionSynchronizer ds = new DefinitionSynchronizer();
   
    JDBCConnectionFactory srcConnFactory = new JDBCConnectionFactory();{
      srcConnFactory.setConnectionString    ("jdbc:oracle:thin:@10.10.8.6:1521:orcl");
      srcConnFactory.setDriverClass      ("oracle.jdbc.OracleDriver");
      srcConnFactory.setUserId        ("eagles_ep");
      srcConnFactory.setPassword        ("eagles_ep_dba");
    }
   
    JDBCConnectionFactory targetConnFactory = new JDBCConnectionFactory();{
      targetConnFactory.setConnectionString  ("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.9.219)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.9.220)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=epdb)))");
      targetConnFactory.setDriverClass    ("oracle.jdbc.OracleDriver");
      targetConnFactory.setUserId        ("eagles_ep");
      targetConnFactory.setPassword      ("eagles_ep_dba");
    }
   
    System.out.println("uEngine Process Definition Synchronizer\n");
    System.out.println(". SOURCE database server info: \n" + srcConnFactory);
    System.out.println(". TARGET database server info: \n" + targetConnFactory);
View Full Code Here

Examples of org.uengine.util.dao.JDBCConnectionFactory

      InitialContext ctx = new InitialContext();
      ds = (javax.sql.DataSource) ctx.lookup(jndiName);
     
    } else if (this.getConnectionFactory().getClass() == JDBCConnectionFactory.class) {
     
      JDBCConnectionFactory cf = (JDBCConnectionFactory) this.getConnectionFactory();
      BasicDataSource bds = new BasicDataSource();
      bds.setDriverClassName(cf.getDriverClass());
      bds.setUrl(cf.getConnectionString());
      bds.setUsername(cf.getUserId());
      bds.setPassword(cf.getPassword());
      ds = bds;
     
    }
   
    String actualSqlStatement = evaluateContent(instance, this.getSqlStatement()).toString().trim();
View Full Code Here

Examples of proj.zoie.dataprovider.jdbc.JDBCConnectionFactory

         if (senseiAdaptor==null){
           throw new ConfigurationException("adaptor not found: " + adaptor);
         }


       JDBCConnectionFactory connFactory = new JDBCConnectionFactory() {


       private Connection _conn = null;

       @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.