Pls help about Rollback and Connection Pooling

Hello Friends.
I have some problems abount Rollback & ConnectionPooling.
If connection pooling is possible with rollback facility??????
I am giving my code below so pls guide me- i am using MySql and J2EE 1.3.
try
/*          Setting auto commit off          */
con.setAutoCommit(false);
affectedRow = myStatement.executeUpdate(String qury1);
affectedRow = myStatement.executeUpdate(String qury2);
affectedRow = myStatement.executeUpdate(String qury3);
con.commit();
}catch(SQLException sqle){
                    try{
                         con.rollback();
                    }catch(Exception e){e.printStackTrace();}
}finally {
     saveFlg=false;
     try {
          if(myStatement!=null)
          myStatement.close();
     }catch(Exception e){e.printStackTrace();}
}// finally block complete...
/* Sample Code Ends*/
Thanks in advance and Happy New Year

If connection pooling is possible with rollback facility??????Should be, sure. What problem do you have with it?
I know very little about MySQL, but I understand it is somewhat "special". Do you have a version of MySQL that has transaction support? Check the MySQL docs: is there some configuration you need to do to enable transactions?

Similar Messages

  • A very surprise problem about JDBC and connection pool

    I occur a very problem about JDBC and connection pool on Weblogic Platform
    8.1.
    There is a table in Oracle
    Table
    Name: t1
    id varchar2(5);
    content clob;
    id is primary key.
    If I use a connection pool to connect to Oracle,like following program:
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
    con = ds.getConnection();
    then following program will throw a ClassCastException
    String sql = "select content from t1 where id = ?";
    PreparedStatement pst = con.prepareStatement(sql);
    pst.setString(1,"001");
    oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
    statement will throw ClassCastException
    but if I use JNDI to connect to Oracle,like following program, then those
    program above is ok
    private String dbdriver="oracle.jdbc.driver.OracleDriver";
    private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
    private String username="ep";
    private String password="epuser";
    Class.forName(dbdriver);
    conn = DriverManager.getConnection(dburl, username, password);
    conn.setAutoCommit(false);
    On the contrary, if I use JNDI to connect to Oracle, following program will
    throw ClassCastException
    weblogic.jdbc.vendor.oracle.OracleThinClob clob =
    (weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
    but it is fine if I use connection pool to connect to Oracle.
    I am confused this problem, who can tell me why?
    Daniel

    When you are getting connection using datasource lookup from weblogic
    connection pool, this connection is internally wrapped and hence you have to
    cast it to weblogic.jdbc.vendor.oracle.OracleThinClob which you do and so it
    works.
    But when you get connection by loading driver straight, you are getting naked
    oracle connection. In this case when you cast it to oracle.sql.Clob it works,
    as you have seen in your test case.
    I hope this explains what is going on with your code.
    Thanks,
    Mitesh
    Daniel wrote:
    I occur a very problem about JDBC and connection pool on Weblogic Platform
    8.1.
    There is a table in Oracle
    Table
    Name: t1
    id varchar2(5);
    content clob;
    id is primary key.
    If I use a connection pool to connect to Oracle,like following program:
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
    con = ds.getConnection();
    then following program will throw a ClassCastException
    String sql = "select content from t1 where id = ?";
    PreparedStatement pst = con.prepareStatement(sql);
    pst.setString(1,"001");
    oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
    statement will throw ClassCastException
    but if I use JNDI to connect to Oracle,like following program, then those
    program above is ok
    private String dbdriver="oracle.jdbc.driver.OracleDriver";
    private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
    private String username="ep";
    private String password="epuser";
    Class.forName(dbdriver);
    conn = DriverManager.getConnection(dburl, username, password);
    conn.setAutoCommit(false);
    On the contrary, if I use JNDI to connect to Oracle, following program will
    throw ClassCastException
    weblogic.jdbc.vendor.oracle.OracleThinClob clob =
    (weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
    but it is fine if I use connection pool to connect to Oracle.
    I am confused this problem, who can tell me why?
    Daniel

  • Need Help in installations and connecting displays. Please!

    Hello Everyone,
    Need Help in installations and connecting displays. Please!
    Im planning on installing in a cafe shop : (Store Self improvement)
    4 TV's (can be  Built in Wi-Fi) Store menus
    2 touch screen tablets.  To be use as Emenu (digital Menu)
    1 60' TV ( Built in Wi-Fi) as Entrainment displays and in store advertising
    What do I need to organize my project and make it looks cool and how to manageand controll all of the displays TV.

    TNSTAAFL
    I DO NOT work for Best Buy, Geek Squad and any way affiliated with them. I am a self-employed repairman. I specialize in TV's and desktop computers. I do not take sides. If BB is wrong I will say so. If you are a moron with a false sense of entitlement, then I will tell you.

  • [Fwd: Re: rdbms realm and connection pool]

    Hi,
    One reason why I would like to use the connection pool for the RDBMS
    realm is because there is the retry machanism built into the connection
    pool. With this retry, I don't need to re-start WebLogic if the DB
    server is somehow re-started. With the current implementation, all the
    connections maintained by the realm will become invalid if the DB server
    has been restarted independently.
    -------- Original Message --------
    Subject: Re: rdbms realm and connection pool
    Date: Wed, 27 Sep 2000 09:32:47 +0100
    From: "Terry" <[email protected]>
    Reply-To: "Terry" <[email protected]>
    Organization: BEA SYSTEMS Inc
    Newsgroups: weblogic.developer.interest.security
    References: <[email protected]>
    I believe not- the realm restricts access to connection pools to those
    who
    are allowed it, so if the realm needs the connection pool to start up,
    and
    you can't open the connection pool without the realm then you have a bit
    of
    a no-chicken and no-egg situation, which is I believe one of the reasons
    why
    there is no use of connection pools, ejbs, jndi, servlets etc. in the
    realm
    (along with other reasons, like why would it be provided with a servlet)
    The delegate pool acts somewhat similarly to a connection pool, and can
    even
    use the same database, so I'm not sure what the advantage would be
    Terry
    Nirmala devi <[email protected]> wrote in message
    news:[email protected]..
    >
    I think the rdbms realm uses different connection as it need to be setbefore
    the connection pool for Database.Is there any that i can point my rdbmsrealm to use
    the connection pool for Database instead
    Thanks in advance
    Nirmala

    I believe not- the realm restricts access to connection pools to those who
    are allowed it, so if the realm needs the connection pool to start up, and
    you can't open the connection pool without the realm then you have a bit of
    a no-chicken and no-egg situation, which is I believe one of the reasons why
    there is no use of connection pools, ejbs, jndi, servlets etc. in the realm
    (along with other reasons, like why would it be provided with a servlet)
    The delegate pool acts somewhat similarly to a connection pool, and can even
    use the same database, so I'm not sure what the advantage would be
    Terry
    Nirmala devi <[email protected]> wrote in message
    news:[email protected]..
    >
    I think the rdbms realm uses different connection as it need to be setbefore
    the connection pool for Database.Is there any that i can point my rdbmsrealm to use
    the connection pool for Database instead
    Thanks in advance
    Nirmala

  • Pls Help! Drag and Drop problem, identical symbols acting differently - same code! WHY?

    In the attached file, I have a series of symbols that have a drag and drop command to change colour at different sections of a bullseye, and that are also text editable (html).
    However, some of the symbols get stuck and will not be moved after moving once or at all, and some get stuck once their text has been edited.
    I have poured over the code and it appears to be the same for each symbol - can anyone explain as to why this is happening?
    I also cannot now edit the text properly on the ipad (it is really fiddly to change between different symbols to edit their text -- is there maybe a better way to do this? A button to change between symbols to then edit their text, can you help with this too?)
    THANK YOU SO MUCH!!!
    File here:
    https://www.dropbox.com/s/g71gnfichjgyehn/NEW%20RISK%20RADAR.zip

    Hi, I think I undertsand what you mean now, so the code is as below, btu I am not sure what a handler is? but some of my risks still get stuck once the text has been changed on them:
    // Use for loop for attr
    // deleted  yepnope since you load with scropt loading
    // added pos for each symbol so we can replace them there.
    document.ontouchmove = function(e) {
            e.preventDefault();
    var risk = ;
    var Pos = [
    {'x':-9,'y':806},
    {'x':27,'y':854},
    {'x':72,'y':894},
    {'x':71,'y':934},
    {'x':231,'y':811},
    {'x':231,'y':853},
    {'x':231,'y':894},
    {'x':231,'y':934},
    {'x':388,'y':811},
    {'x':388,'y':852},
    {'x':388,'y':893},
    {'x':388,'y':934},
    {'x':543,'y':811},
    {'x':543,'y':853},
    {'x':543,'y':893},
    {'x':543,'y':934}
    var myText = ; 
    for (i=0;i<risk.length;i++){
    sym.getSymbol(risk[i]).$(risk[i]).attr("contenteditable",true);
    sym.$('Quadrant_text').attr("contenteditable",true);
    sym.$('Quadrant1_text').attr("contenteditable",true);
    sym.$('Quadrant2_text').attr("contenteditable",true);
    sym.$('Quadrant3_text').attr("contenteditable",true);
    // apply the draggable JQuery UI plugin to the MyDraggableSymbol symbol on your stage
    sym.$('Risk1').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk1").stop("Initial");
      sym.setVariable("symName","Risk1");
    //adding for risk3_orange similarly add for other symbols
    sym.$('Risk1').draggable();
    sym.getSymbol('Risk1').$("Risk1").bind('click tap',function(ev) {
         sym.$('Risk1').draggable('disable');
    }).unbind('dblclick tap',function(ev) {
         sym.$('Risk1').draggable('enable');
    sym.$('Risk2').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk2").stop("Initial");
      sym.setVariable("symName","Risk2");
    //adding for Risk2 similarly add for other symbols
    sym.$('Risk2').draggable();
    sym.getSymbol('Risk2').$("Risk2").bind('click tap',function(ev) {
         sym.$('Risk2').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk2').draggable('enable');
    sym.$('Risk3').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk3").stop("Initial");
      sym.setVariable("symName","Risk3");
    //adding for Risk3 similarly add for other symbols
    sym.$('Risk3').draggable();
    sym.getSymbol('Risk3').$("Risk3").bind('click tap',function(ev) {
         sym.$('Risk3').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk3').draggable('enable');
    sym.$('Risk4').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk4").stop("Initial");
      sym.setVariable("symName","Risk4");
    //adding for Risk4 similarly add for other symbols
    sym.$('Risk4').draggable();
    sym.getSymbol('Risk4').$("Risk4").bind('click tap',function(ev) {
         sym.$('Risk4').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk4').draggable('enable');
    sym.$('Risk5').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk5").stop("Initial");
      sym.setVariable("symName","Risk5");
    //adding for Risk5 similarly add for other symbols
    sym.$('Risk5').draggable();
    sym.getSymbol('Risk5').$("Risk5").bind('click tap',function(ev) {
         sym.$('Risk5').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk5').draggable('enable');
    sym.$('Risk6').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk6").stop("Initial");
      sym.setVariable("symName","Risk6");
    //adding for Risk6 similarly add for other symbols
    sym.$('Risk6').draggable();
    sym.getSymbol('Risk6').$("Risk6").bind('click tap',function(ev) {
         sym.$('Risk6').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk6').draggable('enable');
    sym.$('Risk7').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk7").stop("Initial");
      sym.setVariable("symName","Risk7");
    //adding for Risk7 similarly add for other symbols
    sym.$('Risk7').draggable();
    sym.getSymbol('Risk7').$("Risk7").bind('click tap',function(ev) {
         sym.$('Risk7').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk7').draggable('enable');
    sym.$('Risk8').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk8").stop("Initial");
      sym.setVariable("symName","Risk8");
    //adding for Risk8 similarly add for other symbols
    sym.$('Risk8').draggable();
    sym.getSymbol('Risk8').$("Risk8").bind('click tap',function(ev) {
         sym.$('Risk8').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk8').draggable('enable');
    sym.$('Risk9').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk9").stop("Initial");
      sym.setVariable("symName","Risk9");
    //adding for Risk9 similarly add for other symbols
    sym.$('Risk9').draggable();
    sym.getSymbol('Risk9').$("Risk9").bind('click tap',function(ev) {
         sym.$('Risk9').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk9').draggable('enable');
    sym.$('Risk10').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk10").stop("Initial");
      sym.setVariable("symName","Risk10");
    //adding for Risk10 similarly add for other symbols
    sym.$('Risk10').draggable();
    sym.getSymbol('Risk10').$("Risk10").bind('click tap',function(ev) {
         sym.$('Risk10').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk10').draggable('enable');
    sym.$('Risk11').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk11").stop("Initial");
      sym.setVariable("symName","Risk11");
    //adding for Risk11 similarly add for other symbols
    sym.$('Risk11').draggable();
    sym.getSymbol('Risk11').$("Risk11").bind('click tap',function(ev) {
         sym.$('Risk11').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk11').draggable('enable');
    sym.$('Risk12').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk12").stop("Initial");
      sym.setVariable("symName","Risk12");
    //adding for Risk12 similarly add for other symbols
    sym.$('Risk12').draggable();
    sym.getSymbol('Risk12').$("Risk12").bind('click tap',function(ev) {
         sym.$('Risk12').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk12').draggable('enable');
    sym.$('Risk13').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk13").stop("Initial");
      sym.setVariable("symName","Risk13");
    //adding for Risk13 similarly add for other symbols
    sym.$('Risk13').draggable();
    sym.getSymbol('Risk13').$("Risk13").bind('click tap',function(ev) {
         sym.$('Risk13').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk13').draggable('enable');
    sym.$('Risk14').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk14").stop("Initial");
      sym.setVariable("symName","Risk14");
    //adding for Risk14 similarly add for other symbols
    sym.$('Risk14').draggable();
    sym.getSymbol('Risk14').$("Risk14").bind('click tap',function(ev) {
         sym.$('Risk14').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk14').draggable('enable');
    sym.$('Risk15').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk15").stop("Initial");
      sym.setVariable("symName","Risk15");
    //adding for Risk15 similarly add for other symbols
    sym.$('Risk15').draggable();
    sym.getSymbol('Risk15').$("Risk15").bind('click tap',function(ev) {
         sym.$('Risk15').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk15').draggable('enable');
    sym.$('Risk16').draggable(,
    drag: function(e,ui)
      sym.getSymbol("Risk16").stop("Initial");
      sym.setVariable("symName","Risk16");
    //adding for Risk16 similarly add for other symbols
    sym.$('Risk16').draggable();
    sym.getSymbol('Risk16').$("Risk16").bind('click tap',function(ev) {
         sym.$('Risk16').draggable('disable');
    }).bind('dblclick tap',function(ev) {
         sym.$('Risk16').draggable('enable');
    sym.getSymbol("Drop").$('Outer').droppable(
    sym.getSymbol("Drop").$('Middle').droppable(
    sym.getSymbol("Drop").$('Target').droppable(
    sym.$('resetBtn').click(function(){
      sym.$('Quadrant_text').html('Quadrant');
      sym.$('Quadrant1_text').html('Quadrant');
      sym.$('Quadrant2_text').html('Quadrant');
      sym.$('Quadrant3_text').html('Quadrant');
    for (i=0;i<risk.length;i++){
      sym.$(risk[i]).css({"left":Pos[i].x,"top":Pos[i].y,"position":"absolute"})
      sym.getSymbol(risk[i]).stop(0);
      sym.getSymbol(risk[i]).$(risk[i]).html("Challenge");
    But is still doesn't work,
    Subject: Re:  Pls Help! Drag and Drop problem, identical symbols acting differently - same code! WHY?

  • Difference between Datasource and Connection Pool

    Hi,
    What is the major difference between Datasource and Connection Pool.
    Both the Datasource with JNDI and Connectio Pool will serve the pool of connections. Then what is the difference.
    regards,
    Raj

    A datasource is not implicitly a connection pool. You can configure that in the datasource properties. A connection pool is also not implicitly a datasource. You can create your own connection pool using the java.sql interfaces. A datasource just gives the ability to acquire the connections and access the database through JNDI. A connection pool just gives the ability to reuse a set of connections which are created/closed/controlled by the connection pool logic.

  • HT1766 i couldn't play my ipad as there is a window pop-out telling that my ipad hasn't been backed up in 2 weeks. Backups happen when this ipad is pluggud in, locked and connected to Wifi. Pls help to repair and solve this problem

    there is a window pop-out telling me that 'the ipad hasn't been backed up in 2 weeks. Backups happen when this ipad is plugged in, locked and connected to wifi". How to repair or solve this problem? I have tried to plug in the ipad into my laptop, but i cound not solve this problem too. Pls help.
    Thank you.
    Regards,
    Yong

    Do a device reset as outlined below. This will clear the message and allow you to use your device again.
    Device Reset (won't affect settings/data/music/apps/etc)
    1. Press and hold (& continue to hold) BOTH the Sleep/Wake button & the Home button.
    2. Continue to hold BOTH (ignoring any other messages that may show) until you see the Apple logo on the screen.
    3. Release BOTH buttons when you see the Apple logo and allow the device to boot normally.

  • Oracle: slow performance with SELECT using ojdbc14 and connection pooling

    Hello,
    i'm working hard the last days to solve a performance problem with our customer using a oracle 10g database. For testing I used our oracle 9.2.0.1.0 database which shows the same symptoms. All doing solved nothing: the performance while using this oracle is much slower than other databases. This result I cannot trust and so I need some advice. What is missing to improve the performance on the java side?
    The webapplication I use runs fast on MySQL 4.x and SQLServer 2000, but on the above mentioned Oracle it was always 4 times slower. The webapplication uses a lot of simple SELECT-Statements without complicated joins and so on (because it should run on many different databases). Doing some days of creating tests within this webapplication, I was not able to find any entrance point for a change. All databases server I'm using, having only the default configurations after a common installation.
    To reduce the complexity I wrote a simple java application with connection pooling using only the latest libraries from apache-commons(dbcp, pool), and the latest ojdbc14 for oracle 9.2.
    First the results than the code: MySQL needed less than 1000 millisecond, SQLServer around 1000 milliseconds and Oracle over 2000 milliseconds. I stopped pooling and the results are for Oracle even worse: over 18000 milliseconds (mysql:2500, sqlserver:4100).
    I changed the classes for Oracle and used the class oracle.jdbc.pool.OracleConnectionCacheImpl from the ojdbc14-library. No difference (around 100 milliseconds more or less).
    The only Select-Statement works on this table, which has one index on HICTGID.
    It contains 259 entrances.:
    CREATE TABLE HIERARCHYCATEGORY (
      HICTGID                 NUMBER (19)   NOT NULL,
      HICTGLEVEL              NUMBER (10)   NOT NULL,
      HICTGEXTID              NUMBER (19)   NOT NULL,
      HICTGEXTPARENTID        NUMBER (19)   NOT NULL,
      HICTGNAME               VARCHAR2(255) NOT NULL
    );The application simply loops through this table using
    SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?, but I always open a connection before this query and closes this connection afterwards. So I use the pooling as much as possible. That's all SQL I'm using.
        protected static DataSource setupDataSource(String sDriver, String sUrl, String sUser, String sPwd) throws SQLException {
            BasicDataSource ds = new BasicDataSource();
            ds.setDriverClassName(sDriver);
            ds.setUsername(sUser);
            ds.setPassword(sPwd);
            ds.setUrl(sUrl);
            // The maximum number of active connections:
            ds.setMaxActive(3);
            // The maximum number of active connections that can remain idle in the pool,
            // without extra ones being released, or zero for no limit:
            ds.setMaxIdle(3);
            // The maximum number of milliseconds that the pool will wait (when there are no available connections)
            // for a connection to be returned before throwing an exception, or -1 to wait indefinitely:
            ds.setMaxWait(3000);    
            return ds;
        }I can switch by using external properties between three databases (oracle, mysql and sqlserver) and if I want I can switch pooling off. And all actions I'm interested are logged by Log4J.
        public static Connection getConnection() throws SQLException {
            Connection result = null;
            String sJdbcDriver = m_oJbProp.getString("jdbcDriver");
            String sJdbcUrl = m_oJbProp.getString("databaseConnection");
            String sJdbcUser = m_oJbProp.getString("dbUsername");
            String sJdbcPwd = m_oJbProp.getString("dbPassword");
                try {
                    if (m_oJbProp.getString("useConnectionPooling").equals("true")) {
                         if (log.isDebugEnabled()) {
                              log.debug("ConnectionPooling true");
                        if(null == m_ds) {
                            m_ds = setupDataSource(sJdbcDriver,sJdbcUrl,sJdbcUser,sJdbcPwd);
                              if (log.isDebugEnabled()) {
                                   log.debug("DataSource created");
                        result = m_ds.getConnection();
                    } else {
                        // No connection pooling:
                         if (log.isDebugEnabled()) {
                              log.debug("ConnectionPooling false");
                        try {
                            Class.forName(sJdbcDriver);
                            result = DriverManager.getConnection(sJdbcUrl, sJdbcUser, sJdbcPwd);
                        } catch (ClassNotFoundException cnf) {
                            log.error("Exception: Class Not Found. ", cnf);
                            System.exit(0);
    (.. ErrorHandling ...)Here is the code fragment which is doing the work:
                     StringBuffer sb = new StringBuffer();
                while (lNextBottom <= lNextCeiling) {
                     con = getConnection();
                     innerSelStmt = con.prepareStatement("SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?");
                     innerSelStmt.setLong(1, lNextBottom);
                     rsInner = innerSelStmt.executeQuery();
                     if ((rsInner != null) && (rsInner.next())) {
                         sb.append(rsInner.getLong(1) + ", " + rsInner.getString(2) + "\r");
                          if (log.isDebugEnabled()) {
                               log.debug("Inner Statement: " + rsInner.getLong(1) + "\r");
                     rsInner.close();
                     con.close();
                     lNextBottom++;
                 if (log.isInfoEnabled()) {
                      log.info("\rResult values: Hictgid, Hictgname \r");
                      log.info(sb.toString());
                 }and the main method:
        public static void main(String[] args) {
            try {
                 long lStartTime = System.currentTimeMillis();
                 JdbcBasic oJb = new JdbcBasic();
                 boolean bSuccess = false;
                 bSuccess = oJb.getHierarchycategories();
                 if (log.isInfoEnabled()) {
                      log.info("Running time: " + (System.currentTimeMillis() - lStartTime));
                 if (null != m_ds) {
                     printDataSourceStats(m_ds);
                      shutdownDataSource(m_ds);
                      if (log.isInfoEnabled()) {
                           log.info("Datasource closed.");
             } catch (SQLException sqe) {
                  log.error("SQLException within  main-method", sqe);
        }My database values are
    databaseConnection=jdbc:oracle:thin:@SERVERDB:1521:ora
    jdbcDriver=oracle.jdbc.driver.OracleDriver
    databaseConnection=jdbc:jtds:sqlserver://SERVERDB:1433/testdb
    jdbcDriver=net.sourceforge.jtds.jdbc.Driver
    databaseConnection=jdbc:mysql://localhost/testdb
    jdbcDriver=com.mysql.jdbc.Driver
    dbUsername=testusr
    dbPassword=testpwdThanks for your reading and maybe for your help.

    A few comments.
    There is of course another difference between your test cases then just the database. There is also the driver. And I suspect that in at least the case with the jtds driver it is helping you along where you are doing something silly and the Oracle driver is not.
    Before I explain the next part I would say the speed differences between MS-SQL and MySQL look about right I think you are aiming here for MS-SQL level performance not MySQL. (For a bunch of reasons MySQL is inherently faster but there are MANY drawbacks as well which have been well discussed on previous threads)
    Here is where I believe your problem lies
    while (lNextBottom <= lNextCeiling) {
                     con = getConnection();
                     innerSelStmt = con.prepareStatement("SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?");
                     innerSelStmt.setLong(1, lNextBottom);
                     rsInner = innerSelStmt.executeQuery();
                     if ((rsInner != null) && (rsInner.next())) {
                         sb.append(rsInner.getLong(1) + ", " + rsInner.getString(2) + "\r");
                          if (log.isDebugEnabled()) {
                               log.debug("Inner Statement: " + rsInner.getLong(1) + "\r");
                     rsInner.close();
                     con.close();
                     lNextBottom++;
                 }There at least four things that are wrong with above.
    1) Why are you preparing the statement INSIDE the loop. Let us for a moment say that the loop will spin 100 times. That means that you are preparing the same statement 100 times. This is bad. It is also very relevant because for example the Jtds driver is going to be caching the prepared statements you make so that actually while you try and prepare it 100 times it only actually does it once... but in Oracle I don't know what it is doing for sure but if it is preparing on each pass well than that bit of it is going take 100 times longer then it should.
    2) You are opening and closing the connection on each pass through the loop... also a terrible idea. You need to fix this first so that you can repeatedly use the same prepared statement.
    3) Why are you looping in the first place? More on this later.
    4) Where do you close the PreparedStatement? It doesn't look like you do.
    Okay so for starters your loop should look a lot more like this...
    code]
    con = getConnection();
    innerSelStmt = con.prepareStatement("SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID = ?");
    while (lNextBottom <= lNextCeiling) {
    innerSelStmt.setLong(1, lNextBottom);
    rsInner = innerSelStmt.executeQuery();
    if ((rsInner != null) && (rsInner.next())) {
    sb.append(rsInner.getLong(1) + ", " + rsInner.getString(2) + "\r");
    rsInner.close();
    lNextBottom++;
    innerSelStmt.close();
    con.close();
    I think the code above (and you can put your debug stuff back if you want) which uses ONE connection and ONE prepared Statement will improve your performance dramatically.
    The other question though I would as is why in the hell you are doing 100 or whatever number of queries anyway. This can be done all in ONE query which again will improve performance.
    Your query and such should look like this I think.
    String sql = "SELECT Hictgid, Hictgname FROM HIERARCHYCATEGORY WHERE HICTGID >=? AND HICTGID<=?";
    PreparedStatement ps = conn.prepareStatement(sql);
    ps.setLong(1,lNextBottom );
    ps.setLong(2,lNextCeiling);
    ResultSet rs = ps.executeQuery();
    while(rs.next()){
      // your appending to string buffer code goes here
    }and I can't understand why you're not doing that in the first place.

  • Connection Caching and Connection pooling

    Hi,
    I have question its about a concept which has been introduced by oracle called as connection caching (not sure if its a accepted in other app servers). I had a look at it and it is similar to wht a connection pool does. So can anyone out there explain me wht is the actual difference between these ?
    Thanks!

    i would ignore the idea all together, unlessyour
    connection has state or something, here readthis:
    http://nikhilb020875.wordpress.com/2006/05/24/cache-vs
    -pool/Hard to say for sure but I would guess your response
    is meaningless. It certainly isn't clear to me why
    you think that link is relevant.if you had read the first 2 lines from the page..I read the entire link.

  • Help!!!  Connection Pool for DB2 problem !!

    I created a DB2 connection pool in the weblogic.properties, but when
    weblogic server starting, I got the following error message:
    Thursday August 24 14:26:47 CST 2000:<E> <WebLogicServer> Failed to invoke
    startup class
    weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.Jdbc
    Startup
    java.security.AccessControlException: access denied (java.sql.SQLPermission
    setLog)
    at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java
    :272)
    at
    java.security.AccessController.checkPermission(AccessController.java:399)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.sql.DriverManager.setLogStream(DriverManager.java:397)
    at weblogic.jdbc.common.internal.JdbcInfo.initLog(JdbcInfo.java:66)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:187)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:109)
    at
    weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    I don't know how to solve it, and if I use Console to create a Connection
    pool, I can successful create it...........please help me !!! I have checked
    the weblogic.policy file, but I can not find any problem........
    the configuration in the weblogic.properties as below:
    weblogic.jdbc.connectionPool.ForumPool=\
    url=jdbc:db2:forum,\
    driver=COM.ibm.db2.jdbc.app.DB2Driver,\
    loginDelaySecs=1,\
    initialCapacity=2,\
    maxCapacity=10,\
    capacityIncrement=1,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=10,\
    testTable=administrator.user,\
    props=user=db2admin;password=db2admin
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.ForumPool=everyone
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.JtsForumDS=ForumPool
    weblogic.jdbc.DataSource.NonJtsForumDS=ForumPool

    You may want to try the JDBC newsgroup.
    Michael Girdley
    BEA Systems Inc
    "DataL" <[email protected]> wrote in message news:[email protected]...
    I created a DB2 connection pool in the weblogic.properties, but when
    weblogic server starting, I got the following error message:
    Thursday August 24 14:26:47 CST 2000:<E> <WebLogicServer> Failed to invoke
    startup class
    weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.Jdbc
    Startup
    java.security.AccessControlException: access denied(java.sql.SQLPermission
    setLog)
    at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java
    :272)
    at
    java.security.AccessController.checkPermission(AccessController.java:399)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.sql.DriverManager.setLogStream(DriverManager.java:397)
    at weblogic.jdbc.common.internal.JdbcInfo.initLog(JdbcInfo.java:66)
    at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:187)
    at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:109)
    at
    weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    I don't know how to solve it, and if I use Console to create a Connection
    pool, I can successful create it...........please help me !!! I havechecked
    the weblogic.policy file, but I can not find any problem........
    the configuration in the weblogic.properties as below:
    weblogic.jdbc.connectionPool.ForumPool=\
    url=jdbc:db2:forum,\
    driver=COM.ibm.db2.jdbc.app.DB2Driver,\
    loginDelaySecs=1,\
    initialCapacity=2,\
    maxCapacity=10,\
    capacityIncrement=1,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=10,\
    testTable=administrator.user,\
    props=user=db2admin;password=db2admin
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.ForumPool=everyone
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.JtsForumDS=ForumPool
    weblogic.jdbc.DataSource.NonJtsForumDS=ForumPool

  • Urgent...Help Needed.1. Helper Class 2. Connection Pool

    Hello,
    1. There are few helper classes which has to be
    shared b/w session and entity beans. But it
    seems,state of the object is not transfered to entity
    bean though the class has implemented Serializable
    interface. I have archived all the helper class and
    copied to j2ee\home\lib directory. The same jar file
    is made accessible to server via updating <library-
    path> in j2ee/home/config/application.xml file.
    2. How can i utilise connection pooling in oc4j. In data-sources.xml, i am using
    "OracleConnectionPoolDataSource" class. But i feel that connection pool is not utilised coz server hangs in the middle of the retrieval.
    The value of max-connections is 50.
    We are actually migrating from Weblogic 5.1.0 to Oracle 9i AS. In weblogic, we had given 10 max connections in weblogic.properties,it is working fine. But i dont understand why it is not working in 9i AS though the max-connections is 50.
    Kindly let me know the solution at the earliest as it is very urgent to get the program running...
    Thanx and Regards,
    Achyuth

    Hi,
    hopefully I can help you.
    1. There are few helper classes which has to be ...We have just the same constellation. We have put the HelperClasses in the
    J2EE/home/lib dir, NOT specifying it in the application.xml. So everything works fine.
    The only thing: never, again: never put these files within WEB-INF and the lib-dir.
    With the HelperClasses in both we have only faced massive problems, mostly ClasCastExceptions.
    We had once all the helperClasses within J2EE/home/applications/lib, but this requires to
    specify this dir within the orion-application.xml within the appl dir in applications-deployment.
    It also worked fine.
    2. How can i utilise connection pooling in oc4j. In data-sources.xml, i am using ...I'm not sure of this, but I think, the container handles Connection Pooling, no matter what Factory you
    specify. But I think, the Class hasn't to be OracleConnectionPool ... but I have to check this (right now
    I have no access to our datasource.xml ..)
    cu
    ed

  • Problem with JNDI/LDAP AND connection pool

    I'm a newbie to Java but am attempting to write a servlet that retrieves info use to populate the contents of drop down menus. I'd like to only have to do this once. The servlet also retrieves other data (e.g. user profile info, etc ...). I'd like to be able to use the connection pool for all of these operations but I'm getting a compile error:
    public class WhitePages extends HttpServlet {
    ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
    public static String m_servletPath = null;
    public static String cattrs = null;
    public static String guidesearchlist[] = {};
    public static int isLocalAddr = 0;
    private int aeCtr;
    private String[] sgDNArray;
    private HashMap sgDN2DNLabel = new HashMap();
    private HashMap sgDN2SearchGuide = new HashMap();
    private String strport;
    private int ldapport;
    private String ldaphost;
    private String ldapbinddn;
    private String ldapbindpw;
    private String ldapbasedn;
    private int maxsearchcontainers;
    private int maxsearchkeys;
    private String guidesearchbases;
    private String guidecontainerclass;
    private String strlocaladdr;
    private String providerurl;
    // my init method establishes the connection
    // pool and then retrieve menu data
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    String strport = config.getInitParameter("ldapport");
    ldapport = Integer.parseInt(strport);
    String strconts = config.getInitParameter("maxsearchcontainers");
    maxsearchcontainers = Integer.parseInt(strconts);
    String strkeys = config.getInitParameter("maxsearchkeys");
    maxsearchkeys = Integer.parseInt(strkeys);
    ldaphost = config.getInitParameter("ldaphost");
    ldapbinddn = config.getInitParameter("ldapbinddn");
    ldapbindpw = config.getInitParameter("ldapbindpw");
    ldapbasedn = config.getInitParameter("ldapbasedn");
    guidesearchbases = config.getInitParameter("guidesearchbases");
    guidecontainerclass = config.getInitParameter("guidecontainerclass");
    strlocaladdr = config.getInitParameter("localaddrs");
    providerurl = "ldap://" + ldaphost + ":" + ldapport;
    /* Set up environment for creating initial context */
    Hashtable env = new Hashtable(11);
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, providerurl.toString());
    /* Enable connection pooling */
    env.put("com.sun.jndi.ldap.connect.pool", "true");
    StringTokenizer st = new StringTokenizer(guidesearchbases, ":" );
    String guidesearchlist[] = new String[st.countTokens()];
    for ( int i = 0; i < guidesearchlist.length; i++ ) {
    guidesearchlist[i] = st.nextToken();
    // Get a connection from the connection pool
    // and retrieve the searchguides
    StringBuffer asm = new StringBuffer(""); // This is the advanced search menu htmlobject buffer
    StringBuffer strtmpbuf = new StringBuffer(""); // This is the simple search menu htmlobject buffer
    try {
    StringBuffer filter = new StringBuffer("");
    filter.append("(objectclass=" + guidecontainerclass + ")");
    String[] attrList = {"dn","cn","searchguide"};
    SearchControls ctls = new SearchControls();
    ctls.setReturningAttributes(attrList);
    ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
    String attrlabelkey;
    sgDNArray = new String[guidesearchlist.length];
    for( int i = 0; i < guidesearchlist.length; i++ ) {
    // Search each of the namingspaces where
    // searchguides exist then build
    // the dynamic menus from the result
    DirContext ctx = new InitialDirContext(env);
    NamingEnumeration results = ctx.search(guidesearchlist, filter, ctls);
    I get a compile error:
    WhitePages.java:164: cannot resolve symbol
    symbol : method search (java.lang.String,java.lang.StringBuffer,javax.naming.directory.SearchControls)
    location: interface javax.naming.directory.DirContext
    NamingEnumeration results = ctx.search(guidesearchlist[i], filter, ctls);
    ^
    WhitePages.java:225: cannot resolve symbol
    symbol : variable ctx
    location: class OpenDirectory
    ctx.close();
    ^
    Can anyone help? If there is someone out there with JNDI connection pool experience I would appreciate your assistance!

    Manish
    The issue may not be related to the number of connections or the initial
    connections. Check your heap size (ms, mx). Turn on verbosegc. Your heap may
    not be big enough to accept the 25,000 rows.
    Bernie
    "Manish Kumar Singh" <[email protected]> wrote in message
    news:3e6c34ca$[email protected]..
    We are creating the result set with 25000 rows(each row has 56 columns) bygetting the connection using data source. With the initial capacity of the
    connection pool is 5 and the max capacity as 30 and grow connection as 1,
    the server gets out of memory exception, when we issue a new request, even
    after closing the previous connections.
    Now, if we change the initial capacity to 1 and rest all the things assame, the issue gets resolved and the server works fine.
    Could you please help me out in this regard????
    thanks in advance
    manish

  • Help in creating the connection pool  for Oracle 8i using Jdriver

    Hi
    Iam pretty new to Weblogic and would be greatfull if some one can help me
    out in finding the parameters to be specified in Weblogic console for creating
    a Connection pool for Oracle 8i database running on solaris. I have installed
    necessary client libraries in weblogic machine.
    The details for my database are as follows
    database name : mydb
    database server : 173.24.24.1
    database port : 1521
    username : myuser
    I would appreciate if you can provide me the following details to be entered in
    weblogic console for creating the connection pool
    URL
    DRIVER CLASS NAME
    PROPERTIES
    ACL NAME
    PASSWORD
    Thanks,
    S Hari

    Hari
    Jdbc Connection Pool Configuration
    URL= jdbc:weblogic:oracle
    DRIVER CLASS NAME=weblogic.jdbc.oci.Driver
    PROPERTIES
    user=myuser
    password=<password in mydb>
    server=mydb
    After configuring Connection Pool Select Targets tab. Select Server from Available
    to Chosen.
    Deepak
    Hari wrote:
    Hi
    Iam pretty new to Weblogic and would be greatfull if some one can help me
    out in finding the parameters to be specified in Weblogic console for creating
    a Connection pool for Oracle 8i database running on solaris. I have installed
    necessary client libraries in weblogic machine.
    The details for my database are as follows
    database name : mydb
    database server : 173.24.24.1
    database port : 1521
    username : myuser
    I would appreciate if you can provide me the following details to be entered in
    weblogic console for creating the connection pool
    URL
    DRIVER CLASS NAME
    PROPERTIES
    ACL NAME
    PASSWORD
    Thanks,
    S Hari

  • Weblogic 7.0 deploy exception and Connection Pooling

    Hi,
    I am using weblogic 7.0
    When I delpoy my application in the server I get the following exception when deployed through webLogic builder deploy tool
    <Aug 24, 2004 1:26:32 PM IST> <Error> <Deployer> <149201> <The Slave Deployer failed to complete the deployment task with id 0 for the application MyApp.
    weblogic.management.ApplicationException: No modules to prepare on myserverfor application named MyApp
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:545)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1062)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:730)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    but
    then when I invoke the application the application is successfully executed
    My application.xml file
    is like
    <application>
    <display-name>MyApp</display-name>
    <module>
    <web>
    <web-uri>MyApp.war</web-uri>
    <context-root>MyApp</context-root>
    </web>
    </module>
    </application>
    weblogic.xml has following
    <weblogic-web-app>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/MyApp</res-ref-name>
    <jndi-name>jdbc/MyApp</jndi-name>
    </resource-description>
    </reference-descriptor>
    <charset-params>
    </charset-params>
    </weblogic-web-app>
    in weblogic-application.xml file
    <weblogic-application>
    <data-source-name>MyApp</data-source-name>
    </weblogic-application>
    web.xml has
    <resource-ref>
    <res-ref-name>jdbc/MyApp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    under the
    http://localhost:7001/console
    mydomain>JDBCConnection>
    Name:jdbc/MyApp
    URL:jdbc:weblogic:oracle
    Driver Classname:weblogic.jdbc.oci.Driver
    Properties
    (key=value): User=SimpleUser
    Server=myServer
    ACL Name:blank
    Password:XXXXX
    Open String Password:XXXXX
    mydomain> JDBC Data Sources> MyApp
    Name: MyApp
    JNDI Name: jdbc/MyApp
    Pool Name: jdbc/MyApp
    Row Prefetch Enabled
    Row Prefetch Size: 48
    Stream Chunk Size: 256 bytes
    WebDescriptor-9> WebAppDescriptor-9> Resource Refs> jdbc/MyApp
    Description: blank
    Ref Name: jdbc/MyApp
    Ref Type: javax.sql.DataSource
    Auth: Container
    Sharing Scope: (none)
    WebDescriptor-9> WebAppExtDescrip...> ReferenceDescrip...> Resource Descrip...> jdbc/MyApp
    Jndi Name: jdbc/MyApp
    Resource Reference: (none)jdbc/MyApp
    now in DAO source Code
    try {
    icCtx = new InitialContext(); // Instantiate the InitialContext Object
    // Lookup the Datasource using the DBName
    strDbName = "java:comp/env/jdbc/MyApp";
    dsObject = (DataSource) icCtx.lookup(strDbName);
    connObject = dsObject.getConnection(); // Get the Connection
    connObject.setAutoCommit(false);
    System.out.println("Conn established" +connObject );
    } catch (Exception e) {
    Now when I invoke My Application as
    http://localhost:7001/MyApp/HomePage
    I get
    Conn establishedweblogic.jdbc.rmi.SerialConnection@71d8c0
    Conn establishedweblogic.jdbc.rmi.SerialConnection@2cfbaf
    Conn establishedweblogic.jdbc.rmi.SerialConnection@5a739d
    Conn establishedweblogic.jdbc.rmi.SerialConnection@4d42cf
    different Adrress Meaning Connection Pooling is Not working.
    Where are the possible mistakes being done?Why I am not getting the same connnection and why is there an Exception in Deployment?
    Can somebody help me out?

    DAO Code
    connObject = dsObject.getConnection(); // Get the Connection
    connObject.setAutoCommit(false);
    System.out.println("Conn established" +connObject );
    } catch (Exception e) {
    Now when I invoke My Application as
    http://localhost:7001/MyApp/HomePage
    I get
    Conn establishedweblogic.jdbc.rmi.SerialConnection@71d8c0
    Conn establishedweblogic.jdbc.rmi.SerialConnection@2cfbaf
    Conn establishedweblogic.jdbc.rmi.SerialConnection@5a739d
    Conn establishedweblogic.jdbc.rmi.SerialConnection@4d42cf
    different Address Meaning Connection Pooling is Not working.
    How do I can be sure that the connection pool is working?

  • A strang problem about Resin database connection pool

    I am a beginner&#65292;hope somebody can help me.
    my web site occured a strange problem after I used the Resin database connection pool instead of
    connecting directly
    the error message as follows:java.lang.IllegalArgumentException: Request cannot be null
    at javax.servlet.ServletRequestWrapper.<init>(ServletRequestWrapper.java:100)
    at javax.servlet.http.HttpServletRequestWrapper.<init>(HttpServletRequestWrapper.java:92)
    at com.caucho.server.connection.RequestAdapter.<init>(RequestAdapter.java:96)
    at com.caucho.server.webapp.DispatchRequest.<init>(DispatchRequest.java:97)
    at com.caucho.server.webapp.IncludeDispatchRequest.<init>(IncludeDispatchRequest.java:77)
    at com.caucho.server.webapp.IncludeDispatchRequest.createDispatch(IncludeDispatchRequest.java:87)
    at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:389)
    at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:345)
    at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:807)
    at _jsp._intro__jsp._jspService(/intro.jsp:60)
    at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
    at com.caucho.jsp.Page.pageservice(Page.java:571)
    at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:155)
    at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:211)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:177)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:331)
    at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:464)
    at com.caucho.util.ThreadPool.run(ThreadPool.java:408)
    at java.lang.Thread.run(Thread.java:595)

    <!--
    - Resin 3.0 configuration file.
    -->
    <resin xmlns="http://caucho.com/ns/resin"
    xmlns:resin="http://caucho.com/ns/resin/core">
    <!--
    - Logging configuration for the JDK logging API.
    -->
    <log name='' level='info' path='stdout:' timestamp='[%H:%M:%S.%s] '/>
    <log name='com.caucho.java' level='config' path='stdout:'
    timestamp='[%H:%M:%S.%s] '/>
    <log name='com.caucho.loader' level='config' path='stdout:'
    timestamp='[%H:%M:%S.%s] '/>
    <!--
    - For production sites, change dependency-check-interval to something
    - like 600s, so it only checks for updates every 10 minutes.
    -->
    <dependency-check-interval>2s</dependency-check-interval>
    <!--
    - You can change the compiler to "javac" or jikes.
    - The default is "internal" only because it's the most
    - likely to be available.
    -->
    <javac compiler="internal" args=""/>
    <!-- Security providers.
    - <security-provider>
    - com.sun.net.ssl.internal.ssl.Provider
    - </security-provider>
    -->
    <!--
    - If starting bin/resin as root on Unix, specify the user name
    - and group name for the web server user.
    - <user-name>resin</user-name>
    - <group-name>resin</group-name>
    -->
    <!--
    - Configures threads shared among all HTTP and SRUN ports.
    -->
    <thread-pool>
    <!-- Maximum number of threads. -->
    <thread-max>128</thread-max>
    <!-- Minimum number of spare connection threads. -->
    <spare-thread-min>25</spare-thread-min>
    </thread-pool>
    <!--
    - Configures the minimum free memory allowed before Resin
    - will force a restart.
    -->
    <min-free-memory>1M</min-free-memory>
    <server>
    <!-- adds all .jar files under the resin/lib directory -->
    <class-loader>
    <tree-loader path="$resin-home/lib"/>
    </class-loader>
    <!-- Configures the keepalive -->
    <keepalive-max>500</keepalive-max>
    <keepalive-timeout>120s</keepalive-timeout>
    <!-- The http port -->
    <http server-id="" host="*" port="8080"/>
    <!--
    - SSL port configuration:
    - <http port="8443">
    - <openssl>
    - <certificate-file>keys/gryffindor.crt</certificate-file>
    - <certificate-key-file>keys/gryffindor.key</certificate-key-file>
    - <password>test123</password>
    - </openssl>
    - </http>
    -->
    <!--
    - The local cluster, used for load balancing and distributed
    - backup.
    -->
    <cluster>
    <srun server-id="" host="127.0.0.1" port="6802" index="1"/>
    </cluster>
    <!--
    - Enables/disables exceptions when the browser closes a connection.
    -->
    <ignore-client-disconnect>true</ignore-client-disconnect>
    <!--
    - Enables the cache
    -->
    <cache path="cache" memory-size="10M"/>
    <!--
    - Enables periodic checking of the server status.
    - With JDK 1.5, this will ask the JDK to check for deadlocks.
    - All servers can add <url>s to be checked.
    -->
    <ping>
    <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
    </ping>
    <!--
    - Defaults applied to each web-app.
    -->
    <web-app-default>
    <!--
    - Sets timeout values for cacheable pages, e.g. static pages.
    -->
    <cache-mapping url-pattern="/" expires="5s"/>
    <cache-mapping url-pattern="*.gif" expires="60s"/>
    <cache-mapping url-pattern="*.jpg" expires="60s"/>
    <!--
    - Servlet to use for directory display.
    -->
    <servlet servlet-name="directory"
    servlet-class="com.caucho.servlets.DirectoryServlet"/>
    </web-app-default>
    <!--DataSource jndi configuration-->
    <database>
    <jndi-name>jdbc/artunion</jndi-name>
    <driver type="org.gjt.mm.mysql.Driver">
    <url>jdbc:mysql://localhost:3306/union</url>
    <user>as</user>
    <password>as</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
    </database>
    <!--
    - Default host configuration applied to all virtual hosts.
    -->
    <host-default>
    <class-loader>
    <compiling-loader path='webapps/WEB-INF/classes'/>
    <library-loader path='webapps/WEB-INF/lib'/>
    </class-loader>
    <!--
    - With another web server, like Apache, this can be commented out
    - because the web server will log this information.
    -->
    <access-log path='logs/access.log'
    format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
    rollover-period='1W'/>
    <!-- creates the webapps directory for .war expansion -->
    <web-app-deploy path='webapps'/>
    <!-- creates the deploy directory for .ear expansion -->
    <ear-deploy path='deploy'>
    <ear-default>
    <!-- Configure this for the ejb server
    - <ejb-server>
    - <config-directory>WEB-INF</config-directory>
    - <data-source>jdbc/test</data-source>
    - </ejb-server>
    -->
    </ear-default>
    </ear-deploy>
    <!-- creates the deploy directory for .rar expansion -->
    <resource-deploy path='deploy'/>
    <!-- creates a second deploy directory for .war expansion -->
    <web-app-deploy path='deploy'/>
    </host-default>
    <!-- includes the web-app-default for default web-app behavior -->
    <resin:import path="${resinHome}/conf/app-default.xml"/>
    <!-- configures the default host, matching any host name -->
    <host id=''>
    <document-directory>D:/artunion</document-directory>
    <!-- configures the root web-app -->
    <web-app id='/'>
    <!-- adds xsl to the search path -->
    <class-loader>
    <simple-loader path="$host-root/xsl"/>
    </class-loader>
    <servlet-mapping url-pattern="/servlet/*" servlet-name="invoker"/>
    </web-app>
    </host>
    </server>
    </resin>
    Thank you!

Maybe you are looking for

  • New itunes 6.0.3.5

    there is a new itunes update.   Windows XP  

  • E-Mail Alerts / Forum

    Hello, I've set specific e-mail address (the Address of Moderator)  to be notified if a question has gone unanswered in the forums for a given period of time. You can see teh procedure in this link (help) http://help.sap.com/saphelp_nw04/helpdata/en/

  • How to set the header for second page

    Hello all, I'm trying to set different header for first page and page number should starts from second page. Below is the sample code to set the header for each and every page. DECLARE hApplication OLE2.OBJ_TYPE; hWindow OLE2.OBJ_TYPE; hPane OLE2.OBJ

  • If statement is not giving desired result..

    i want to connct a java program to sql database only if a condition is met.. n im using if statemnt for this.. if(condition) try Class.forName(driver); but this program is connecting without meeting the condition... what could be wrong?

  • BB 8130: Picture mail?

    Of course, I have yet another question... How do you send picture mail to another phone? I can send pics from email to an email address no problem, but I have no idea how to send a picture though SMS to another cell phone. I've tried sending it thoug