org.springframework.jms.core.JmsTemplate and other
JMS-accessing gateway helpers, defining common properties such as the
JMS ConnectionFactory to operate on. The subclass
org.springframework.jms.support.destination.JmsDestinationAccessor
adds further, destination-related properties.
Not intended to be used directly.
See org..
org.springframework.jms.support.destination.JmsDestinationAccessor , org.springframework.jms.core.JmsTemplate
| Modifier and Type | Field and Description |
|---|---|
| private ConnectionFactory | |
| protected final Log | logger
Logger available to subclasses. |
| private int | |
| private static final Map | sessionConstants
Map of constant names to constant values for the constants defined in
|
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| protected JmsException | convertJmsAccessException(JMSException
the original checked ex)JMSException to convertConvert the specified checked |
| protected Connection | Returns: the new JMS ConnectionCreate a JMS Connection via this template's ConnectionFactory. |
| protected Session | Returns: the new JMS Sessionthe JMS Connection to create a Session for con)Create a JMS Session for the given Connection. |
| public ConnectionFactory | getConnectionFactory()
Return the ConnectionFactory that this accessor uses for obtaining
JMS |
| public int | |
| protected boolean | Returns: whether the given Session is in client acknowledge modethe JMS Session to check session)Determine whether the given Session is in client acknowledge mode. |
| public boolean | isSessionTransacted()
Return whether the JMS |
| protected final ConnectionFactory | Returns: the ConnectionFactory (nevernull)Obtain the ConnectionFactory for actual use. |
| public void | setConnectionFactory(ConnectionFactory connectionFactory)
Set the ConnectionFactory to use for obtaining JMS |
| public void | setSessionAcknowledgeMode(int
the acknowledgement mode constant sessionAcknowledgeMode)Set the JMS acknowledgement mode that is used when creating a JMS
|
| public void | setSessionAcknowledgeModeName(String
the name of the constantName)Session acknowledge mode constantSet the JMS acknowledgement mode by the name of the corresponding constant in
the JMS |
| public void | setSessionTransacted(boolean sessionTransacted)
Set the transaction mode that is used when creating a JMS |
| connectionFactory | back to summary |
|---|---|
| private ConnectionFactory connectionFactory
| |
| logger | back to summary |
|---|---|
| protected final Log logger Logger available to subclasses. | |
| sessionAcknowledgeMode | back to summary |
|---|---|
| private int sessionAcknowledgeMode | |
| sessionConstants | back to summary |
|---|---|
| private static final Map<String, Integer> sessionConstants Map of constant names to constant values for the constants defined in
| |
| sessionTransacted | back to summary |
|---|---|
| private boolean sessionTransacted | |
| JmsAccessor | back to summary |
|---|---|
| public JmsAccessor() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| convertJmsAccessException | back to summary |
|---|---|
| protected JmsException convertJmsAccessException(JMSException ex) Convert the specified checked The default implementation delegates to the
| |
| createConnection | back to summary |
|---|---|
| protected Connection createConnection() throws JMSException Create a JMS Connection via this template's ConnectionFactory. This implementation uses JMS 1.1 API.
| |
| createSession | back to summary |
|---|---|
| protected Session createSession(Connection con) throws JMSException Create a JMS Session for the given Connection. This implementation uses JMS 1.1 API.
| |
| getConnectionFactory | back to summary |
|---|---|
| public ConnectionFactory getConnectionFactory() Return the ConnectionFactory that this accessor uses for obtaining
JMS
| |
| getSessionAcknowledgeMode | back to summary |
|---|---|
| public int getSessionAcknowledgeMode() Return the acknowledgement mode for JMS | |
| isClientAcknowledge | back to summary |
|---|---|
| protected boolean isClientAcknowledge(Session session) throws JMSException Determine whether the given Session is in client acknowledge mode. This implementation uses JMS 1.1 API.
| |
| isSessionTransacted | back to summary |
|---|---|
| public boolean isSessionTransacted() Return whether the JMS
| |
| obtainConnectionFactory | back to summary |
|---|---|
| protected final ConnectionFactory obtainConnectionFactory() Obtain the ConnectionFactory for actual use.
| |
| setConnectionFactory | back to summary |
|---|---|
| public void setConnectionFactory(ConnectionFactory connectionFactory) Set the ConnectionFactory to use for obtaining JMS | |
| setSessionAcknowledgeMode | back to summary |
|---|---|
| public void setSessionAcknowledgeMode(int sessionAcknowledgeMode) Set the JMS acknowledgement mode that is used when creating a JMS
Default is Vendor-specific extensions to the acknowledgement mode can be set here as well. Note that inside an EJB, the parameters to the
| |
| setSessionAcknowledgeModeName | back to summary |
|---|---|
| public void setSessionAcknowledgeModeName(String constantName) Set the JMS acknowledgement mode by the name of the corresponding constant in
the JMS If you want to use vendor-specific extensions to the acknowledgement mode,
use | |
| setSessionTransacted | back to summary |
|---|---|
| public void setSessionTransacted(boolean sessionTransacted) Set the transaction mode that is used when creating a JMS Note that within a JTA transaction, the parameters passed to
Setting this flag to "true" will use a short local JMS transaction when running outside a managed transaction, and a synchronized local JMS transaction in case of a managed transaction (other than an XA transaction) being present. This has the effect of a local JMS transaction being managed alongside the main transaction (which might be a native JDBC transaction), with the JMS transaction committing right after the main transaction. | |