Looks like a bug.  Want to open a JIRA issue or a patch?

see:
http://activemq.com/site/contributing.html

Regards,
Hiram

On 7/4/06, yuelei <[EMAIL PROTECTED]> wrote:


Is this a bug in the file DefaultJDBCAdapter.java?

Is this line right?
PreparedStatement s = c.getAddMessageStatement();
in the follow method:

    public void doSetLastAck(TransactionContext c, ActiveMQDestination
destination, String clientId, String subscriptionName, long seq) throws
SQLException, IOException {

        PreparedStatement s = c.getAddMessageStatement();
        try {
            if( s == null ) {
                s =
c.getConnection().prepareStatement(
statements.getUpdateLastAckOfDurableSubStatement());
                if( batchStatments ) {
                    c.setUpdateLastAckStatement(s);
                }
            }

            s.setLong(1, seq);
            s.setString(2, destination.getQualifiedName());
            s.setString(3, clientId);
            s.setString(4, subscriptionName);

            if( batchStatments ) {
                s.addBatch();
            } else if ( s.executeUpdate() != 1 ) {
                throw new SQLException("Failed add a message");
            }
        } finally {
            if( !batchStatments ) {
                s.close();
            }
        }

    }

Anyone show me the answer?
--
View this message in context:
http://www.nabble.com/Is-this-a-bug-in-DefaultJDBCAdapter.java--tf1890445.html#a5168977
Sent from the ActiveMQ - User forum at Nabble.com.




--
Regards,
Hiram

Blog: http://hiramchirino.com

Reply via email to