1 18 package org.apache.activemq.ra; 19 20 import javax.jms.*; 21 22 import org.apache.activemq.ActiveMQConnectionMetaData; 23 24 31 public class InboundConnectionProxy implements Connection, QueueConnection, TopicConnection { 32 33 public Session createSession(boolean transacted, int ackMode) throws JMSException { 34 return new InboundSessionProxy(); 36 } 37 38 public QueueSession createQueueSession(boolean transacted, int ackMode) throws JMSException { 39 return new InboundSessionProxy(); 41 } 42 43 public TopicSession createTopicSession(boolean transacted, int ackMode) throws JMSException { 44 return new InboundSessionProxy(); 46 } 47 48 public void start() throws JMSException { 49 } 51 52 public void stop() throws JMSException { 53 } 55 56 public void close() throws JMSException { 57 } 59 60 public ConnectionMetaData getMetaData() throws JMSException { 61 return ActiveMQConnectionMetaData.INSTANCE; 62 } 63 64 public String getClientID() throws JMSException { 65 throw createNotSupported("getClientID()"); 66 } 67 68 public void setClientID(String s) throws JMSException { 69 throw createNotSupported("setClient()"); 70 } 71 72 public ExceptionListener getExceptionListener() throws JMSException { 73 throw createNotSupported("getExceptionListener()"); 74 } 75 76 public void setExceptionListener(ExceptionListener exceptionListener) throws JMSException { 77 throw createNotSupported("setExceptionListener()"); 78 } 79 80 public ConnectionConsumer createConnectionConsumer(Destination destination, String s, ServerSessionPool serverSessionPool, int i) throws JMSException { 81 throw createNotSupported("createConnectionConsumer()"); 82 } 83 84 public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String s, String s1, ServerSessionPool serverSessionPool, int i) throws JMSException { 85 throw createNotSupported("createDurableConnectionConsumer()"); 86 } 87 88 public ConnectionConsumer createConnectionConsumer(Queue queue, String s, ServerSessionPool serverSessionPool, int i) throws JMSException { 89 throw createNotSupported("createConnectionConsumer()"); 90 } 91 92 public ConnectionConsumer createConnectionConsumer(Topic topic, String s, ServerSessionPool serverSessionPool, int i) throws JMSException { 93 throw createNotSupported("createConnectionConsumer()"); 94 } 95 96 protected JMSException createNotSupported(String text) { 97 return new JMSException("Operation: " + text + " is not supported for this proxy JCA ResourceAdapter provider"); 98 } 99 } 100 | Popular Tags |