FileDocCategorySizeDatePackage
JmsConnectionManager.javaAPI DocJBoss 4.2.12834Fri Jul 13 21:01:16 BST 2007org.jboss.resource.adapter.jms

JmsConnectionManager

public class JmsConnectionManager extends Object implements javax.resource.spi.ConnectionManager
The resource adapters own ConnectionManager, used in non-managed environments.

Will handle some of the houskeeping an appserver nomaly does.

author
Peter Antman.
author
Adrian Brock
version
$Revision: 57189 $

Fields Summary
private static final long
serialVersionUID
private static final Logger
log
Constructors Summary
public JmsConnectionManager()
Construct a JmsConnectionManager.

   
          
     
      super();
   
Methods Summary
public java.lang.ObjectallocateConnection(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
Allocate a new connection.

param
mcf
param
cxRequestInfo
return
A new connection
throws
ResourceException Failed to create connection.

      boolean trace = log.isTraceEnabled();
      if (trace)
         log.trace("Allocating connection; mcf=" + mcf + ", cxRequestInfo=" + cxRequestInfo);
      
      ManagedConnection mc = mcf.createManagedConnection(null, cxRequestInfo);
      Object c = mc.getConnection(null, cxRequestInfo);

      if (trace)
         log.trace("Allocated connection: " + c + ", with managed connection: " + mc);
      
      return c;