Java Code Examples for org.springframework.jms.connection.JmsResourceHolder#getConnection()
The following examples show how to use
org.springframework.jms.connection.JmsResourceHolder#getConnection() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JtaUtil.java From iaf with Apache License 2.0 | 4 votes |
public static String displayTransactionStatus(TransactionStatus txStatus) { String result; result="txName ["+TransactionSynchronizationManager.getCurrentTransactionName()+"]"; if (txStatus!=null) { result+=" status new ["+txStatus.isNewTransaction()+"]"; result+=" status completeted ["+txStatus.isCompleted()+"]"; result+=" status rollbackOnly ["+txStatus.isRollbackOnly()+"]"; result+=" status hasSavepoint ["+txStatus.hasSavepoint()+"]"; } else { result+=" currently not in a transaction"; } result+=" isolation ["+TransactionSynchronizationManager.getCurrentTransactionIsolationLevel()+"]"; result+=" active ["+TransactionSynchronizationManager.isActualTransactionActive()+"]"; boolean syncActive=TransactionSynchronizationManager.isSynchronizationActive(); result+=" synchronization active ["+syncActive+"]"; result+="\n"; Map<Object, Object> resources = TransactionSynchronizationManager.getResourceMap(); result += "resources:\n"; if (resources==null) { result+=" map is null\n"; } else { for (Iterator<Object> it=resources.keySet().iterator(); it.hasNext();) { Object key = it.next(); Object resource = resources.get(key); result += ClassUtils.nameOf(key)+"("+key+"): "+ClassUtils.nameOf(resource)+"("+resource+")\n"; if (resource instanceof JmsResourceHolder) { JmsResourceHolder jrh = (JmsResourceHolder)resource; result+=" connection: "+jrh.getConnection()+", session: "+jrh.getSession()+"\n"; } } } if (syncActive) { List<TransactionSynchronization> synchronizations = TransactionSynchronizationManager.getSynchronizations(); result += "synchronizations:\n"; for (int i=0; i<synchronizations.size(); i++) { TransactionSynchronization synchronization = synchronizations.get(i); result += ClassUtils.nameOf(synchronization)+"("+synchronization+")\n"; } } return result; }
Example 2
Source File: AbstractPollingMessageListenerContainer.java From spring-analysis-note with MIT License | 2 votes |
/** * Fetch an appropriate Connection from the given JmsResourceHolder. * <p>This implementation accepts any JMS 1.1 Connection. * @param holder the JmsResourceHolder * @return an appropriate Connection fetched from the holder, * or {@code null} if none found */ @Nullable protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(); }
Example 3
Source File: JmsTemplate.java From spring-analysis-note with MIT License | 2 votes |
/** * Fetch an appropriate Connection from the given JmsResourceHolder. * <p>This implementation accepts any JMS 1.1 Connection. * @param holder the JmsResourceHolder * @return an appropriate Connection fetched from the holder, * or {@code null} if none found */ @Nullable protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(); }
Example 4
Source File: AbstractPollingMessageListenerContainer.java From java-technology-stack with MIT License | 2 votes |
/** * Fetch an appropriate Connection from the given JmsResourceHolder. * <p>This implementation accepts any JMS 1.1 Connection. * @param holder the JmsResourceHolder * @return an appropriate Connection fetched from the holder, * or {@code null} if none found */ @Nullable protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(); }
Example 5
Source File: JmsTemplate.java From java-technology-stack with MIT License | 2 votes |
/** * Fetch an appropriate Connection from the given JmsResourceHolder. * <p>This implementation accepts any JMS 1.1 Connection. * @param holder the JmsResourceHolder * @return an appropriate Connection fetched from the holder, * or {@code null} if none found */ @Nullable protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(); }
Example 6
Source File: AbstractPollingMessageListenerContainer.java From spring4-understanding with Apache License 2.0 | 2 votes |
/** * Fetch an appropriate Connection from the given JmsResourceHolder. * <p>This implementation accepts any JMS 1.1 Connection. * @param holder the JmsResourceHolder * @return an appropriate Connection fetched from the holder, * or {@code null} if none found */ protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(); }
Example 7
Source File: JmsTemplate.java From spring4-understanding with Apache License 2.0 | 2 votes |
/** * Fetch an appropriate Connection from the given JmsResourceHolder. * <p>This implementation accepts any JMS 1.1 Connection. * @param holder the JmsResourceHolder * @return an appropriate Connection fetched from the holder, * or {@code null} if none found */ protected Connection getConnection(JmsResourceHolder holder) { return holder.getConnection(); }