Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 18938 invoked from network); 31 Mar 2006 16:05:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Mar 2006 16:05:55 -0000 Received: (qmail 77251 invoked by uid 500); 31 Mar 2006 16:05:54 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 77223 invoked by uid 500); 31 Mar 2006 16:05:53 -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 77214 invoked by uid 99); 31 Mar 2006 16:05:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2006 08:05:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [195.245.231.163] (HELO mail114.messagelabs.com) (195.245.231.163) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 31 Mar 2006 08:05:52 -0800 X-VirusChecked: Checked X-Env-Sender: M.Kunnumpurath@voca.com X-Msg-Ref: server-8.tower-114.messagelabs.com!1143821128!24647720!1 X-StarScan-Version: 5.5.9.1; banners=voca.com,-,- X-Originating-IP: [81.144.234.222] Received: (qmail 22982 invoked from network); 31 Mar 2006 16:05:28 -0000 Received: from mail2.onevu.co.uk (HELO if113.bacs.co.uk) (81.144.234.222) by server-8.tower-114.messagelabs.com with SMTP; 31 Mar 2006 16:05:28 -0000 Received: from SDR304.office.local (msw.office.local [10.128.50.18]) by if113.bacs.co.uk (8.12.10+Sun/8.12.10) with ESMTP id k2VG5Sqd025768 for ; Fri, 31 Mar 2006 17:05:28 +0100 (BST) Received: from SPR303.office.local (unverified) by SDR304.office.local (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Fri, 31 Mar 2006 17:05:22 +0100 Received: from SPR3V2.office.local ([10.96.50.12]) by SPR303.office.local with Microsoft SMTPSVC (6.0.3790.211); Fri, 31 Mar 2006 17:05:22 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C654DC.EA10096E" Subject: ActiveMQ and JTA Date: Fri, 31 Mar 2006 17:05:20 +0100 Message-ID: <3E7FE7F1841E3441A566885FEDDCDECE43BD24@SPR3V2.office.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ActiveMQ and JTA Thread-Index: AcZU1LJPER3r7NTQT0+AIFHM+XJ0ugABs1Ug From: "Meeraj Kunnumpurath" To: X-OriginalArrivalTime: 31 Mar 2006 16:05:22.0505 (UTC) FILETIME=[EA2DDB90:01C654DC] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C654DC.EA10096E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I=20am=20using=20ActiveMQ=204.0=20M4=20standalone=20with=20the=20message=20= consumers=20and producers=20running=20from=20a=20separate=20Weblogic=20instance.=20I=20hav= e=20got=20the following=20code=20to=20send=20a=20message=20using=20JTA=20transaction=20d= emarcation, Context=20ctx=20=3D=20null; Connection=20con=20=3D=20null; Session=20sess=20=3D=20null; try=20{ =20=20=20=20=20=20=20=20context=20=3D=20new=20InitialContext(); =20=20=20=20=20=20=20=20UserTransaction=20utx=20=3D (UserTransaction)ctx.lookup("javax.transaction.UserTransaction"); =20=20=20=20=20=20=20=20utx.begin(); =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20ConnectionFactory=20cf=20=3D=20new ActiveMQConnectionFactory("tcp://localhost:61616"); =20=20=20=20=20=20=20=20Destination=20dst=20=3D=20new=20ActiveMQQueue("sub= mission.queue"); =20=20=20=20=20=20=20=20Connection=20con=20=3D=20cf.createConnection(); =20=20=20=20=20=20=20=20Session=20sess=20=3D=20con.createSession(false, Session.AUTO_ACKNOWLEDGE); =20=20=20=20=20=20=20=20MessageProducer=20prod=20=3D=20sess.createProducer= (dst); =20=20=20=20=20=20=20=20prod.send(sess.createTextMessage("Test")); =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20con.stop(); =20=20=20=20=20=20=20=20utx.rollback(); }=20catch(Exception=20ex)=20{ =20=20=20=20=20=20=20=20throw=20new=20RuntimeException(ex); }=20finally=20{ =20=20=20=20=20=20=20=20closeResources(ctx,=20con,=20sess); }=20 The=20message=20is=20still=20being=20published,=20despite=20the=20transact= ion=20being rolled=20back.=20Do=20I=20need=20to=20do=20anything=20else=20so=20that=20t= he=20ActiveMQ=20session get=20enlisted=20with=20the=20transaction=20manager. Any=20pointers=20would=20be=20highly=20appreciated. Kind=20Regards Meeraj ***************************************************** =20=20=20=20You=20can=20find=20us=20at=20www.voca.com ***************************************************** This=20communication=20is=20confidential=20and=20intended=20for=20 the=20exclusive=20use=20of=20the=20addressee=20only.=20You=20should=20 not=20disclose=20its=20contents=20to=20any=20other=20person. If=20you=20are=20not=20the=20intended=20recipient=20please=20notify=20 the=20sender=20named=20above=20immediately. Registered=20in=20England,=20No=201023742, Registered=20Office:=20Voca=20Limited Drake=20House,=20Three=20Rivers=20Court, Homestead=20Road,=20Rickmansworth, Hertfordshire,=20WD3=201FX This=20message=20has=20been=20checked=20for=20all=20email=20viruses=20by=20= MessageLabs. ------_=_NextPart_001_01C654DC.EA10096E--