Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 59126 invoked from network); 6 Sep 2006 20:14:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Sep 2006 20:14:10 -0000 Received: (qmail 40877 invoked by uid 500); 6 Sep 2006 20:14:10 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 40861 invoked by uid 500); 6 Sep 2006 20:14:09 -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 40852 invoked by uid 99); 6 Sep 2006 20:14:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2006 13:14:09 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.14.253.182] (HELO mail.exist.com) (64.14.253.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2006 13:14:08 -0700 Received: from [192.168.241.143] ([58.71.14.245]) (authenticated bits=0) by mail.exist.com (8.12.11/8.12.11) with ESMTP id k86K9jjL022315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 6 Sep 2006 13:09:48 -0700 Message-ID: <44FF2BF6.8060200@exist.com> Date: Thu, 07 Sep 2006 04:13:42 +0800 From: Adrian Co User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: activemq-users@geronimo.apache.org Subject: Re: Postgres persistence in Tomcat References: <6167044.post@talk.nabble.com> In-Reply-To: <6167044.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, One way I could think of is to configure your broker using an external config file (i.e. activemq.xml) and just change the dataSource of the persistence adapter to postgres. Example: https://svn.apache.org/repos/asf/incubator/activemq/trunk/assembly/src/release/conf/activemq.xml Just uncomment the postgres-ds bean and uncomment the reference in the persistence adapter. And use that config file to configure your embedded broker. i.e. brokerURL="vm://localhost?brokerConfig=xbean:activemq.xml" <- assuming activemq.xml is in the classpath or brokerURL="vm://localhost?brokerConfig=xbean:file:c:/activemq.xml" <- for file path referencing Hope this helps. Regards, Adrian Co petera wrote: > Hi, > > I am using ActiveMQ 4.0.1 running under Tomcat 5.5.17. I would like to > persist the messages to a Postgres database rather than the default > apache-derby database. > > What additional config parameters do I need to set in my context.xml file. > > > TIA Peter > > > context.xml: > > > > name="jms/ConnectionFactory" > auth="Container" > type="org.apache.activemq.ActiveMQConnectionFactory" > description="JMS Connection Factory" > factory="org.apache.activemq.jndi.JNDIReferenceFactory" > brokerURL="vm://localhost" > brokerName="LocalActiveMQBroker" > useEmbeddedBroker="false"/> > > auth="Container" > type="org.apache.activemq.command.ActiveMQTopic" > factory="org.apache.activemq.jndi.JNDIReferenceFactory" > physicalName="MY.TEST.FOO"/> > > auth="Container" > type="org.apache.activemq.command.ActiveMQQueue" > factory="org.apache.activemq.jndi.JNDIReferenceFactory" > physicalName="MY.TEST.BAR"/> > > > > >