tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Behrens" <...@diekleinedomain.de>
Subject RE: DB Connection (sun.jdbc.rowSet.CachedRowSet)
Date Wed, 28 May 2003 22:54:58 GMT
Hi Ralph,

thanks a lot for those links. I would definitely like to use
sun.jdbc.rowset.CachedRowSet as I believe that this would be the easiest
approach to adapting my code. I have been able to get queries to work in a
matter of hours but seem to be stuck now with updates and inserts. My
connection-pool is setup in my server.xml (snipplet below) but when calling
crs.acceptChanges() I get "java.sql.SQLException: Unable to get Connection".
I have tried to manually get a connection from the pool and pass it to the
method resulting in a "java.sql.SQLException: writeData cannot determine the
table name." error :(

Can you/someone give me a tip as to what I am doing wrong or missing?

Thanks again, Jan

[snipp]
	<ResourceParams name="jdbc/BankDB">
            <parameter>
              <name>factory</name>
              <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
            </parameter>
             <parameter>
              <name>maxActive</name>
              <value>100</value>
            </parameter>
            <parameter>
              <name>removeAbandoned</name>
              <value>false</value>
            </parameter>
            <parameter>
              <name>maxIdle</name>
              <value>30</value>
            </parameter>
             <parameter>
              <name>maxWait</name>
              <value>10000</value>
            </parameter>
             <parameter>
             <name>username</name>
             <value>application</value>
            </parameter>
            <parameter>
             <name>password</name>
             <value>*******</value>
            </parameter>
            <parameter>
               <name>driverClassName</name>
               <value>org.gjt.mm.mysql.Driver</value>
            </parameter>
            <parameter>
              <name>url</name>

<value>jdbc:mysql://frodo:3306/bank_db?autoReconnect=true</value>
            </parameter>
          </ResourceParams>
        </Context>
[snapp]

> -----Original Message-----
> From: Ralph Einfeldt [mailto:ralph.einfeldt@uptime-isc.de]
> Sent: Wednesday, May 28, 2003 8:01 AM
> To: Tomcat Users List
> Subject: RE: DB Connection
>
>
> It's a pretty common solution, you may also look for a cached ResultSet:
>
> http://freshmeat.net/projects/crs/?topic_id=66
> http://developer.java.sun.com/developer/earlyAccess/crs/ (Requires login)
> http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html
> http://jakarta.apache.org/commons/beanutils/api/org/apache/commons
> /beanutils/RowSetDynaClass.html
>
> > -----Original Message-----
> > From: Jan Behrens [mailto:jan@diekleinedomain.de]
> > Sent: Tuesday, May 27, 2003 12:08 PM
> > To: Tomcat Users List
> > Subject: RE: DB Connection
> >
> > This leads me to the conclusion, that I have to copy the
> > extracted data into an Array for further processing. Is
> > that a reasonable approach or is there a better practice?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message