Singleton MDB
lgsw_sam Jan 23, 2007 7:08 AMHi!
We are using JBoss 4.0.5 GA - ejb3, Hibernate 3.2.
Is there a way to implement singleton MDB with ejb3?
We tried
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1")
but it did not work...
We have two problems at the moment of which one is that our program tries to connect database with connection already being used. We believe that this is related to there being more than one MDB.
Another problem is that we get too many connections to database.
We get these Exceptions while connecting...
2007-01-23 13:57:58,817 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection destroy() 2007-01-23 13:57:58,817 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] handler fi.logiasoftware.jca.handlers.FTPProtocolHandler@2c902c 90 for fi.logiasoftware.jca.adapter.GenericManagedConnection@5d2c5d2c 2007-01-23 13:57:58,817 DEBUG [fi.logiasoftware.jca.handlers.FTPProtocolHandler] FTPProtocolHandler boolean isConnected() 2007-01-23 13:58:08,971 WARN [fi.logiasoftware.jca.handlers.FTPProtocolHandler] 49 IOException in connect() : Read timed out 2007-01-23 13:58:08,972 WARN [fi.logiasoftware.jca.handlers.FTPProtocolHandler] 49Could not connect to 192.194.71.123:21. 2007-01-23 13:58:08,972 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Unable to fill pool javax.resource.ResourceException: fi.logiasoftware.jca.common.ProtocolHandlerException: 49Could not connect to 192.194.71.123:21. at fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory.createManagedConnection(GenericManagedConnectionFactory.java:137) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:565) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:512) at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74) at java.lang.Thread.run(Thread.java:797) Caused by: fi.logiasoftware.jca.common.ProtocolHandlerException: 49Could not connect to 192.194.71.123:21. at fi.logiasoftware.jca.handlers.FTPProtocolHandler.connect(FTPProtocolHandler.java:119) at fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory.createManagedConnection(GenericManagedConnectionFactory.java:126) ... 4 more 2007-01-23 13:58:08,978 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory] GenericManagedConnectionFactory createManagedConnection( Subject subject, ConnectionRequestInfo o) 2007-01-23 13:58:08,978 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection GenericManagedConnection(ManagedConnec tionFactory) 2007-01-23 13:58:08,979 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection setConnection(AbstractProtocolHandler handler) 2007-01-23 13:58:08,979 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnection] GenericManagedConnection addConnectionEventListener(ConnectionE ventListener arg0) 2007-01-23 13:58:08,979 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Filling pool cl=org.jboss.resource.connectionmanager. NoTxConnectionManager$NoTxConnectionEventListener@46e046e[state=NORMAL mc=fi.logiasoftware.jca.adapter.GenericManagedConnection@4640464 handles=0 las tUse=1169553488979 permit=false trackByTx=false mcp=null context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@6fd06fd0] 2007-01-23 13:58:08,979 DEBUG [fi.logiasoftware.jca.adapter.GenericManagedConnectionFactory] GenericManagedConnectionFactory createManagedConnection( Subject subject, ConnectionRequestInfo o)
Any help would be appreciated!
Br,
Sami