users@glassfish.java.net

Re: MDB Singleton

From: <glassfish_at_javadesktop.org>
Date: Mon, 15 Jun 2009 10:20:52 PDT

Hi,

with the following configuration it should work. However, the MDB is created new on every call but there will only be one instance at a time consuming messages from the queue.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
<sun-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>SomeBean</ejb-name>
<jndi-name>queue/SomeBean</jndi-name>
<bean-pool>
<steady-pool-size>1</steady-pool-size>
<resize-quantity>1</resize-quantity>
<max-pool-size>1</max-pool-size>
<pool-idle-timeout-in-seconds>0</pool-idle-timeout-in-seconds>
</bean-pool>
</ejb>
</enterprise-beans>
</sun-ejb-jar>

Cheers
Chris.
[Message sent by forum member 'chrjohn' (chrjohn)]

http://forums.java.net/jive/thread.jspa?messageID=351244