Do you have a second resource adapter configured for the inbound
messages to the mdb?
I seem to recall someone reporting a similar problem if they sent the
same message they received. If they copied the message into a new
message and sent that everything worked as expected. Are you sending
the same message or copying it? I don't know which behavior is
expected by the jms spec.
thanks
david jencks
On Jan 17, 2008, at 8:32 AM, Tomasz Mazan wrote:
I got MDB that listens to queue for messages.
This MDB uses ConnectionFactory to get connection to send answer to
received
message. Destination is gotten from replyTo message's field.
There's quote from my resource adapter's deployment plan:
<resourceadapter>
<resourceadapter-instance>
<resourceadapter-name>DriversJms</resourceadapter-name>
<nam:workmanager
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
<nam:gbean-link>DefaultWorkManager</nam:gbean-link>
</nam:workmanager>
</resourceadapter-instance>
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</
connectionfactory-interface>
<connectiondefinition-instance>
<name>DriversJmsXAConnectionFactory</name>
<connectionmanager>
<xa-transaction>
<transaction-caching />
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<blocking-timeout-milliseconds>5000</blocking-timeout-
milliseconds>
<select-one-assume-match/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
My driver (MDB) uses activation config from openejb-jar.xml:
<message-driven>
<ejb-name>Das220JmsDriver</ejb-name>
<nam:resource-adapter>
<nam:resource-link>DriversJms</nam:resource-link>
</nam:resource-adapter>
<activation-config>
<activation-config-property>
<activation-config-property-name>destination</activation-config-
property-name>
<activation-config-property-value>JmsDispatcherDAS220Request</
activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-
property-name>
<activation-config-property-value>javax.jms.Queue</activation-
config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-
property-name>
<activation-config-property-value>Auto-acknowledge</activation-
config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>InitialRedeliveryDelay</activation-
config-property-name>
<activation-config-property-value>30000</activation-config-property-
value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>MaximumRedeliveries</activation-
config-property-name>
<activation-config-property-value>9999</activation-config-property-
value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>maxMessagesPerSessions</activation-
config-property-name>
<activation-config-property-value>1</activation-config-property-
value>
</activation-config-property>
</activation-config>
</message-driven>
I set maxMessagesPerSessions because sometimes MDB has to consume more
messages (it depends on currently processed message - it's kind of
cleaning
queue from messages with lower priority). Now I've disabled this
functionality, but in future it should work, so I don't want to set
greater
valie for maxMessahesPerSessions.
Where's the problem ?
MDB processes let's say 7-13 messages and don't execute onMessage
until next
module restart via geronimo's console.
I've checked my MDB and I'm sure that all jms connections created
to send
response are being closed:
Connection conn = null;
Session sess = null;
MessageProducer producer = null;
try {
conn = this.createConnection();
sess = this.createSession(conn);
producer = this.createMessageProducer(sess,
replyToDest);
ObjectMessage msg = this.createMessage(sess);
msg.setObject(response);
producer.send(msg, Message.DEFAULT_DELIVERY_MODE,
originalMessage.getJMSPriority(), Message.DEFAULT_TIME_TO_LIVE);
logger.info("Success response - sent.");
} finally {
try {
if (producer != null) {
producer.close();
}
if (sess != null) {
sess.close();
}
if (conn != null) {
conn.close();
}
} catch (JMSException e) {
e.printStackTrace();
}
}
Any idea what's wrong ?
Thanks in advance
Beniamin
--
View this message in context: http://www.nabble.com/Strange-plug-
with-delivering-messages-to-MDB-tp14923100s134p14923100.html
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.