[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#3600) Bug in JDBC-LDAP Bridge - JndiLdapConnection



Full_Name: Suraj Amin
Version: 
OS: WinXP
URL: 
Submission from: (NULL) (194.72.110.12)


As per the documention of JDBC-LDAP Bridge on OctetString's website regarding
the properties that can be passed in the ldapConnectString:-
ignore_transactions: set to true if calls to setAutoCommit(), commit() and
rollback() should be ignored. Default is false.

I was using Apache's dbcp to manage my connections to various databases
including connections to my ldap servers. However when the
org.apache.commons.dbcp.BasicDataSource initializes it does certain validations
during it makes calls to the connection objects setAutoCommit(), rollback(),
etc.

If the ignore_transactions property is not sent via the ldapConnectString, any
calls to setAutoCommit(), commit() and rollback() methods in
com.octetstring.jdbcLdap.jndi.JndiLdapConnection results in SQLException("LDAP
Does Not Support Transactions") being thrown. The above is done via a: if (!
this.ignoreTransactions) {
	throw new SQLException("LDAP Does Not Support Transactions"); 
}

But the rollback() method does not have the above if block and throws a
SQLException directly.

The source code of JndiLdapConnection can be found at:
http://www.openldap.org/devel/cvsweb.cgi/~checkout~/src/com/octetstring/jdbcLdap/jndi/JndiLdapConnection.java?rev=1.4&cvsroot=JDBCLDAP&hideattic=1&sortbydate=0