From activemq-users-return-160-apmail-geronimo-activemq-users-archive=geronimo.apache.org@geronimo.apache.org Thu Mar 23 03:23:10 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 97170 invoked from network); 23 Mar 2006 03:23:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Mar 2006 03:23:05 -0000 Received: (qmail 34304 invoked by uid 500); 23 Mar 2006 03:23:04 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 34283 invoked by uid 500); 23 Mar 2006 03:23:04 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 34273 invoked by uid 99); 23 Mar 2006 03:23:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Mar 2006 19:23:04 -0800 X-ASF-Spam-Status: No, hits=-3.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_IN_BSP_TRUSTED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jackh@google.com designates 216.239.45.12 as permitted sender) Received: from [216.239.45.12] (HELO smtp-out.google.com) (216.239.45.12) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Mar 2006 19:23:03 -0800 Received: from nappa.corp.google.com (nappa.corp.google.com [172.24.0.4]) by smtp-out.google.com with ESMTP id k2N3Mdb7006483 for ; Wed, 22 Mar 2006 19:22:39 -0800 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:in-reply-to: mime-version:content-type:content-transfer-encoding: content-disposition:references; b=XlLu0OonDtV/lQyZUr8V/Ce1oDX9QIi1Uz2uYPVofBeM/QCKb4hFVeMJjlfkrUCzy l4ndANI8gEK8fCDloeQ3Q== Received: from smtp-out2.google.com (fpx19.prod.google.com [10.253.24.19]) by nappa.corp.google.com with ESMTP id k2MN8K3i010552 for ; Wed, 22 Mar 2006 19:22:37 -0800 Received: by smtp-out2.google.com with SMTP id 19so137926fpx for ; Wed, 22 Mar 2006 19:22:36 -0800 (PST) Received: by 10.253.2.6 with SMTP id 6mr75033fpb; Wed, 22 Mar 2006 19:22:36 -0800 (PST) Received: by 10.253.2.12 with HTTP; Wed, 22 Mar 2006 19:22:36 -0800 (PST) Message-ID: <79d7b4830603221922o32fbdaf9h22e77982fde01986@mail.google.com> Date: Wed, 22 Mar 2006 19:22:36 -0800 From: "Jack Humphrey" To: activemq-users@geronimo.apache.org Subject: Re: JDBC Persistence In-Reply-To: <01b801c64da7$788b2560$a1f1a8c0@jlim> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <933f2a180603220302w1f5c6225k623e7b9b55b734c4@mail.gmail.com> <01b801c64da7$788b2560$a1f1a8c0@jlim> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Is it dangerous to use a shared database in a failover scenario -- e.g. broker 1 is down, broker 2 takes over? Is sharing a DB a proper way to get broker 2 to then deliver messages that were pending on broker 1? On 3/22/06, Jonas Lim wrote: > Hi J, > > Shared database between multiple brokers is not really supported. One > reason for this is to avoid potential deadlocks that would occur in thi= s > type of configuration. > > You can still use the same database server for each broker; just use a > different logical databases for each.. > > > Regards, > Jonas > > ----- Original Message ----- > From: "Javier Leyba" > To: > Sent: Wednesday, March 22, 2006 7:02 PM > Subject: JDBC Persistence > > > > Hi > > > > I did tests with two brokers persisting in the same DB and sometimes > > saw in log file a message like that: > > > > 2006-03-22 10:43:39,372 [eckpoint worker] DEBUG JDBCPersistenceAdapter > > - Commit failed: Duplicate entry '223' for key 1 > > java.sql.BatchUpdateException: Duplicate entry '223' for key 1 > > at > > com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedState= ment.java:642) > > at > > org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStat= ement.java:205) > > at > > org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStat= ement.java:205) > > at > > org.apache.activemq.store.jdbc.TransactionContext.executeBatch(Transact= ionContext.java:92) > > at > > org.apache.activemq.store.jdbc.TransactionContext.executeBatch(Transact= ionContext.java:71) > > at > > org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionCon= text.java:151) > > at > > org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction= (JDBCPersistenceAdapter.java:302) > > at > > org.apache.activemq.store.journal.JournalPersistenceAdapter.commitTrans= action(JournalPersistenceAdapter.java:177) > > at > > org.apache.activemq.store.journal.JournalMessageStore$3.execute(Journal= MessageStore.java:269) > > at > > org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.ja= va:43) > > at > > org.apache.activemq.store.journal.JournalMessageStore.checkpoint(Journa= lMessageStore.java:237) > > at > > org.apache.activemq.store.journal.JournalTopicMessageStore.checkpoint(J= ournalTopicMessageStore.java:156) > > at > > org.apache.activemq.store.journal.JournalPersistenceAdapter$5.call(Jour= nalPersistenceAdapter.java:355) > > at > > edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTas= k.java:176) > > at > > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worke= r.runTask(ThreadPoolExecutor.java:650) > > at > > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worke= r.run(ThreadPoolExecutor.java:675) > > at java.lang.Thread.run(Thread.java:534) > > > > > > I wonder if should I use one DB for each broker or should I add a new > > setting to avoid this kind of errors... > > > > > > Thanks in advance > > > > J > >