Re: out-of-memory error

Tim Anderson <[email protected]> Sun, 10 Dec 2006 11:39:24 +1100
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
You don't indicate if you are closing the MessageProducer or Session
instances.

If not, you have a memory leak.

You can also get out of memory errors if you are publishing
non-persistent messages

to slow consumers and haven't set a message expiration interval.

-Tim

Thandesha V.K wrote:

Hi OpenJms,

I am Thandesha and getting the
following error some times. What might be the problem?

public boolean
queueMessage(String message) throws Exception{

Session sess;

MessageProducer sender = null;

try {

sess = sh.getSession();

sender = sess.createProducer(sh.senderDestObj);

TextMessage txtMessage = sess.createTextMessage(message);

sender.send(txtMessage);

sh.putSession(sess);

} catch (Exception e){

throw e;

}

javax.jms.JMSException:
Failed to process message due to out-of-memory
error

at
org.exolab.jms.server.JmsServerSession.send(JmsServerSession.java:230)

at
org.exolab.jms.server.net.RemoteServerSession.send(RemoteServerSession.java:152)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at
org.exolab.jms.net.orb.DefaultORB$Handler.invoke(DefaultORB.java:442)

at
org.exolab.jms.net.orb.DefaultORB$Handler.invoke(DefaultORB.java:468)

at
org.exolab.jms.net.connector.ContextInvocationHandler.invoke(ContextInvocationHandler.java:108)

at
org.exolab.jms.net.multiplexer.MultiplexedManagedConnection.request

(MultiplexedManagedConnection.java:332)

at
org.exolab.jms.net.multiplexer.Multiplexer$1.run(Multiplexer.java:653)

at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)

at java.lang.Thread.run(Thread.java:534)

Thanks & Regards,

Thandesha V.K

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user