Hi, folks!
I am currently planning to substitute a Message Driven Bean with a Message Driven Pojo, aiming to lower the constrain of

needing an EJBContainer in a J2EE web application. I therefore tryed to write two projects for testing the performance of both this solutions:

concerning the MDB project I subclassed the AbstractJmsMessageDrivenBean and in the onMessage() method I simply invoked 2

services, one for printing to the stdout the payload of the message and the other one to insert the payload and a timestamp in a db

by means of a Dao. I delegated the transaction management to the container, declaring the onMessage method of the MDB as transactional in the ejb deployment descriptor.

Concerning the MDP, I implemented the MessageListener interface, and, according to the MDB onMessage() method I actually

invoked again a Dao for writing the payload and a timestamp to a db and I simply outputted the payload to the console. In the

spring-config file I configured the listenerContainer as stated below.

[....]

<bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer102">
<property name="destination" ref="destination" />
<property name="messageListener" ref="messageListener"/>
<property name="connectionFactory" ref="singleConnectionFactory"/>
<property name="transactionManager" ref="transactionManager"/>
<property name="concurrentConsumers" value="5"/>
</bean>

<bean id ="singleConnectionFactory" class="org.springframework.jms.connection.SingleCo nnectionFactory102">
<property name="targetConnectionFactory" ref="jmsQueueConnectionFactory"/>
</bean>

<bean id="wsjtm" class="org.springframework.transaction.jta.WebSphe reTransactionManagerFactoryBean"/>

<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager">
<property name="transactionManager" ref="wsjtm"/>
</bean>

[....]


I set up the test envirorment and I performed some testings, varying from 1 to 10 the number of concurrentConsumer on the MDP implementation and accordingly

the number of JMS Sessions in the MDB ListenerPort for the MDB implementation. As far as I could see, the MDB is

always the better-performing-one. I also saw that raising the number of concurrentConsumers causes the gap between the two

solutions to lower. However, the MDP solution never reaches the MDB one in terms of performances. Is there

anything I can try to improve the MDP solution? Any advice is welcome.

Best Regards.
Alessio