Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 60865 invoked from network); 19 Feb 2010 15:56:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Feb 2010 15:56:55 -0000 Received: (qmail 9399 invoked by uid 500); 19 Feb 2010 15:56:55 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 9354 invoked by uid 500); 19 Feb 2010 15:56:54 -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 9344 invoked by uid 99); 19 Feb 2010 15:56:54 -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 15:56:54 +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 15:56:46 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NiVDO-0006H8-0t for users@activemq.apache.org; Fri, 19 Feb 2010 07:56:26 -0800 Message-ID: <27654579.post@talk.nabble.com> Date: Fri, 19 Feb 2010 07:56:26 -0800 (PST) From: "bob.deremer" To: users@activemq.apache.org Subject: URGENT QUESTION: AMQ 5.3.0 bug or configuration error??? - ObjectMessage is [still] being serialized when using setObjectMessageSerializationDefered and setCopyMessageOnSend MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: bob.deremer@burningskysoftware.com I'm sorry for the extremely URGENT nature of this question, but I believe I've either come across a bug in AMQ 5.3.0 or I need additional configuration settings. I have multiple POJO(s) that are using an embedded ActiveMQ broker via "vm" access. They are sending custom objects around as the payload of the event messages and we [cannot] have them being serialized. I have listed the problem, my debugging steps so far, and my code for creating connections - in case I'm missing something. I'm hoping that this is a matter of me needing to do some extra configuration, so please advise! Thanks in advance, Bob =================================================== PROBLEM: ObjectMessage(s) are [still] being serialized even after setting setObjectMessageSerializationDefered = true and setCopyMessageOnSend = false on my ActiveMQConnectionFactory object. To verify that the instructions on the ActiveMQ site regarding disabling ObjectMessage serialization are correct, I decided to implement Externalizable on one of my custom classes that are in the object being put in the ObjectMessage. I was very surprised to see that when the ObjectMessage is sent via MessageProducer.send(om) - it is being serialized! And, when the ObjectMessage is dispatched into the MessageConsumer's onMessage, it is being de-serialized. So, I set a breakpoint in my readExternal and writeExternal methods. The code that is serializing the ObjectMessage is in: activemq-5.3.0 source: ActiveMQConnection.java [lines 1662 - 1667]. I've listed them below. It even talks about copying the message in case an embedded broker is dispatching via vm:// - which is confusing to me. if (dispatcher != null) { // Copy in case a embedded broker is dispatching via // vm:// // md.getMessage() == null to signal end of queue // browse. Message msg = md.getMessage(); if (msg != null) { msg = msg.copy(); msg.setReadOnlyBody(true); msg.setReadOnlyProperties(true); msg.setRedeliveryCounter(md.getRedeliveryCounter()); msg.setConnection(ActiveMQConnection.this); md.setMessage(msg); } dispatcher.dispatch(md); } SCENARIO: I'm creating an embedded broker and creating connections from an ActiveMQConnectionFactory instance that is using the URL = "vm://MyEmbeddedBroker". The code looks like the following. I am then creating a connection from this, which is then used for creating my MessageProducer(s) and MessageConsumer(s). private String user = ActiveMQConnection.DEFAULT_USER; private String password = ActiveMQConnection.DEFAULT_PASSWORD; private String url = "vm://MyEmbeddedBroker"; private ActiveMQConnectionFactory connectionFactory; this.connectionFactory = new ActiveMQConnectionFactory(user, password, url); this.connectionFactory.setOptimizedMessageDispatch(true); // set these so the object is NOT serialized when sending messages this.connectionFactory.setObjectMessageSerializationDefered(true); this.connectionFactory.setCopyMessageOnSend(false); -- View this message in context: http://old.nabble.com/URGENT-QUESTION%3A-AMQ-5.3.0-bug-or-configuration-error------ObjectMessage-is--still--being-serialized-when-using-setObjectMessageSerializationDefered-and-setCopyMessageOnSend-tp27654579p27654579.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.