activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: Is this a bug in DefaultJDBCAdapter.java?
Date Tue, 04 Jul 2006 16:34:23 GMT
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 <ccyuelei@163.com> 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

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