mirror of https://github.com/apache/activemq.git
[AMQ-7309] Update to jakarta.jms/jakarta.jms-api:2.0.3 (#682)
- API update only - Throw UnsupportedOperationException - Disable activemq-camel from build - Formatting fixes - Use geronimo-jms for osgi-related artifacts - Fix features.xml invalid xml header - Add a unit test to confirm JMS 2.0 methods for phase 1 (throw UnsupportedOperationException) - Add deliveryTime field to Message - Minor formatting fixes
This commit is contained in:
parent
07c2704864
commit
67256c61b1
|
@ -104,7 +104,7 @@
|
||||||
<include>org.apache.activemq.protobuf:activemq-protobuf</include>
|
<include>org.apache.activemq.protobuf:activemq-protobuf</include>
|
||||||
<include>org.fusesource.hawtbuf:hawtbuf</include>
|
<include>org.fusesource.hawtbuf:hawtbuf</include>
|
||||||
<include>org.jasypt:jasypt</include>
|
<include>org.jasypt:jasypt</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
|
<include>jakarta.jms:jakarta.jms-api</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
|
||||||
|
@ -319,9 +319,9 @@
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>2.0.3</version>
|
||||||
<classifier>sources</classifier>
|
<classifier>sources</classifier>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -0,0 +1,169 @@
|
||||||
|
/**
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.apache.activemq;
|
||||||
|
|
||||||
|
import javax.jms.Connection;
|
||||||
|
import javax.jms.JMSException;
|
||||||
|
import javax.jms.MessageProducer;
|
||||||
|
import javax.jms.Session;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.AfterClass;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class ActiveMQJms2Test {
|
||||||
|
|
||||||
|
protected static ActiveMQConnectionFactory activemqConnectionFactory = null;
|
||||||
|
|
||||||
|
protected Connection connection = null;
|
||||||
|
protected Session session = null;
|
||||||
|
protected MessageProducer messageProducer = null;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpClass() {
|
||||||
|
activemqConnectionFactory = new ActiveMQConnectionFactory("vm://localhost?marshal=false&broker.persistent=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownClass() {
|
||||||
|
activemqConnectionFactory = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() throws JMSException {
|
||||||
|
connection = activemqConnectionFactory.createConnection();
|
||||||
|
connection.start();
|
||||||
|
|
||||||
|
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
|
|
||||||
|
messageProducer = session.createProducer(session.createQueue("AMQ.JMS2.TEST"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void tearDown() {
|
||||||
|
if(messageProducer != null) {
|
||||||
|
try { messageProducer.close(); } catch (Exception e) { } finally { messageProducer = null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
if(session != null) {
|
||||||
|
try { session.close(); } catch (Exception e) { } finally { session = null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
if(connection != null) {
|
||||||
|
try { connection.close(); } catch (Exception e) { } finally { connection = null; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testConnectionFactoryCreateContext() {
|
||||||
|
activemqConnectionFactory.createContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testConnectionFactoryCreateContextSession() {
|
||||||
|
activemqConnectionFactory.createContext(Session.AUTO_ACKNOWLEDGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testConnectionFactoryCreateContextUserPass() {
|
||||||
|
activemqConnectionFactory.createContext("admin", "admin");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testConnectionFactoryCreateContextUserPassSession() {
|
||||||
|
activemqConnectionFactory.createContext("admin", "admin", Session.AUTO_ACKNOWLEDGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testConnectionSharedConnectionConsumer() throws JMSException {
|
||||||
|
connection.createSharedConnectionConsumer(null, null, null, null, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testConnectionSharedDurableConnectionConsumer() throws JMSException {
|
||||||
|
connection.createSharedDurableConnectionConsumer(null, null, null, null, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testSessionAckMode() throws JMSException {
|
||||||
|
connection.createSession(Session.AUTO_ACKNOWLEDGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testSessionDurableConsumer() throws JMSException {
|
||||||
|
session.createDurableConsumer(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testSessionDurableConsumerSelectorNoLocal() throws JMSException {
|
||||||
|
session.createDurableConsumer(null, null, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testSessionSharedConsumer() throws JMSException {
|
||||||
|
session.createSharedConsumer(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testSessionSharedConsumerSelector() throws JMSException {
|
||||||
|
session.createSharedConsumer(null, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testSessionSharedDurableConsumer() throws JMSException {
|
||||||
|
session.createSharedDurableConsumer(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testSessionSharedDurableConsumerSelector() throws JMSException {
|
||||||
|
session.createSharedDurableConsumer(null, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testProducerDeliveryDelayGet() throws JMSException {
|
||||||
|
messageProducer.getDeliveryDelay();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testProducerDeliveryDelaySet() throws JMSException {
|
||||||
|
messageProducer.setDeliveryDelay(1000l);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testProducerSendMessageCompletionListener() throws JMSException {
|
||||||
|
messageProducer.send(session.createQueue("AMQ.TEST"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testProducerSendMessageQoSParamsCompletionListener() throws JMSException {
|
||||||
|
messageProducer.send(null, 1, 4, 0l, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testProducerSendDestinationMessageCompletionListener() throws JMSException {
|
||||||
|
messageProducer.send(session.createQueue("AMQ.TEST"), null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = UnsupportedOperationException.class)
|
||||||
|
public void testProducerSendDestinationMessageQosParamsCompletionListener() throws JMSException {
|
||||||
|
messageProducer.send(session.createQueue("AMQ.TEST"), null, 1, 4, 0l, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -43,8 +43,8 @@
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.fusesource.hawtbuf</groupId>
|
<groupId>org.fusesource.hawtbuf</groupId>
|
||||||
|
@ -58,12 +58,13 @@
|
||||||
<artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
|
<artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- for ftp blob upload/download -->
|
<!-- for ftp blob upload/download -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-net</groupId>
|
<groupId>commons-net</groupId>
|
||||||
<artifactId>commons-net</artifactId>
|
<artifactId>commons-net</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- for zerconf discovery -->
|
<!-- for zerconf discovery -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.jmdns</groupId>
|
<groupId>javax.jmdns</groupId>
|
||||||
|
|
|
@ -304,6 +304,44 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
||||||
return stats;
|
return stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession() throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession() is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @param acknowledgeMode indicates whether the consumer or the client will
|
||||||
|
* acknowledge any messages it receives; ignored if the
|
||||||
|
* session is transacted. Legal values are
|
||||||
|
* <code>Session.AUTO_ACKNOWLEDGE</code>,
|
||||||
|
* <code>Session.CLIENT_ACKNOWLEDGE</code>, and
|
||||||
|
* <code>Session.DUPS_OK_ACKNOWLEDGE</code>.
|
||||||
|
* @return a newly created session
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @see Session#AUTO_ACKNOWLEDGE
|
||||||
|
* @see Session#CLIENT_ACKNOWLEDGE
|
||||||
|
* @see Session#DUPS_OK_ACKNOWLEDGE
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession(int sessionMode) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession(int sessionMode) is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a <CODE>Session</CODE> object.
|
* Creates a <CODE>Session</CODE> object.
|
||||||
*
|
*
|
||||||
|
@ -826,10 +864,32 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
||||||
return new ActiveMQConnectionConsumer(this, sessionPool, info);
|
return new ActiveMQConnectionConsumer(this, sessionPool, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Properties
|
/**
|
||||||
// -------------------------------------------------------------------------
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool,
|
||||||
|
int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool,
|
||||||
|
int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
* Returns true if this connection has been started
|
* Returns true if this connection has been started
|
||||||
*
|
*
|
||||||
* @return true if this Connection is started
|
* @return true if this Connection is started
|
||||||
|
|
|
@ -27,6 +27,7 @@ import java.util.concurrent.RejectedExecutionHandler;
|
||||||
import javax.jms.Connection;
|
import javax.jms.Connection;
|
||||||
import javax.jms.ConnectionFactory;
|
import javax.jms.ConnectionFactory;
|
||||||
import javax.jms.ExceptionListener;
|
import javax.jms.ExceptionListener;
|
||||||
|
import javax.jms.JMSContext;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.QueueConnection;
|
import javax.jms.QueueConnection;
|
||||||
import javax.jms.QueueConnectionFactory;
|
import javax.jms.QueueConnectionFactory;
|
||||||
|
@ -285,6 +286,38 @@ public class ActiveMQConnectionFactory extends JNDIBaseStorable implements Conne
|
||||||
public TopicConnection createTopicConnection(String userName, String password) throws JMSException {
|
public TopicConnection createTopicConnection(String userName, String password) throws JMSException {
|
||||||
return createActiveMQConnection(userName, password);
|
return createActiveMQConnection(userName, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext() {
|
||||||
|
throw new UnsupportedOperationException("createContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password) {
|
||||||
|
throw new UnsupportedOperationException("createContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password, int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the StatsImpl associated with this ConnectionFactory.
|
* @return the StatsImpl associated with this ConnectionFactory.
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
|
import javax.jms.CompletionListener;
|
||||||
import javax.jms.Destination;
|
import javax.jms.Destination;
|
||||||
import javax.jms.IllegalStateException;
|
import javax.jms.IllegalStateException;
|
||||||
import javax.jms.InvalidDestinationException;
|
import javax.jms.InvalidDestinationException;
|
||||||
|
@ -220,7 +221,43 @@ public class ActiveMQMessageProducer extends ActiveMQMessageProducerSupport impl
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
|
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
|
||||||
this.send(destination, message, deliveryMode, priority, timeToLive, null);
|
this.send(destination, message, deliveryMode, priority, timeToLive, (AsyncCallback)null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param message the message to send
|
||||||
|
* @param CompletionListener to callback
|
||||||
|
* @throws JMSException if the JMS provider fails to send the message due to
|
||||||
|
* some internal error.
|
||||||
|
* @throws UnsupportedOperationException if an invalid destination is
|
||||||
|
* specified.
|
||||||
|
* @throws InvalidDestinationException if a client uses this method with an
|
||||||
|
* invalid destination.
|
||||||
|
* @see javax.jms.Session#createProducer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void send(Message message, CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Message, CompletionListener) is not supported");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Message message, int deliveryMode, int priority, long timeToLive,
|
||||||
|
CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Message, deliveryMode, priority, timetoLive, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Destination destination, Message message, CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Destination, Message, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive,
|
||||||
|
CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Destination, Message, deliveryMode, priority, timetoLive, CompletionListener) is not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void send(Message message, AsyncCallback onComplete) throws JMSException {
|
public void send(Message message, AsyncCallback onComplete) throws JMSException {
|
||||||
|
|
|
@ -42,6 +42,31 @@ public abstract class ActiveMQMessageProducerSupport implements MessageProducer,
|
||||||
disableMessageTimestamp = session.connection.isDisableTimeStampsByDefault();
|
disableMessageTimestamp = session.connection.isDisableTimeStampsByDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the delivery delay associated with this <CODE>MessageProducer</CODE>.
|
||||||
|
*
|
||||||
|
* @return this producer's <CODE>DeliveryDely/ <CODE>
|
||||||
|
* @throws JMSException if the JMS provider fails to close the producer due to
|
||||||
|
* some internal error.
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setDeliveryDelay(long deliveryDelay) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("setDeliveryDelay() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the delivery delay value for this <CODE>MessageProducer</CODE>.
|
||||||
|
*
|
||||||
|
* @return the delivery delay for this messageProducer
|
||||||
|
* @throws javax.jms.JMSException if the JMS provider fails to determine if deliver delay is
|
||||||
|
* disabled due to some internal error.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public long getDeliveryDelay() throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("getDeliveryDelay() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether message IDs are disabled.
|
* Sets whether message IDs are disabled.
|
||||||
* <P>
|
* <P>
|
||||||
|
|
|
@ -104,6 +104,37 @@ public class ActiveMQQueueSession implements QueueSession {
|
||||||
}
|
}
|
||||||
return next.createConsumer(destination, messageSelector, noLocal);
|
return next.createConsumer(destination, messageSelector, noLocal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a QueueSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a QueueSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a QueueSession");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a QueueSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a QueueSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a QueueSession");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException {
|
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException {
|
||||||
|
|
|
@ -1381,8 +1381,38 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
||||||
}
|
}
|
||||||
return new ActiveMQTopic(topicName);
|
return new ActiveMQTopic(topicName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name, messageSelector, noLocal) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* Creates a durable subscriber to the specified topic.
|
* Creates a durable subscriber to the specified topic.
|
||||||
* <P>
|
* <P>
|
||||||
* If a client needs to receive all the messages published on a topic,
|
* If a client needs to receive all the messages published on a topic,
|
||||||
|
|
|
@ -137,7 +137,38 @@ public class ActiveMQTopicSession implements TopicSession {
|
||||||
return next.createConsumer(destination, messageSelector, noLocal);
|
return next.createConsumer(destination, messageSelector, noLocal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a TopicSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a TopicSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a TopicSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a TopicSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a TopicSession");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException {
|
||||||
|
throw new IllegalStateException("Operation not supported by a TopicSession");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* @param topic
|
* @param topic
|
||||||
* @param name
|
* @param name
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.util.Properties;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.XAConnection;
|
import javax.jms.XAConnection;
|
||||||
import javax.jms.XAConnectionFactory;
|
import javax.jms.XAConnectionFactory;
|
||||||
|
import javax.jms.XAJMSContext;
|
||||||
import javax.jms.XAQueueConnection;
|
import javax.jms.XAQueueConnection;
|
||||||
import javax.jms.XAQueueConnectionFactory;
|
import javax.jms.XAQueueConnectionFactory;
|
||||||
import javax.jms.XATopicConnection;
|
import javax.jms.XATopicConnection;
|
||||||
|
@ -79,6 +80,16 @@ public class ActiveMQXAConnectionFactory extends ActiveMQConnectionFactory imple
|
||||||
public XATopicConnection createXATopicConnection(String userName, String password) throws JMSException {
|
public XATopicConnection createXATopicConnection(String userName, String password) throws JMSException {
|
||||||
return (XATopicConnection) createActiveMQConnection(userName, password);
|
return (XATopicConnection) createActiveMQConnection(userName, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XAJMSContext createXAContext() {
|
||||||
|
throw new UnsupportedOperationException("createXAContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XAJMSContext createXAContext(String userName, String password) {
|
||||||
|
throw new UnsupportedOperationException("createXAContext(userName, password) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
protected ActiveMQConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception {
|
protected ActiveMQConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception {
|
||||||
ActiveMQXAConnection connection = new ActiveMQXAConnection(transport, getClientIdGenerator(), getConnectionIdGenerator(), stats);
|
ActiveMQXAConnection connection = new ActiveMQXAConnection(transport, getClientIdGenerator(), getConnectionIdGenerator(), stats);
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.util.Properties;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.XAConnection;
|
import javax.jms.XAConnection;
|
||||||
import javax.jms.XAConnectionFactory;
|
import javax.jms.XAConnectionFactory;
|
||||||
|
import javax.jms.XAJMSContext;
|
||||||
import javax.jms.XAQueueConnection;
|
import javax.jms.XAQueueConnection;
|
||||||
import javax.jms.XAQueueConnectionFactory;
|
import javax.jms.XAQueueConnectionFactory;
|
||||||
import javax.jms.XATopicConnection;
|
import javax.jms.XATopicConnection;
|
||||||
|
@ -73,6 +74,16 @@ public class ActiveMQXASslConnectionFactory extends ActiveMQSslConnectionFactory
|
||||||
return (XATopicConnection) createActiveMQConnection(userName, password);
|
return (XATopicConnection) createActiveMQConnection(userName, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XAJMSContext createXAContext() {
|
||||||
|
throw new UnsupportedOperationException("createXAContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XAJMSContext createXAContext(String userName, String password) {
|
||||||
|
throw new UnsupportedOperationException("createXAContext(userName, password) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ActiveMQConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception {
|
protected ActiveMQConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception {
|
||||||
ActiveMQXAConnection connection = new ActiveMQXAConnection(transport, getClientIdGenerator(), getConnectionIdGenerator(), stats);
|
ActiveMQXAConnection connection = new ActiveMQXAConnection(transport, getClientIdGenerator(), getConnectionIdGenerator(), stats);
|
||||||
|
|
|
@ -784,4 +784,25 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
|
||||||
//which is already marshalled
|
//which is already marshalled
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getJMSDeliveryTime() throws JMSException {
|
||||||
|
return deliveryTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setJMSDeliveryTime(long deliveryTime) throws JMSException {
|
||||||
|
this.deliveryTime = deliveryTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> T getBody(Class<T> c) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("getBody(Class<T>) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isBodyAssignableTo(Class c) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("isBodyAssignableTo(Class) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ public abstract class Message extends BaseCommand implements MarshallAware, Mess
|
||||||
protected ActiveMQDestination destination;
|
protected ActiveMQDestination destination;
|
||||||
protected TransactionId transactionId;
|
protected TransactionId transactionId;
|
||||||
|
|
||||||
|
protected long deliveryTime;
|
||||||
protected long expiration;
|
protected long expiration;
|
||||||
protected long timestamp;
|
protected long timestamp;
|
||||||
protected long arrival;
|
protected long arrival;
|
||||||
|
@ -143,6 +144,7 @@ public abstract class Message extends BaseCommand implements MarshallAware, Mess
|
||||||
copy.messageId = messageId != null ? messageId.copy() : null;
|
copy.messageId = messageId != null ? messageId.copy() : null;
|
||||||
copy.originalDestination = originalDestination;
|
copy.originalDestination = originalDestination;
|
||||||
copy.originalTransactionId = originalTransactionId;
|
copy.originalTransactionId = originalTransactionId;
|
||||||
|
copy.deliveryTime = deliveryTime;
|
||||||
copy.expiration = expiration;
|
copy.expiration = expiration;
|
||||||
copy.timestamp = timestamp;
|
copy.timestamp = timestamp;
|
||||||
copy.correlationId = correlationId;
|
copy.correlationId = correlationId;
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
|
|
||||||
<!-- geronimo -->
|
<!-- geronimo -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.components</groupId>
|
<groupId>org.apache.geronimo.components</groupId>
|
||||||
|
|
|
@ -162,6 +162,44 @@ public class PooledConnection implements TopicConnection, QueueConnection, Poole
|
||||||
return (TopicSession) createSession(transacted, ackMode);
|
return (TopicSession) createSession(transacted, ackMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession() throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession() is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @param acknowledgeMode indicates whether the consumer or the client will
|
||||||
|
* acknowledge any messages it receives; ignored if the
|
||||||
|
* session is transacted. Legal values are
|
||||||
|
* <code>Session.AUTO_ACKNOWLEDGE</code>,
|
||||||
|
* <code>Session.CLIENT_ACKNOWLEDGE</code>, and
|
||||||
|
* <code>Session.DUPS_OK_ACKNOWLEDGE</code>.
|
||||||
|
* @return a newly created session
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @see Session#AUTO_ACKNOWLEDGE
|
||||||
|
* @see Session#CLIENT_ACKNOWLEDGE
|
||||||
|
* @see Session#DUPS_OK_ACKNOWLEDGE
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession(int sessionMode) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession(int sessionMode) is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Session createSession(boolean transacted, int ackMode) throws JMSException {
|
public Session createSession(boolean transacted, int ackMode) throws JMSException {
|
||||||
PooledSession result = (PooledSession) pool.createSession(transacted, ackMode);
|
PooledSession result = (PooledSession) pool.createSession(transacted, ackMode);
|
||||||
|
@ -175,6 +213,28 @@ public class PooledConnection implements TopicConnection, QueueConnection, Poole
|
||||||
result.addSessionEventListener(this);
|
result.addSessionEventListener(this);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool,
|
||||||
|
int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool,
|
||||||
|
int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
// Implementation methods
|
// Implementation methods
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
|
@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
import javax.jms.Connection;
|
import javax.jms.Connection;
|
||||||
import javax.jms.ConnectionFactory;
|
import javax.jms.ConnectionFactory;
|
||||||
|
import javax.jms.JMSContext;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.QueueConnection;
|
import javax.jms.QueueConnection;
|
||||||
import javax.jms.QueueConnectionFactory;
|
import javax.jms.QueueConnectionFactory;
|
||||||
|
@ -271,6 +272,38 @@ public class PooledConnectionFactory implements ConnectionFactory, QueueConnecti
|
||||||
return newPooledConnection(connection);
|
return newPooledConnection(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext() {
|
||||||
|
throw new UnsupportedOperationException("createContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password) {
|
||||||
|
throw new UnsupportedOperationException("createContext(userName, password) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password, int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext(userName, password, sessionMode) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext(sessionMode) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
protected Connection newPooledConnection(ConnectionPool connection) {
|
protected Connection newPooledConnection(ConnectionPool connection) {
|
||||||
return new PooledConnection(connection);
|
return new PooledConnection(connection);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.jms.pool;
|
package org.apache.activemq.jms.pool;
|
||||||
|
|
||||||
|
import javax.jms.CompletionListener;
|
||||||
import javax.jms.Destination;
|
import javax.jms.Destination;
|
||||||
import javax.jms.InvalidDestinationException;
|
import javax.jms.InvalidDestinationException;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
|
@ -95,6 +96,68 @@ public class PooledProducer implements MessageProducer {
|
||||||
messageProducer.send(destination, message, deliveryMode, priority, timeToLive);
|
messageProducer.send(destination, message, deliveryMode, priority, timeToLive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param message the message to send
|
||||||
|
* @param CompletionListener to callback
|
||||||
|
* @throws JMSException if the JMS provider fails to send the message due to
|
||||||
|
* some internal error.
|
||||||
|
* @throws UnsupportedOperationException if an invalid destination is
|
||||||
|
* specified.
|
||||||
|
* @throws InvalidDestinationException if a client uses this method with an
|
||||||
|
* invalid destination.
|
||||||
|
* @see javax.jms.Session#createProducer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void send(Message message, CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Message, CompletionListener) is not supported");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Message message, int deliveryMode, int priority, long timeToLive,
|
||||||
|
CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Message, deliveryMode, priority, timetoLive, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Destination destination, Message message, CompletionListener completionListener)
|
||||||
|
throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Destination, Message, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive,
|
||||||
|
CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Destination, Message, deliveryMode, priority, timetoLive, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the delivery delay associated with this <CODE>MessageProducer</CODE>.
|
||||||
|
*
|
||||||
|
* @return this producer's <CODE>DeliveryDely/ <CODE>
|
||||||
|
* @throws JMSException if the JMS provider fails to close the producer due to
|
||||||
|
* some internal error.
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setDeliveryDelay(long deliveryDelay) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("setDeliveryDelay() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the delivery delay value for this <CODE>MessageProducer</CODE>.
|
||||||
|
*
|
||||||
|
* @return the delivery delay for this messageProducer
|
||||||
|
* @throws javax.jms.JMSException if the JMS provider fails to determine if deliver delay is
|
||||||
|
* disabled due to some internal error.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public long getDeliveryDelay() throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("getDeliveryDelay() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Destination getDestination() {
|
public Destination getDestination() {
|
||||||
|
|
|
@ -360,6 +360,36 @@ public class PooledSession implements Session, TopicSession, QueueSession, XASes
|
||||||
public QueueReceiver createReceiver(Queue queue, String selector) throws JMSException {
|
public QueueReceiver createReceiver(Queue queue, String selector) throws JMSException {
|
||||||
return addQueueReceiver(((QueueSession) getInternalSession()).createReceiver(queue, selector));
|
return addQueueReceiver(((QueueSession) getInternalSession()).createReceiver(queue, selector));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name, messageSelector, noLocal) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
// Producer related methods
|
// Producer related methods
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
|
@ -39,6 +39,7 @@ import javax.jms.TopicPublisher;
|
||||||
import javax.jms.TopicSession;
|
import javax.jms.TopicSession;
|
||||||
import javax.jms.XAConnection;
|
import javax.jms.XAConnection;
|
||||||
import javax.jms.XAConnectionFactory;
|
import javax.jms.XAConnectionFactory;
|
||||||
|
import javax.jms.XAJMSContext;
|
||||||
import javax.naming.spi.ObjectFactory;
|
import javax.naming.spi.ObjectFactory;
|
||||||
import javax.transaction.HeuristicMixedException;
|
import javax.transaction.HeuristicMixedException;
|
||||||
import javax.transaction.HeuristicRollbackException;
|
import javax.transaction.HeuristicRollbackException;
|
||||||
|
@ -419,6 +420,16 @@ public class XAConnectionPoolTest extends JmsPoolTestSupport {
|
||||||
this.connectionFactory = connectionFactory;
|
this.connectionFactory = connectionFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XAJMSContext createXAContext() {
|
||||||
|
throw new UnsupportedOperationException("createXAContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XAJMSContext createXAContext(String userName, String password) {
|
||||||
|
throw new UnsupportedOperationException("createXAContext(userName, password) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public XAConnection createXAConnection() throws JMSException {
|
public XAConnection createXAConnection() throws JMSException {
|
||||||
return connectionFactory.createXAConnection();
|
return connectionFactory.createXAConnection();
|
||||||
|
|
|
@ -34,6 +34,12 @@
|
||||||
<groupId>org.apache.activemq</groupId>
|
<groupId>org.apache.activemq</groupId>
|
||||||
<artifactId>activemq-client</artifactId>
|
<artifactId>activemq-client</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>jakarta.jms</groupId>
|
||||||
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.activemq</groupId>
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ActiveMQBrokerNdCamelFeatureTest extends AbstractFeatureTest {
|
||||||
public static Option[] configure() {
|
public static Option[] configure() {
|
||||||
return new Option[] //
|
return new Option[] //
|
||||||
{
|
{
|
||||||
composite(configure("activemq", "activemq-camel")),
|
composite(configure("activemq", "camel-jms")),
|
||||||
editConfigurationFilePut("etc/system.properties", "camel.version", camelVersion()),
|
editConfigurationFilePut("etc/system.properties", "camel.version", camelVersion()),
|
||||||
replaceConfigurationFile("etc/activemq.xml", new File(RESOURCE_BASE + "activemq-nd-camel.xml")),
|
replaceConfigurationFile("etc/activemq.xml", new File(RESOURCE_BASE + "activemq-nd-camel.xml")),
|
||||||
replaceConfigurationFile("etc/org.apache.activemq.server-default.cfg", new File(RESOURCE_BASE + "org.apache.activemq.server-default.cfg"))
|
replaceConfigurationFile("etc/org.apache.activemq.server-default.cfg", new File(RESOURCE_BASE + "org.apache.activemq.server-default.cfg"))
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class ActiveMQBrokerNdExternalCamelFeatureTest extends AbstractFeatureTes
|
||||||
public void test() throws Throwable {
|
public void test() throws Throwable {
|
||||||
assertFeatureInstalled("activemq");
|
assertFeatureInstalled("activemq");
|
||||||
installAndAssertFeature("camel");
|
installAndAssertFeature("camel");
|
||||||
installAndAssertFeature("activemq-camel");
|
installAndAssertFeature("camel-jms");
|
||||||
|
|
||||||
assertBrokerStarted();
|
assertBrokerStarted();
|
||||||
withinReason(new Runnable() {
|
withinReason(new Runnable() {
|
||||||
|
|
|
@ -32,13 +32,17 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<xpp3-bundle-version>1.1.4c_5</xpp3-bundle-version>
|
<xpp3-bundle-version>1.1.4c_5</xpp3-bundle-version>
|
||||||
<jodatime-bundle-version>2.9</jodatime-bundle-version>
|
|
||||||
<dom4j-bundle-version>1.6.1_2</dom4j-bundle-version>
|
<dom4j-bundle-version>1.6.1_2</dom4j-bundle-version>
|
||||||
<xstream-bundle-version>1.4.17_1</xstream-bundle-version>
|
<xstream-bundle-version>1.4.17_1</xstream-bundle-version>
|
||||||
<servicemix.specs.version>2.4.0</servicemix.specs.version>
|
<servicemix.specs.version>2.4.0</servicemix.specs.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
<artifactId>geronimo-jms_2.0_spec</artifactId>
|
||||||
|
<version>1.0-alpha-2</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ops4j.pax.logging</groupId>
|
<groupId>org.ops4j.pax.logging</groupId>
|
||||||
<artifactId>pax-logging-api</artifactId>
|
<artifactId>pax-logging-api</artifactId>
|
||||||
|
@ -97,14 +101,32 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.activemq</groupId>
|
<groupId>org.apache.activemq</groupId>
|
||||||
<artifactId>activemq-log4j-appender</artifactId>
|
<artifactId>activemq-log4j-appender</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>jakarta.jms</groupId>
|
||||||
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.activemq</groupId>
|
<groupId>org.apache.activemq</groupId>
|
||||||
<artifactId>activemq-console</artifactId>
|
<artifactId>activemq-console</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>jakarta.jms</groupId>
|
||||||
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.activemq</groupId>
|
<groupId>org.apache.activemq</groupId>
|
||||||
<artifactId>activemq-pool</artifactId>
|
<artifactId>activemq-pool</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>jakarta.jms</groupId>
|
||||||
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- used for testing -->
|
<!-- used for testing -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/${jaxb-bundle-version}</bundle>
|
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/${jaxb-bundle-version}</bundle>
|
||||||
<bundle>mvn:org.apache.commons/commons-pool2/${commons-pool2-version}</bundle>
|
<bundle>mvn:org.apache.commons/commons-pool2/${commons-pool2-version}</bundle>
|
||||||
<bundle>mvn:commons-net/commons-net/${commons-net-version}</bundle>
|
<bundle>mvn:commons-net/commons-net/${commons-net-version}</bundle>
|
||||||
<bundle dependency="true">mvn:org.apache.zookeeper/zookeeper/${zookeeper-version}</bundle>
|
|
||||||
<!-- uber osgi bundle means client is not that lean, todo: introduce client osgi bundle -->
|
<!-- uber osgi bundle means client is not that lean, todo: introduce client osgi bundle -->
|
||||||
<bundle>mvn:org.apache.activemq/activemq-osgi/${project.version}</bundle>
|
<bundle>mvn:org.apache.activemq/activemq-osgi/${project.version}</bundle>
|
||||||
</feature>
|
</feature>
|
||||||
|
@ -57,7 +56,6 @@
|
||||||
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt-spring31/1.9.2_1</bundle>
|
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt-spring31/1.9.2_1</bundle>
|
||||||
<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}</bundle>
|
<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}</bundle>
|
||||||
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/${xpp3-bundle-version}</bundle>
|
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/${xpp3-bundle-version}</bundle>
|
||||||
<bundle dependency="true">mvn:joda-time/joda-time/${jodatime-bundle-version}</bundle>
|
|
||||||
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/${xstream-bundle-version}</bundle>
|
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/${xstream-bundle-version}</bundle>
|
||||||
<bundle dependency="true">mvn:org.apache.aries/org.apache.aries.util/${aries-version}</bundle>
|
<bundle dependency="true">mvn:org.apache.aries/org.apache.aries.util/${aries-version}</bundle>
|
||||||
<bundle dependency="true">mvn:org.apache.activemq/activeio-core/${activeio-version}</bundle>
|
<bundle dependency="true">mvn:org.apache.activemq/activeio-core/${activeio-version}</bundle>
|
||||||
|
|
|
@ -473,9 +473,9 @@
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>2.0.3</version>
|
||||||
<classifier>sources</classifier>
|
<classifier>sources</classifier>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.io.Serializable;
|
||||||
|
|
||||||
import javax.jms.Connection;
|
import javax.jms.Connection;
|
||||||
import javax.jms.ConnectionFactory;
|
import javax.jms.ConnectionFactory;
|
||||||
|
import javax.jms.JMSContext;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.QueueConnection;
|
import javax.jms.QueueConnection;
|
||||||
import javax.jms.QueueConnectionFactory;
|
import javax.jms.QueueConnectionFactory;
|
||||||
|
@ -77,6 +78,38 @@ public class ActiveMQConnectionFactory implements ConnectionFactory, QueueConnec
|
||||||
i.setPassword(password);
|
i.setPassword(password);
|
||||||
return createConnection(i);
|
return createConnection(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext() {
|
||||||
|
throw new UnsupportedOperationException("createContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password) {
|
||||||
|
throw new UnsupportedOperationException("createContext(userName, password) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password, int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext(userName, password, sessionMode) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext(sessionMode) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param connectionRequestInfo
|
* @param connectionRequestInfo
|
||||||
|
|
|
@ -108,4 +108,62 @@ public class InboundConnectionProxy implements Connection, QueueConnection, Topi
|
||||||
protected JMSException createNotSupported(String text) {
|
protected JMSException createNotSupported(String text) {
|
||||||
return new JMSException("Operation: " + text + " is not supported for this proxy JCA ResourceAdapter provider");
|
return new JMSException("Operation: " + text + " is not supported for this proxy JCA ResourceAdapter provider");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession() throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession() is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @param acknowledgeMode indicates whether the consumer or the client will
|
||||||
|
* acknowledge any messages it receives; ignored if the
|
||||||
|
* session is transacted. Legal values are
|
||||||
|
* <code>Session.AUTO_ACKNOWLEDGE</code>,
|
||||||
|
* <code>Session.CLIENT_ACKNOWLEDGE</code>, and
|
||||||
|
* <code>Session.DUPS_OK_ACKNOWLEDGE</code>.
|
||||||
|
* @return a newly created session
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @see Session#AUTO_ACKNOWLEDGE
|
||||||
|
* @see Session#CLIENT_ACKNOWLEDGE
|
||||||
|
* @see Session#DUPS_OK_ACKNOWLEDGE
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession(int sessionMode) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession(int sessionMode) is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ package org.apache.activemq.ra;
|
||||||
|
|
||||||
import javax.jms.Connection;
|
import javax.jms.Connection;
|
||||||
import javax.jms.ConnectionFactory;
|
import javax.jms.ConnectionFactory;
|
||||||
|
import javax.jms.JMSContext;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.QueueConnection;
|
import javax.jms.QueueConnection;
|
||||||
import javax.jms.QueueConnectionFactory;
|
import javax.jms.QueueConnectionFactory;
|
||||||
|
@ -56,4 +57,36 @@ public class InboundConnectionProxyFactory implements ConnectionFactory, QueueCo
|
||||||
public TopicConnection createTopicConnection(String userName, String password) throws JMSException {
|
public TopicConnection createTopicConnection(String userName, String password) throws JMSException {
|
||||||
return createTopicConnection();
|
return createTopicConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext() {
|
||||||
|
throw new UnsupportedOperationException("createContext() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password) {
|
||||||
|
throw new UnsupportedOperationException("createContext(userName, password) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(String userName, String password, int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext(userName, password, sessionMode) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the JMSContext.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public JMSContext createContext(int sessionMode) {
|
||||||
|
throw new UnsupportedOperationException("createContext(sessionMode) is not supported");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.ra;
|
package org.apache.activemq.ra;
|
||||||
|
|
||||||
|
import javax.jms.CompletionListener;
|
||||||
import javax.jms.Destination;
|
import javax.jms.Destination;
|
||||||
|
import javax.jms.InvalidDestinationException;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.Message;
|
import javax.jms.Message;
|
||||||
import javax.jms.MessageProducer;
|
import javax.jms.MessageProducer;
|
||||||
|
@ -159,4 +161,63 @@ public class InboundMessageProducerProxy implements MessageProducer, QueueSender
|
||||||
public void publish(Topic arg0, Message arg1, int arg2, int arg3, long arg4) throws JMSException {
|
public void publish(Topic arg0, Message arg1, int arg2, int arg3, long arg4) throws JMSException {
|
||||||
messageProducer.send(arg0, arg1, arg2, arg3, arg4);
|
messageProducer.send(arg0, arg1, arg2, arg3, arg4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param message the message to send
|
||||||
|
* @param CompletionListener to callback
|
||||||
|
* @throws JMSException if the JMS provider fails to send the message due to
|
||||||
|
* some internal error.
|
||||||
|
* @throws UnsupportedOperationException if an invalid destination is
|
||||||
|
* specified.
|
||||||
|
* @throws InvalidDestinationException if a client uses this method with an
|
||||||
|
* invalid destination.
|
||||||
|
* @see javax.jms.Session#createProducer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void send(Message message, CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Message, CompletionListener) is not supported");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Message, deliveryMode, priority, timetoLive, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Destination destination, Message message, CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Destination, Message, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("send(Destination, Message, deliveryMode, priority, timetoLive, CompletionListener) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the delivery delay associated with this <CODE>MessageProducer</CODE>.
|
||||||
|
*
|
||||||
|
* @return this producer's <CODE>DeliveryDely/ <CODE>
|
||||||
|
* @throws JMSException if the JMS provider fails to close the producer due to
|
||||||
|
* some internal error.
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setDeliveryDelay(long deliveryDelay) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("setDeliveryDelay() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the delivery delay value for this <CODE>MessageProducer</CODE>.
|
||||||
|
*
|
||||||
|
* @return the delivery delay for this messageProducer
|
||||||
|
* @throws javax.jms.JMSException if the JMS provider fails to determine if deliver delay is
|
||||||
|
* disabled due to some internal error.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public long getDeliveryDelay() throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("getDeliveryDelay() is not supported");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,6 +237,36 @@ public class InboundSessionProxy implements Session, QueueSession, TopicSession
|
||||||
return getTopicSession().createPublisher(topic);
|
return getTopicSession().createPublisher(topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name, messageSelector, noLocal) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
try {
|
try {
|
||||||
return "InboundSessionProxy { " + getSession() + " }";
|
return "InboundSessionProxy { " + getSession() + " }";
|
||||||
|
|
|
@ -290,4 +290,62 @@ public class ManagedConnectionProxy implements Connection, QueueConnection, Topi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession() throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession() is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a <CODE>Session</CODE> object.
|
||||||
|
*
|
||||||
|
* @param acknowledgeMode indicates whether the consumer or the client will
|
||||||
|
* acknowledge any messages it receives; ignored if the
|
||||||
|
* session is transacted. Legal values are
|
||||||
|
* <code>Session.AUTO_ACKNOWLEDGE</code>,
|
||||||
|
* <code>Session.CLIENT_ACKNOWLEDGE</code>, and
|
||||||
|
* <code>Session.DUPS_OK_ACKNOWLEDGE</code>.
|
||||||
|
* @return a newly created session
|
||||||
|
* @throws JMSException if the <CODE>Connection</CODE> object fails to
|
||||||
|
* create a session due to some internal error or lack of
|
||||||
|
* support for the specific transaction and acknowledgement
|
||||||
|
* mode.
|
||||||
|
* @see Session#AUTO_ACKNOWLEDGE
|
||||||
|
* @see Session#CLIENT_ACKNOWLEDGE
|
||||||
|
* @see Session#DUPS_OK_ACKNOWLEDGE
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Session createSession(int sessionMode) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSession(int sessionMode) is unsupported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @see javax.jms.ConnectionConsumer
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConnectionConsumer() is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -406,6 +406,36 @@ public class ManagedSessionProxy implements Session, QueueSession, TopicSession
|
||||||
throw new RuntimeException("Operation not supported.");
|
throw new RuntimeException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedConsumer(Topic, sharedSubscriptionName, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createDurableConsumer(Topic, name, messageSelector, noLocal) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException {
|
||||||
|
throw new UnsupportedOperationException("createSharedDurableConsumer(Topic, name, messageSelector) is not supported");
|
||||||
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ManagedSessionProxy { " + session + " }";
|
return "ManagedSessionProxy { " + session + " }";
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
<artifactId>activemq-spring</artifactId>
|
<artifactId>activemq-spring</artifactId>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
@ -164,8 +164,8 @@
|
||||||
<artifactId>activemq-ra</artifactId>
|
<artifactId>activemq-ra</artifactId>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
<artifactId>derbynet</artifactId>
|
<artifactId>derbynet</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
<artifactId>derbynet</artifactId>
|
<artifactId>derbynet</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -59,8 +59,8 @@
|
||||||
<artifactId>derbynet</artifactId>
|
<artifactId>derbynet</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -67,8 +67,8 @@
|
||||||
<artifactId>activemq-runtime-config</artifactId>
|
<artifactId>activemq-runtime-config</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
|
|
|
@ -186,8 +186,8 @@
|
||||||
|
|
||||||
<!-- j2ee jars -->
|
<!-- j2ee jars -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -142,8 +142,8 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- j2ee jars -->
|
<!-- j2ee jars -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -254,8 +254,8 @@
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -142,7 +142,7 @@
|
||||||
<include>${pom.groupId}:activemq-jaas</include>
|
<include>${pom.groupId}:activemq-jaas</include>
|
||||||
<include>org.apache.activemq.protobuf:activemq-protobuf</include>
|
<include>org.apache.activemq.protobuf:activemq-protobuf</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
|
<include>jakarta.jms:jakarta.jms-api</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
|
||||||
<include>${pom.groupId}:activemq-web</include>
|
<include>${pom.groupId}:activemq-web</include>
|
||||||
<include>org.fusesource.hawtbuf:hawtbuf</include>
|
<include>org.fusesource.hawtbuf:hawtbuf</include>
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
<version>1.1</version>
|
<version>2.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.qpid</groupId>
|
<groupId>org.apache.qpid</groupId>
|
||||||
|
|
|
@ -41,11 +41,10 @@
|
||||||
<description>ActiveMQ OpenWire Java Examples</description>
|
<description>ActiveMQ OpenWire Java Examples</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
<version>1.1</version>
|
<version>2.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.activemq</groupId>
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
<version>1.1</version>
|
<version>2.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.activemq</groupId>
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
<version>1.1</version>
|
<version>2.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.fusesource.stompjms</groupId>
|
<groupId>org.fusesource.stompjms</groupId>
|
||||||
|
|
6
pom.xml
6
pom.xml
|
@ -465,9 +465,9 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.jms</groupId>
|
||||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
<artifactId>jakarta.jms-api</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>2.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
Loading…
Reference in New Issue