activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: AMQ-1191 for 5.3 broke master/slave locking for Oracle
Date Fri, 24 Jul 2009 17:15:19 GMT
thanks for the heads up. It looks like it is time to have more than one
database locker implementation in the box.
A database locker implementation can be injected into the persistence
adapter via config if that helps in the short term. Can you validate that
Oracle works fine without the getMetaData call?

I have reopened AMQ-1191, thanks.

2009/7/24 bwtaylor <bryan_w_taylor@yahoo.com>

>
> We just tried to port our broker to a 5.3 snapshot and got an exception at
> broker startup:
>
> DefaultDatabaseLocker          - Failed to acquire lock:
> java.sql.SQLException: statement handle not executed: getMetaData
> java.sql.SQLException: statement handle not executed: getMetaData
>
> We use Oracle for our persistence store, and it turns out that the Oracle
> JDBC driver will throw an error if getMetaData is called before statement
> execution. I dug into this to find which patch changed this, and found
> this:
>
> http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/DefaultDatabaseLocker.java?r1=747391&r2=787990&diff_format=h
>
> This shows that revision 787990 added an if() predicated taat calls
> statement.getMetaData(), which throws the error since
> statement.executeQuery() has not yet been called. If you have Oracle
> Metalink, see bug 3917619, which was closed "Not a Bug." (asserting this
> behavior is allowed under the JDBC spec) and also see bug 3934162, which
> will change this behavior in the 11.2 jdbc driver (not out yet) as an
> enhancement request. The normal work around to this problem is to append an
> impossible where clause like "where 1=0" and go ahead and execute the
> query.
>
> Interestingly, the ticket seeks to make master/slave locking work with
> SqlServer, and the specific change has a comment about needing to make it
> work with derby. We are using Derby in our dev environments and Oracle in
> our current production environment, and we are considering SqlServer in
> some
> future production environments. So we'd like 5.3 to work with all of these
> RDBMS's :-).
>
> Hope this helps...
> --
> View this message in context:
> http://www.nabble.com/AMQ-1191-for-5.3-broke-master-slave-locking-for-Oracle-tp24648059p24648059.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message