001/* 002 * Copyright 2002-2007 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.jms.listener.endpoint; 018 019import javax.resource.spi.ActivationSpec; 020import javax.resource.spi.ResourceAdapter; 021 022/** 023 * Strategy interface for creating JCA 1.5 ActivationSpec objects 024 * based on a configured {@link JmsActivationSpecConfig} object. 025 * 026 * <p>JCA 1.5 ActivationSpec objects are typically JavaBeans, but 027 * unfortunately provider-specific. This strategy interface allows 028 * for plugging in any JCA-based JMS provider, creating corresponding 029 * ActivationSpec objects based on common JMS configuration settings. 030 * 031 * @author Juergen Hoeller 032 * @since 2.5 033 * @see JmsActivationSpecConfig 034 * @see JmsMessageEndpointManager#setActivationSpecFactory 035 * @see javax.resource.spi.ResourceAdapter#endpointActivation 036 */ 037public interface JmsActivationSpecFactory { 038 039 /** 040 * Create a JCA 1.5 ActivationSpec object based on the given 041 * {@link JmsActivationSpecConfig} object. 042 * @param adapter the ResourceAdapter to create an ActivationSpec object for 043 * @param config the configured object holding common JMS settings 044 * @return the provider-specific JCA ActivationSpec object, 045 * representing the same settings 046 */ 047 ActivationSpec createActivationSpec(ResourceAdapter adapter, JmsActivationSpecConfig config); 048 049}