Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 35021 invoked from network); 19 Feb 2010 22:27:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Feb 2010 22:27:39 -0000 Received: (qmail 91213 invoked by uid 500); 19 Feb 2010 22:27:38 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 91161 invoked by uid 500); 19 Feb 2010 22:27:38 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 91151 invoked by uid 99); 19 Feb 2010 22:27:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2010 22:27:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2010 22:27:30 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NibJW-0001bL-5w for users@activemq.apache.org; Fri, 19 Feb 2010 14:27:10 -0800 Message-ID: <27661175.post@talk.nabble.com> Date: Fri, 19 Feb 2010 14:27:10 -0800 (PST) From: jschmied To: users@activemq.apache.org Subject: Bridging not working reliable MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nabble@juergenschmied.de H! I'm trying to use a Bridge to Oracle JMS. I have a embeded Broker with a local persistant Queue and a bridge to Oracle. If all systems are fine, no problems. ------------- BrokerService broker = new BrokerService(); JmsQueueConnector jmsQueueConnector = new JmsQueueConnector(); QueueConnection createQueueConnection = new QueueConnectionWrap(queueConnectionFactory.createQueueConnection()); createQueueConnection.start(); jmsQueueConnector.setOutboundQueueConnection(createQueueConnection); OutboundQueueBridge outboundQueueBridge = new OutboundQueueBridge("DEV_MSGQ"); outboundQueueBridge.setLocalQueueName("SUBJECT"); jmsQueueConnector.setOutboundQueueBridges(new OutboundQueueBridge[] { outboundQueueBridge }); broker.setJmsBridgeConnectors(new JmsConnector[] { jmsQueueConnector }); broker.setBrokerName("fred"); broker.setPersistent(true); broker.start(); --------- The problems coming when the Oracle Server goes down: The Sender of the Queue does not try to reconnect. I wraped the QueueConnection/QueueSession/Sender and now a Exception in Sender.sendMessage() gets a new QueueSession, a new Queue and a new Sender so I can reconnect. If my reconnection its not successful an I throw a Exception in Sender.sendMessage, the message is removed from the Queue anyway and its lost: 2010-02-19 22:50:21,843 ERROR DestinationBridge onMessage - failed to forward message on attempt: 1 reason: oracle.jms.AQjmsException: I/O Exception: The Network Adapter could not establish the connection message: ActiveMQTextMessage {commandId = 82, responseRequired = false, messageId = ID:NBK092-1401-1266616208578-2:1:1:20:1, originalDestination = null, originalTransactionId = null, producerId = ID:NBK092-1401-1266616208578-2:1:1:20, destination = queue://SUBJECT, transactionId = TX:ID:NBK092-1401-1266616208578-2:1:20, expiration = 0, timestamp = 1266616216390, arrival = 0, brokerInTime = 1266616216390, brokerOutTime = 1266616216468, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 1032, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = TEST} oracle.jms.AQjmsException: I/O Exception: The Network Adapter could not establish the connection at oracle.jms.AQjmsDBConnMgr.checkForSecurityException(AQjmsDBConnMgr.java:934) at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:609) at oracle.jms.AQjmsConnection.createQueueSession(AQjmsConnection.java:646) at org.test.QueueSessionWrap.reconnect(QueueSessionWrap.java:473) at org.test.QueueSenderWrap.send(QueueSenderWrap.java:186) at org.apache.activemq.network.jms.QueueBridge.sendMessage(QueueBridge.java:80) at org.apache.activemq.network.jms.DestinationBridge.onMessage(DestinationBridge.java:130) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1088) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:127) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:197) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.sql.SQLRecoverableException: I/O Exception: The Network Adapter could not establish the connection at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:458) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411) at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:490) at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:202) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:465) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:207) at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:575) ... 13 more The Message ID:NBK092-1401-1266616208578-2:1:1:20:1 is lost now. The Bridge should roll this transaction back. What can I do? Thanks Juergen -- View this message in context: http://old.nabble.com/Bridging-not-working-reliable-tp27661175p27661175.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.