Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 75184 invoked from network); 10 Oct 2008 00:56:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2008 00:56:03 -0000 Received: (qmail 42587 invoked by uid 500); 10 Oct 2008 00:56:01 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 42568 invoked by uid 500); 10 Oct 2008 00:56:01 -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 42557 invoked by uid 99); 10 Oct 2008 00:56:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2008 17:56:01 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elihusmails@gmail.com designates 209.85.134.191 as permitted sender) Received: from [209.85.134.191] (HELO mu-out-0910.google.com) (209.85.134.191) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2008 00:54:57 +0000 Received: by mu-out-0910.google.com with SMTP id i2so209854mue.6 for ; Thu, 09 Oct 2008 17:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:mime-version:content-type:content-transfer-encoding :content-disposition; bh=M/XjCoJSucIF6uKfHg6PF2car7SW/Q04YvHDRpw5/Hk=; b=IF5oquqCsd7r4V4Oqu0Rrc5MdxV1nPKxyE6BB0EPj7mf1qZghJluvb72GGyPEwXpCG wB47rq0wLl4vXUiP0jx+0gtxfnj2p1Vq33CpdbTz3BjNepK4RWPf7xIfKDXWHQLHY/xg kAJ152zsHQAgBvHxPlnqWDc6ugDyFbfrZ1JeQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type :content-transfer-encoding:content-disposition; b=Vy60G5HR6s8wHpYYsOO9V7I10wgOaNhbcogvKNk/QE7f1kaLD9bVZX8Q4cP6qlneOx /34RGFnm4iV/vE2SLJ0k0U54XW3dEtJafUrZt01bRUSNDPBG0+OMnsUKhULbxamHQ8sZ E4Z5WY4zTrbP1rKkioXyg2QfGfUygSOdATM6A= Received: by 10.187.190.6 with SMTP id s6mr280809fap.51.1223600131770; Thu, 09 Oct 2008 17:55:31 -0700 (PDT) Received: by 10.187.216.1 with HTTP; Thu, 9 Oct 2008 17:55:31 -0700 (PDT) Message-ID: <9f066ee90810091755t103b57e4t996ff730fe41159f@mail.gmail.com> Date: Thu, 9 Oct 2008 20:55:31 -0400 From: "Mark Webb" To: users@activemq.apache.org Subject: memory leak problem with ActiveMQ 5.1 Cc: elihusmails@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org I have run across a memory leak that I have been able to reproduce. I am profiling the sample application in NetBeans and I believe that I have traced the problem to org.apache.activemq.openwire.v3.BaseDataStreamMarshaller.tightUnmarshalByteSequence(DataInput, BooleanStream) The sample program is a very simple application that sends an object that I wrote to ActiveMQ every 200ms. In NetBeans I am using the "Live Allocated Objects" view and approximately 80% of all objects are byte[]. If I view the Allocation Call Tree, the first few methods in the tree are: BaseDataStreamMarshaller.tightUnmarshalByteSequence(DataInput, BooleanStream) org.apache.activemq.util.ByteArrayOutputStream.checkCapacity(int) org.apache.activemq.util.ByteArrayOutputStream. java.lang.StringCoding$StringEncoder.encode(char[],int,int) The object that I am sending is a simple bean class and only contains an int, String and byte[]. I am using the base configuration for ActiveMQ. All my sample application does is call sendObject(Serializable) every 200ms. Here is the simple JMS library that I wrote: ------------- START -------------------------- public class JmsLib { private TopicConnection connection; private Session session; private Topic destination; private MessageProducer producer; private MessageConsumer consumer; public JmsLib( ActiveMQConnectionFactory connFactory, String dest ) throws JMSException { connection = connFactory.createTopicConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); destination = session.createTopic( dest ); producer = session.createProducer( destination ); consumer = session.createConsumer( destination ); connection.start(); } public void addMessageListener( MessageListener listener ) throws JMSException{ consumer.setMessageListener( listener ); } public void sendObject( Serializable object ) throws JMSException{ ObjectMessage message = session.createObjectMessage( object ); producer.send(message); } } --------------- END -------------------------- Thanks for any help you may have...