Class JmsConnectionFactory

java.lang.Object
org.bluezoo.gumdrop.servlet.jndi.Resource
org.bluezoo.gumdrop.servlet.jndi.JmsConnectionFactory

public final class JmsConnectionFactory extends Resource
Corresponds to a jms-connection-factory element in a deployment descriptor.
Author:
Chris Burdess
  • Constructor Details

    • JmsConnectionFactory

      public JmsConnectionFactory()
  • Method Details

    • setDescription

      public void setDescription(String description)
      Sets a description of this JMS connection factory. Corresponds to the description element within jms-connection-factory in the deployment descriptor.
      Parameters:
      description - a textual description of this connection factory
      See Also:
    • setName

      public void setName(String name)
      Sets the JNDI name by which this connection factory will be registered. Corresponds to the name element in the deployment descriptor.

      The name must be a valid JNDI name, typically in the form java:comp/env/jms/MyConnectionFactory.

      Parameters:
      name - the JNDI name for this connection factory
      See Also:
    • setInterfaceName

      public void setInterfaceName(String interfaceName)
      Sets the fully-qualified interface name that this connection factory implements. Corresponds to the interface-name element in the deployment descriptor.

      Common values are javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory, or javax.jms.TopicConnectionFactory.

      Parameters:
      interfaceName - the connection factory interface class name
      See Also:
    • setClassName

      public void setClassName(String className)
      Sets the fully-qualified class name of the connection factory implementation. Corresponds to the class-name element in the deployment descriptor.
      Parameters:
      className - the connection factory implementation class name
      See Also:
    • setUser

      public void setUser(String user)
      Sets the user name for JMS server authentication. Corresponds to the user element in the deployment descriptor.
      Parameters:
      user - the JMS server user name
      See Also:
    • setPassword

      public void setPassword(String password)
      Sets the password for JMS server authentication. Corresponds to the password element in the deployment descriptor.
      Parameters:
      password - the JMS server password
      See Also:
    • setClientId

      public void setClientId(String clientId)
      Sets the client identifier for this connection factory. Corresponds to the client-id element in the deployment descriptor.

      The client ID is used to associate connections with a durable subscription.

      Parameters:
      clientId - the JMS client identifier
      See Also:
    • setTransactional

      public void setTransactional(boolean transactional)
      Sets whether connections created by this factory are transactional. Corresponds to the transactional element in the deployment descriptor.

      When true, connections participate in container-managed transactions.

      Parameters:
      transactional - true if connections should be transactional
      See Also:
    • setPool

      public void setPool(JmsConnectionFactory.Pool pool)
      Sets the connection pool configuration. Corresponds to the pool element in the deployment descriptor.
      Parameters:
      pool - the connection pool configuration
      See Also:
    • setResourceAdapter

      public void setResourceAdapter(String resourceAdapter)
      Sets the name of the resource adapter to use. Corresponds to the resource-adapter element in the deployment descriptor.
      Parameters:
      resourceAdapter - the resource adapter name
      See Also:
    • addProperty

      public void addProperty(String name, String value)
      Description copied from class: Resource
      Add the specified configuration property to this resource.
      Specified by:
      addProperty in class Resource
    • init

      public void init(Attributes config)
      Description copied from class: Resource
      Initialize this resource from the specified attributes.
      Specified by:
      init in class Resource
    • getName

      public String getName()
      Description copied from class: Resource
      Returns the name that this resource will be bound into JNDI under.
      Specified by:
      getName in class Resource
    • getClassName

      public String getClassName()
      Description copied from class: Resource
      Returns the name of the provider class.
      Specified by:
      getClassName in class Resource
    • getInterfaceName

      public String getInterfaceName()
      Description copied from class: Resource
      Returns the name of the interface under which this will be bound to JNDI.
      Specified by:
      getInterfaceName in class Resource