001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 package org.apache.activemq.ra;
019
020 import javax.jms.JMSException;
021 import javax.resource.spi.BootstrapContext;
022 import javax.resource.spi.ResourceAdapter;
023
024 import org.apache.activemq.ActiveMQConnection;
025
026 /**
027 * Knows how to connect to one ActiveMQ server. It can then activate endpoints
028 * and deliver messages to those end points using the connection configure in
029 * the resource adapter. <p/>Must override equals and hashCode (JCA spec 16.4)
030 *
031 * @version $Revision$
032 */
033 public interface MessageResourceAdapter extends ResourceAdapter {
034
035 /**
036 */
037 ActiveMQConnection makeConnection(ActiveMQConnectionRequestInfo info) throws JMSException;
038
039 /**
040 * @param activationSpec
041 */
042 ActiveMQConnection makeConnection(MessageActivationSpec activationSpec) throws JMSException;
043
044 /**
045 * @return bootstrap context
046 */
047 BootstrapContext getBootstrapContext();
048
049 /**
050 */
051 String getBrokerXmlConfig();
052
053 /**
054 * @return Returns the info.
055 */
056 ActiveMQConnectionRequestInfo getInfo();
057
058 }