On Sun, 2003-07-06 at 16:40, Magesh Prabhu wrote:
> I could'nt understand this Adrian, I'm using Oracle 8.1.6 database with the
> following datasource configuration:
>
> <datasources>
> <local-tx-datasource>
> <jndi-name>OracleDS</jndi-name>
> <connection-url>jdbc:oracle:thin:@193.16.18.126:1521:clipper</connection-url>
> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
> <user-name>test</user-name>
> <password>test</password>
>
> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
> </local-tx-datasource>
> </datasources>
>
> Could you please give more explanation on your comment.. Should my jdbc driver
> support this prepare() method.... My transaction is all Container managed and I run
> on Commit Option 'B'
>
You need the xa datasource for prepare()
> >
> >> 2) WARN [WrappedConnection] Closing a statement you left open,
> >please do your own housekeeping
> >>
> >
> >You are not closing a statement. Closing a pooled connection
> >just returns the connection to the pool.
>
> In all my Entity Beans, I have this following code to clean up the resources they
> use and I've double checked all my beans so that they dont leave any connections
> open.
>
> private void releaseResources(ResultSet rs, Statement stmt, Connection conn) {
> if (rs != null) {
> try {
> rs.close();
> } catch (SQLException e) {
> log.fatal(e);
> }
> }
>
> if (stmt != null) {
> try {
> stmt.close();
> } catch (SQLException e) {
> log.fatal(e);
> }
> }
>
> if (conn != null) {
> try {
> conn.close();
> } catch (SQLException e) {
> log.fatal(e);
> }
> }
> }
JBoss disagrees with you.
Maybe you have:
Statement stmt = conn.prepareStatement(...);
...
stmt = conn.prepareStatement(...);
...
releaseResources(rs, stmt, conn);
The first statement won't be closed.
Or maybe your releaseResources is not in a finally block.
--
xxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user