cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Repost of JDBC ODBC problem
Date Mon, 30 Jul 2001 22:04:04 GMT
Dinkar Ganti wrote:
> 
> Hello:
> 
> I checked my application and it is able to connect to using JDBC-ODBC driver
> on Java command line. However, when I use Cocoon, I get the following
> exception trace. Any pointers to this type of error will be greatly
> appreciated.

Short answer: don't use JDBC-ODBC bridge.
Long answer:

Cocoon uses Avalon's connection pooling which keeps connections open until you
need them.  This greatly helps in the scalability of web sites, however the
JdbcOdbcBridge is neither fully JDBC Compliant, nor threadsafe.  Many times
it chokes up on more than one open JDBC connection.  There are a number of
anomalees with the JdbcOdbcBridge, so you can NEVER do connection pooling.

Your ONLY option (if you use the bridge) is to create and destroy your connections
as you need them--which precludes you from using the actions included with Cocoon
because they require you to use connection pooling.

If you are trying to connect to MS SQL Server, there are a number of third
party JDBC drivers that I would highly recommend you use.

> 
> The problem I am facing is to connect to an SQL Database using Cocoon. I am
> able to establish connection in a stand-alone Java application. However,
> when I connect using Cocoon, I get the following exception:
> 
> ____________Exception _________________
> 
> DEBUG   26250   [cocoon  ] (Thread-8): Connection established
> DEBUG   26500   [cocoon  ] (Thread-8): Create Statement
> DEBUG   26781   [cocoon  ] (Thread-8): [Microsoft][ODBC SQL Server
> Driver]Connection is busy with results for another hstmt
> 
> ___________ End of Exception
> 
> The data source setup in cocoon.xconf file is as follows:
> 
> ------------Cocoon.xconf----------------------
> 
> <datasources>
>     <jdbc name="ESDMConnection">
>     <pool-controller min="5" max="10"/>
>     <dburl>jdbc:odbc:esdm</dburl>
>     <user>sa</user>
>     <password></password>
>   </jdbc>
> 
> -----------End of cocoon.xconf-----------------
> 
> Thanks,
> 
> Dinkar
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message