1 22 package org.jboss.mq; 23 24 import java.io.Serializable ; 25 26 import javax.jms.JMSException ; 27 import javax.jms.QueueSession ; 28 import javax.jms.Session ; 29 import javax.jms.TopicSession ; 30 import javax.jms.XAConnection ; 31 import javax.jms.XAQueueConnection ; 32 import javax.jms.XAQueueSession ; 33 import javax.jms.XASession ; 34 import javax.jms.XATopicConnection ; 35 import javax.jms.XATopicSession ; 36 37 44 public class SpyXAConnection extends SpyConnection implements Serializable , XAConnection , XATopicConnection , XAQueueConnection ![JavaDoc](../../../../cmn/javadoc.gif) 45 { 46 47 static final long serialVersionUID = 1258716704996031025L; 48 49 57 public SpyXAConnection(String userid, String password, GenericConnectionFactory gcf) throws JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 58 { 59 super(userid, password, gcf); 60 } 61 62 68 public SpyXAConnection(GenericConnectionFactory gcf) throws JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 69 { 70 super(gcf); 71 } 72 73 public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 74 { 75 return createXASession(); 76 } 77 78 public QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 79 { 80 return (QueueSession ) createXAQueueSession(); 81 } 82 83 public TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 84 { 85 return (TopicSession ) createXATopicSession(); 86 } 87 88 public XASession createXASession() throws JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 89 { 90 checkClosed(); 91 checkClientID(); 92 93 XASession session = new SpySession(this, true, 0, true); 94 synchronized (createdSessions) 96 { 97 createdSessions.add(session); 98 } 99 return session; 100 } 101 102 public XAQueueSession createXAQueueSession() throws JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 103 { 104 checkClosed(); 105 checkClientID(); 106 107 XAQueueSession session = new SpyQueueSession(this, true, 0, true); 108 109 synchronized (createdSessions) 111 { 112 createdSessions.add(session); 113 } 114 115 return session; 116 } 117 118 public XATopicSession createXATopicSession() throws javax.jms.JMSException ![JavaDoc](../../../../cmn/javadoc.gif) 119 { 120 checkClosed(); 121 checkClientID(); 122 123 XATopicSession session = new SpyTopicSession(this, true, 0, true); 124 synchronized (createdSessions) 126 { 127 createdSessions.add(session); 128 } 129 return session; 130 } 131 } | Popular Tags |