01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package org.jboss.ejb3.test.jca.inflowmdb;
23:
24: import javax.ejb.ActivationConfigProperty;
25: import javax.ejb.MessageDriven;
26: import javax.ejb.TransactionAttribute;
27: import javax.ejb.TransactionAttributeType;
28:
29: import org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy;
30: import org.jboss.ejb3.test.jca.inflow.TestMessage;
31: import org.jboss.ejb3.test.jca.inflow.TestMessageListener;
32: import org.jboss.logging.Logger;
33: import org.jboss.annotation.ejb.ResourceAdapter;
34:
35: /**
36: *
37: * @version <tt>$Revision: 60233 $</tt>
38: * @author <a href="mailto:bdecoste@jboss.com">William DeCoste</a>
39: */
40: @MessageDriven(name="TestMDB",activationConfig={@ActivationConfigProperty(propertyName="name",propertyValue="testInflow"),@ActivationConfigProperty(propertyName="anInt",propertyValue="5"),@ActivationConfigProperty(propertyName="anInteger",propertyValue="55"),@ActivationConfigProperty(propertyName="localhost",propertyValue="127.0.0.1"),@ActivationConfigProperty(propertyName="props",propertyValue="key1=value1,key2=value2,key3=value3")})
41: @ResourceAdapter("jcainflow.rar")
42: @TransactionAttribute(TransactionAttributeType.REQUIRED)
43: public class TestMDBMessageListener implements TestMessageListener {
44: private static final Logger log = Logger
45: .getLogger(TestMDBMessageListener.class);
46:
47: public void deliverMessage(TestMessage message) {
48: message.acknowledge();
49: log.info(message.toString());
50: }
51: }
|