| |
|
| java.lang.Object org.springframework.jms.support.JmsAccessor
All known Subclasses: org.springframework.jms.support.destination.JmsDestinationAccessor,
Field Summary | |
final protected Log | logger |
Method Summary | |
public void | afterPropertiesSet() | protected JmsException | convertJmsAccessException(JMSException ex) Convert the specified checked
javax.jms.JMSException JMSException to
a Spring runtime
org.springframework.jms.JmsException JmsException equivalent. | protected Connection | createConnection() Create a JMS Connection via this template's ConnectionFactory. | protected Session | createSession(Connection con) Create a JMS Session for the given Connection. | public ConnectionFactory | getConnectionFactory() Return the ConnectionFactory that this accessor uses for
obtaining JMS
Connection Connections . | public int | getSessionAcknowledgeMode() Return the acknowledgement mode for JMS
Session sessions . | protected boolean | isClientAcknowledge(Session session) Determine whether the given Session is in client acknowledge mode. | public boolean | isSessionTransacted() Return whether the JMS
Session sessions used by this
accessor are supposed to be transacted. | public void | setConnectionFactory(ConnectionFactory connectionFactory) Set the ConnectionFactory to use for obtaining JMS
Connection Connections . | public void | setSessionAcknowledgeMode(int sessionAcknowledgeMode) Set the JMS acknowledgement mode that is used when creating a JMS
Session to send a message.
Default is
Session.AUTO_ACKNOWLEDGE .
Vendor-specific extensions to the acknowledgment mode can be set here as well.
Note that that inside an EJB the parameters to
create(Queue/Topic)Session(boolean transacted, int acknowledgeMode) method
are not taken into account. | public void | setSessionAcknowledgeModeName(String constantName) Set the JMS acknowledgement mode by the name of the corresponding constant
in the JMS
Session interface, e.g. | public void | setSessionTransacted(boolean sessionTransacted) Set the transaction mode that is used when creating a JMS
Session .
Default is "false".
Note that within a JTA transaction, the parameters passed to
create(Queue/Topic)Session(boolean transacted, int acknowledgeMode)
method are not taken into account. |
logger | final protected Log logger(Code) | | Logger available to subclasses
|
afterPropertiesSet | public void afterPropertiesSet()(Code) | | |
createConnection | protected Connection createConnection() throws JMSException(Code) | | Create a JMS Connection via this template's ConnectionFactory.
This implementation uses JMS 1.1 API.
the new JMS Connection throws: JMSException - if thrown by JMS API methods See Also: javax.jms.ConnectionFactory.createConnection |
createSession | protected Session createSession(Connection con) throws JMSException(Code) | | Create a JMS Session for the given Connection.
This implementation uses JMS 1.1 API.
Parameters: con - the JMS Connection to create a Session for the new JMS Session throws: JMSException - if thrown by JMS API methods See Also: javax.jms.Connection.createSession(booleanint) |
getConnectionFactory | public ConnectionFactory getConnectionFactory()(Code) | | Return the ConnectionFactory that this accessor uses for
obtaining JMS
Connection Connections .
|
getSessionAcknowledgeMode | public int getSessionAcknowledgeMode()(Code) | | Return the acknowledgement mode for JMS
Session sessions .
the acknowledgement mode applied by this accessor |
isClientAcknowledge | protected boolean isClientAcknowledge(Session session) throws JMSException(Code) | | Determine whether the given Session is in client acknowledge mode.
This implementation uses JMS 1.1 API.
Parameters: session - the JMS Session to check whether the given Session is in client acknowledge mode throws: javax.jms.JMSException - if thrown by JMS API methods See Also: javax.jms.Session.getAcknowledgeMode See Also: javax.jms.Session.CLIENT_ACKNOWLEDGE |
isSessionTransacted | public boolean isSessionTransacted()(Code) | | Return whether the JMS
Session sessions used by this
accessor are supposed to be transacted.
true if the JMS Sessions used are transacted See Also: JmsAccessor.setSessionTransacted(boolean) |
setConnectionFactory | public void setConnectionFactory(ConnectionFactory connectionFactory)(Code) | | Set the ConnectionFactory to use for obtaining JMS
Connection Connections .
|
setSessionAcknowledgeMode | public void setSessionAcknowledgeMode(int sessionAcknowledgeMode)(Code) | | Set the JMS acknowledgement mode that is used when creating a JMS
Session to send a message.
Default is
Session.AUTO_ACKNOWLEDGE .
Vendor-specific extensions to the acknowledgment mode can be set here as well.
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.
Parameters: sessionAcknowledgeMode - the acknowledgement mode See Also: javax.jms.Session.AUTO_ACKNOWLEDGE See Also: javax.jms.Session.CLIENT_ACKNOWLEDGE See Also: javax.jms.Session.DUPS_OK_ACKNOWLEDGE See Also: javax.jms.Connection.createSession(booleanint) |
setSessionAcknowledgeModeName | public void setSessionAcknowledgeModeName(String constantName)(Code) | | Set the JMS acknowledgement mode by the name of the corresponding constant
in the JMS
Session interface, e.g. "CLIENT_ACKNOWLEDGE".
If you want to use vendor-specific extensions to the acknowledgment mode,
use
JmsAccessor.setSessionAcknowledgeModeName(String) instead.
Parameters: constantName - the name of the Session acknowledge mode constant See Also: javax.jms.Session.AUTO_ACKNOWLEDGE See Also: javax.jms.Session.CLIENT_ACKNOWLEDGE See Also: javax.jms.Session.DUPS_OK_ACKNOWLEDGE See Also: javax.jms.Connection.createSession(booleanint) |
setSessionTransacted | public void setSessionTransacted(boolean sessionTransacted)(Code) | | Set the transaction mode that is used when creating a JMS
Session .
Default is "false".
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.
Setting this flag to "true" will use a short local JMS transaction
when running outside of a managed transaction, and a synchronized local
JMS transaction in case of a managed transaction (other than an XA
transaction) being present. The latter 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.
Parameters: sessionTransacted - the transaction mode See Also: javax.jms.Connection.createSession(booleanint) |
|
|
|