|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jms.support.JmsAccessor
public abstract class JmsAccessor
Base class for JmsTemplate and other JMS-accessing gateway helpers, defining common properties such as the ConnectionFactory. The subclass JmsDestinationAccessor adds further, destination-related properties.
Not intended to be used directly. See JmsTemplate.
JmsDestinationAccessor
,
JmsTemplate
Field Summary | |
---|---|
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 ConnectionFactory that this accessor uses for obtaining JMS Connections. |
int |
getSessionAcknowledgeMode()
Return the acknowledgement mode for JMS Sessions. |
boolean |
isSessionTransacted()
Return whether the JMS Sessions used are transacted. |
void |
setConnectionFactory(ConnectionFactory connectionFactory)
Set the ConnectionFactory used for obtaining JMS Connections. |
void |
setSessionAcknowledgeMode(int sessionAcknowledgeMode)
Set the JMS acknowledgement mode that is used when creating a JMS Session. |
void |
setSessionAcknowledgeModeName(String constantName)
Set the JMS acknowledgement mode by the name of the corresponding constant in the JMS Session interface, e.g. |
void |
setSessionTransacted(boolean sessionTransacted)
Set the transaction mode that is used when creating a JMS Session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Log logger
Constructor Detail |
---|
public JmsAccessor()
Method Detail |
---|
public void setConnectionFactory(ConnectionFactory connectionFactory)
public ConnectionFactory getConnectionFactory()
public void setSessionTransacted(boolean sessionTransacted)
Note that within a JTA transaction, the parameters passed to
create(Queue/Topic)Session(boolean transacted, int acknowledgeMode)
method are not taken into account. Depending on the J2EE transaction context,
the container makes its own decisions on these values. Analogously, these
parameters are not taken into account within a locally managed transaction
either, since the accessor operates on an existing JMS Session in this case.
sessionTransacted
- the transaction modeConnection.createSession(boolean, int)
public boolean isSessionTransacted()
public void setSessionAcknowledgeModeName(String constantName)
constantName
- name of the constantSession.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
,
Session.DUPS_OK_ACKNOWLEDGE
,
Connection.createSession(boolean, int)
public void setSessionAcknowledgeMode(int sessionAcknowledgeMode)
Note that that inside an EJB the parameters to create(Queue/Topic)Session(boolean transacted, int acknowledgeMode) method are not taken into account. Depending on the transaction context in the EJB, the container makes its own decisions on these values. See section 17.3.5 of the EJB Spec.
sessionAcknowledgeMode
- the acknowledgement modeSession.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
,
Session.DUPS_OK_ACKNOWLEDGE
,
Connection.createSession(boolean, int)
public int getSessionAcknowledgeMode()
public void afterPropertiesSet()
InitializingBean
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.
afterPropertiesSet
in interface InitializingBean
protected JmsException convertJmsAccessException(JMSException ex)
JMSException
to
a Spring runtime JmsException
equivalent.
Default implementation delegates to JmsUtils.
ex
- the original checked JMSException to convert
ex
JmsUtils.convertJmsAccessException(javax.jms.JMSException)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |