001    package biz.hammurapi.jms.adapter.jca;
002    
003    import java.io.Serializable;
004    
005    import javax.resource.ResourceException;
006    import javax.resource.spi.ActivationSpec;
007    import javax.resource.spi.InvalidPropertyException;
008    import javax.resource.spi.ResourceAdapter;
009    
010    /**
011     * Associates message endpoint with listener.
012     * @author Pavel
013     *
014     */
015    public class ActivationSpecImpl implements ActivationSpec, Serializable {
016    
017            private transient ResourceAdapter resourceAdapter;
018    
019            public void validate() throws InvalidPropertyException {
020                    if (listenerName==null) {
021                            throw new InvalidPropertyException("Listener is not set");
022                    }
023            }
024            
025            private String listenerName;
026            
027            public String getListenerName() {
028                    return listenerName;
029            }
030            
031            public void setListenerName(String listenerName) {
032                    this.listenerName = listenerName;
033            }
034    
035            public ResourceAdapter getResourceAdapter() {
036                    return resourceAdapter;
037            }
038    
039            public void setResourceAdapter(ResourceAdapter ra) throws ResourceException {
040                    this.resourceAdapter = ra;
041    
042            }
043    
044    }