Package org.bluezoo.gumdrop.servlet.jndi
Class JmsConnectionFactory
java.lang.Object
org.bluezoo.gumdrop.servlet.jndi.Resource
org.bluezoo.gumdrop.servlet.jndi.JmsConnectionFactory
Corresponds to a
jms-connection-factory element in a
deployment descriptor.- Author:
- Chris Burdess
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConnection pool configuration for a JMS connection factory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) Add the specified configuration property to this resource.Returns the name of the provider class.Returns the name of the interface under which this will be bound to JNDI.getName()Returns the name that this resource will be bound into JNDI under.voidinit(Attributes config) Initialize this resource from the specified attributes.voidsetClassName(String className) Sets the fully-qualified class name of the connection factory implementation.voidsetClientId(String clientId) Sets the client identifier for this connection factory.voidsetDescription(String description) Sets a description of this JMS connection factory.voidsetInterfaceName(String interfaceName) Sets the fully-qualified interface name that this connection factory implements.voidSets the JNDI name by which this connection factory will be registered.voidsetPassword(String password) Sets the password for JMS server authentication.voidSets the connection pool configuration.voidsetResourceAdapter(String resourceAdapter) Sets the name of the resource adapter to use.voidsetTransactional(boolean transactional) Sets whether connections created by this factory are transactional.voidSets the user name for JMS server authentication.Methods inherited from class org.bluezoo.gumdrop.servlet.jndi.Resource
close, init, newInstance
-
Constructor Details
-
JmsConnectionFactory
public JmsConnectionFactory()
-
-
Method Details
-
setDescription
Sets a description of this JMS connection factory. Corresponds to thedescriptionelement withinjms-connection-factoryin the deployment descriptor.- Parameters:
description- a textual description of this connection factory- See Also:
-
setName
Sets the JNDI name by which this connection factory will be registered. Corresponds to thenameelement 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
Sets the fully-qualified interface name that this connection factory implements. Corresponds to theinterface-nameelement in the deployment descriptor.Common values are
javax.jms.ConnectionFactory,javax.jms.QueueConnectionFactory, orjavax.jms.TopicConnectionFactory.- Parameters:
interfaceName- the connection factory interface class name- See Also:
-
setClassName
Sets the fully-qualified class name of the connection factory implementation. Corresponds to theclass-nameelement in the deployment descriptor.- Parameters:
className- the connection factory implementation class name- See Also:
-
setUser
Sets the user name for JMS server authentication. Corresponds to theuserelement in the deployment descriptor.- Parameters:
user- the JMS server user name- See Also:
-
setPassword
Sets the password for JMS server authentication. Corresponds to thepasswordelement in the deployment descriptor.- Parameters:
password- the JMS server password- See Also:
-
setClientId
Sets the client identifier for this connection factory. Corresponds to theclient-idelement 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 thetransactionalelement in the deployment descriptor.When
true, connections participate in container-managed transactions.- Parameters:
transactional-trueif connections should be transactional- See Also:
-
setPool
Sets the connection pool configuration. Corresponds to thepoolelement in the deployment descriptor.- Parameters:
pool- the connection pool configuration- See Also:
-
setResourceAdapter
Sets the name of the resource adapter to use. Corresponds to theresource-adapterelement in the deployment descriptor.- Parameters:
resourceAdapter- the resource adapter name- See Also:
-
addProperty
Description copied from class:ResourceAdd the specified configuration property to this resource.- Specified by:
addPropertyin classResource
-
init
Description copied from class:ResourceInitialize this resource from the specified attributes. -
getName
Description copied from class:ResourceReturns the name that this resource will be bound into JNDI under. -
getClassName
Description copied from class:ResourceReturns the name of the provider class.- Specified by:
getClassNamein classResource
-
getInterfaceName
Description copied from class:ResourceReturns the name of the interface under which this will be bound to JNDI.- Specified by:
getInterfaceNamein classResource
-