users@glassfish.java.net

Re: Glassfish v2.1 JMS stop calling consumers

From: Paulo Cesar Reis <casmeiron_at_gmail.com>
Date: Tue, 06 Oct 2009 09:28:42 -0300

Hi Nigel,

My application is a J2EE App that contains message producers (EJB's) and
messages consumers. Message consumers 're typically MDB's. The problem
happens when a lot of message comes in few seconds, like 2thousands in one
second. All my MDB'S 're configured as durable. Yesterday, after a lot of
problem, we decided to move to another machine with a fresh installation of
glassfish, its seems the problem disappear, today we got no problem so far.
I believe the default settings for a destination is to be persistent or Am I
wrong? I did not modify this.

When I changed to embedded mode I got warnings like these:

[#|2009-10-04T14:31:33.702-0300|WARNING|sun-appserver2.1|javax.jms.Connectio
n.mqjmsra|_ThreadID=120;_ThreadName=Timer-11;_RequestID=f9461222-86bd-44a0-a
47b-2ac5ad5ce196;|MQJMSRA_DC2001:
connectionId=618721721118128640:_destroy():called on a connection that was
not closed.|#]

[#|2009-10-04T14:41:28.288-0300|WARNING|sun-appserver2.1|javax.resourceadapt
er.mqjmsra.outbound.connection|_ThreadID=120;_ThreadName=Timer-11;_RequestID
=f9461222-86bd-44a0-a47b-2ac5ad5ce196;|MQJMSRA_MC2001: createConnection API
used w/ username, password for Container Auth|#]


I got a lot of those, spamming my log file. The message below I got only few
times, not on a sequence:

[#|2009-10-04T11:43:09.770-0300|WARNING|sun-appserver2.1|javax.jms|_ThreadID
=313;_ThreadName=iMQReadChannel-2557;_RequestID=6d8fa5cf-1e93-4674-bae8-9492
657498f8;|[I500]: Caught JVM Exception: java.io.EOFException|#]

I did not get any errors messages only warnings.

About the command " imqcmd list dst " I'm not using any defined
username/password so I should use the username guest with wich password? Im
following the default settings here again.

The version of GF:
sh asadmin version
Unable to communicate with admin server, getting version locally.
Version = Sun GlassFish Enterprise Server v2.1
Command version executed successfully.

Follow an example how I send messages to topic:

        @Resource(mappedName="jms/NPMessageReceiverConnectionFactory")
        private ConnectionFactory conFactory;

        @Resource(mappedName="jms/NPMessageReceiverTopic")
        private Topic messageTopic;

        private void broadcastJMSMessage(NPMessage message) throws
JMSException {
                // dispatch jms message
                // send to the target modules
                // they should be able to handle and send the messages to
message-sender module
                Connection connection = null;
                try {
                        connection =
                                this.getConFactory().createConnection();
                        Session session =
                                connection.createSession(true, 0);
                        MessageProducer producer =
                   
session.createProducer(this.getMessageTopic());
                        Message msg =
                                session.createMessage();
                        msg.setLongProperty("messageID", message.getId());
                        msg.setStringProperty("messageXML",
message.getMessage());
                        producer.send(msg);
                        producer.close();
                        connection.close();
                        this.getLogger().debug("[MessageReceiverBean] ::
Message ("+msg+") was sent successful via JMS. Others middle-ware
applications should care about the next steps...");
                } catch (JMSException e) {
                        if(null != connection)
                                try {
                                        connection.close();
                                } catch(Exception e1) {}

                        throw e;
                }
        }



Thanks.


On 10/6/09 6:24 AM, "Nigel Deakin" <Nigel.Deakin_at_Sun.COM> wrote:

> imqcmd list dst