Package pt.opensoft.dbaccess

Examples of pt.opensoft.dbaccess.DBConnect


        Logger.getDefault().setLevel(Level.DEBUG);
        ResourceManager.init(Logger.getDefault());
        Resource resource = ResourceManager.get(DB_RESOURCE_NAME, DB_RESOURCE_TIMEOUT);

        try {
            DBConnect dbc = ((JDBCResource) resource).getDBConnect();

            FileWriter writer = new FileWriter(fileName);
            loadDbToFlatfile(dbc, tableName, writer);
            writer.close();
        } finally {
View Full Code Here


  }

  protected String process (Resource r1, Resource r2, Object backingBean, FacesRequest request) throws Exception {
    HostProxy proxy = r1 != null ? ((HostProxyResource)r1).getHostProxy() : null;
    if (proxy != null) proxy.setLogger(logger);
    DBConnect dbc = r2 != null ? ((JDBCResource) r2).getDBConnect() : null;
    return process(proxy, dbc, backingBean, request);
  }
View Full Code Here

  protected abstract String process (HostProxy proxy, DBConnect dbc, Object backingBean, FacesRequest request) throws Exception;

  protected String validate (Resource r1, Resource r2, Object backingBean, FacesRequest request) throws Exception{
    HostProxy proxy = ((HostProxyResource)r1).getHostProxy();
    if (proxy != null) proxy.setLogger(logger);
    DBConnect dbc = ((JDBCResource) r2).getDBConnect();
    return validate(proxy, dbc, backingBean, request);
  }
View Full Code Here

  }

  protected Response process (Resource r1, Resource r2, Resource r3, Request request) throws Exception {
    HostProxy proxy = r1 != null ? ((HostProxyResource)r1).getHostProxy() : null;
    if (proxy != null) proxy.setLogger(logger);
    DBConnect dbc1 = r2 != null ? ((JDBCResource) r2).getDBConnect() : null;
    DBConnect dbc2 = r3 != null ? ((JDBCResource) r3).getDBConnect() : null;
   
    return process(proxy, dbc1, dbc2, request);
  }
View Full Code Here

  protected abstract Response process (HostProxy proxy, DBConnect dbc1, DBConnect dbc2, Request request) throws Exception;

  protected InvalidRequest validate (Resource r1, Resource r2, Resource r3, Request request) throws Exception {
    HostProxy proxy = ((HostProxyResource)r1).getHostProxy();
    if (proxy != null) proxy.setLogger(logger);
    DBConnect dbc1 = ((JDBCResource) r2).getDBConnect();
    DBConnect dbc2 = ((JDBCResource) r3).getDBConnect();
    return validate(proxy, dbc1, dbc2, request);
  }
View Full Code Here

  protected abstract InvalidRequest validate (HostProxy proxy, DBConnect dbc1, DBConnect dbc2, Request request) throws Exception;

  protected Response render (Resource r1, Resource r2, Resource r3, Request request, InvalidRequest invalid) throws Exception {
    HostProxy proxy = r1 != null ? ((HostProxyResource)r1).getHostProxy() : null;
    if (proxy != null) proxy.setLogger(logger);
    DBConnect dbc1 = r2 != null ? ((JDBCResource) r2).getDBConnect() : null;
    DBConnect dbc2 = r3 != null ? ((JDBCResource) r3).getDBConnect() : null;
    return render(proxy, dbc1, dbc2, request, invalid);
  }
View Full Code Here

        Record nv = (Record) params;
        logRelease = nv.getBooleanValue("log.release", false);

      try {
        _dbc = new DBConnect(connection);
        _dbc = configDBConnect(_dbc);

            if (_initSql != null) {
              _dbc.executeUpdateString(_initSql);      // sempre que poss�vel, isto deve ser configurado na pool!
              _dbc.rollback();
View Full Code Here

 

  protected void execute (Resource r1, Resource r2, Resource r3) throws Exception {
    HostProxy proxy = ((HostProxyResource)r1).getHostProxy();
    proxy.setLogger(logger);
    DBConnect dbc1 = ((JDBCResource)r2).getDBConnect();
    DBConnect dbc2 = ((JDBCResource)r3).getDBConnect();
    execute(proxy, dbc1, dbc2);
  }
View Full Code Here

    super(name, r1Name, r1Timeout, r2Name, r2Timeout);
  }

  protected void execute (Resource r1, Resource r2) throws Exception {
    DBConnect dbc1 = ((JDBCResource) r1).getDBConnect();
    DBConnect dbc2 = ((JDBCResource) r2).getDBConnect();
    execute(dbc1, dbc2);
  }
View Full Code Here

    protected String getResourceName() {
    return getDBName();
  }

  protected void afectActionWithResource(Resource resource, Logger resourceLogger, ActionWrapper actionWrapper) {
    DBConnect dbc = ((JDBCResource) resource).getDBConnect();
    dbc.setLogger(resourceLogger);
    dbc.setCumulativeTimer(actionWrapper.getCumulativeTimer(getDBName()));
    injectDBConnectionIntoAction(dbc, actionWrapper);
  }
View Full Code Here

TOP

Related Classes of pt.opensoft.dbaccess.DBConnect

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.