org.springframework.jms.support
Class JmsAccessor

java.lang.Object
  extended by org.springframework.jms.support.JmsAccessor
All Implemented Interfaces:
InitializingBean
Direct Known Subclasses:
JmsTemplate

public abstract class JmsAccessor
extends Object
implements InitializingBean

Base class for JmsTemplate and other JMS-accessing gateway helpers, defining common properties like the ConnectionFactory.

Not intended to be used directly. See JmsTemplate.

Since:
1.2
Author:
Juergen Hoeller

Field Summary
protected  ConnectionFactory connectionFactory
           
protected  Log logger
           
 
Constructor Summary
JmsAccessor()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
protected  JmsException convertJmsAccessException(JMSException ex)
          Convert the specified checked JMSException to a Spring runtime JmsException equivalent.
 ConnectionFactory getConnectionFactory()
          Return the connection factory used for obtaining JMS connections.
 void setConnectionFactory(ConnectionFactory connectionFactory)
          Set the connection factory used for obtaining JMS connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Log logger

connectionFactory

protected ConnectionFactory connectionFactory
Constructor Detail

JmsAccessor

public JmsAccessor()
Method Detail

setConnectionFactory

public void setConnectionFactory(ConnectionFactory connectionFactory)
Set the connection factory used for obtaining JMS connections.


getConnectionFactory

public ConnectionFactory getConnectionFactory()
Return the connection factory used for obtaining JMS connections.


afterPropertiesSet

public void afterPropertiesSet()
Description copied from interface: InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface InitializingBean

convertJmsAccessException

protected JmsException convertJmsAccessException(JMSException ex)
Convert the specified checked JMSException to a Spring runtime JmsException equivalent.

Default implementation delegates to JmsUtils.

Parameters:
ex - the original checked JMSException to convert
Returns:
the Spring runtime JmsException wrapping ex
See Also:
JmsUtils.convertJmsAccessException(javax.jms.JMSException)


Copyright (C) 2002-2005 The Spring Framework Project.