001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.ejb3.test.mdb;
023:
024: import javax.ejb.Stateless;
025: import javax.ejb.Remote;
026:
027: import org.jboss.logging.Logger;
028:
029: /**
030: * Comment
031: *
032: * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
033: * @version $Revision: 61798 $
034: */
035: @Stateless
036: @Remote(TestStatus.class)
037: public class TestStatusBean implements TestStatus {
038: @SuppressWarnings("unused")
039: private static final Logger log = Logger
040: .getLogger(TestStatusBean.class);
041:
042: public static int queueRan = 0;
043: public static int concurrentQueueRan = 0;
044: public static int overrideQueueRan = 0;
045: public static int defaultedQueueRan = 0;
046: public static int overrideDefaultedQueueRan = 0;
047: public static int nondurableQueueRan = 0;
048: public static int topicRan = 0;
049: public static int bmtQueueRan = 0;
050: static int cmtQueueRan = 0;
051: public static int transactionQueueRan = 0;
052: public static int messageCount = 0;
053: public static boolean interceptedTopic = false;
054: public static boolean interceptedQueue = false;
055: public static boolean postConstruct = false;
056: public static boolean preDestroy = false;
057: static int rollbackCmtQueueRan = 0;
058: static int expirationQueueRan = 0;
059:
060: public void clear() {
061: queueRan = 0;
062: concurrentQueueRan = 0;
063: topicRan = 0;
064: bmtQueueRan = 0;
065: cmtQueueRan = 0;
066: overrideQueueRan = 0;
067: defaultedQueueRan = 0;
068: overrideDefaultedQueueRan = 0;
069: messageCount = 0;
070: nondurableQueueRan = 0;
071: transactionQueueRan = 0;
072: interceptedTopic = false;
073: interceptedQueue = false;
074: postConstruct = false;
075: preDestroy = false;
076: expirationQueueRan = 0;
077: }
078:
079: public int queueFired() {
080: return queueRan;
081: }
082:
083: public int concurrentQueueFired() {
084: return concurrentQueueRan;
085: }
086:
087: public int overrideQueueFired() {
088: return overrideQueueRan;
089: }
090:
091: public int overrideDefaultedQueueFired() {
092: return overrideDefaultedQueueRan;
093: }
094:
095: public int defaultedQueueFired() {
096: return defaultedQueueRan;
097: }
098:
099: public int transactionQueueRan() {
100: return transactionQueueRan;
101: }
102:
103: public int nondurableQueueFired() {
104: return nondurableQueueRan;
105: }
106:
107: public int topicFired() {
108: return topicRan;
109: }
110:
111: public int bmtQueueRan() {
112: return bmtQueueRan;
113: }
114:
115: public int cmtQueueRan() {
116: return cmtQueueRan;
117: }
118:
119: public boolean interceptedTopic() {
120: return interceptedTopic;
121: }
122:
123: public boolean interceptedQueue() {
124: return interceptedQueue;
125: }
126:
127: public boolean postConstruct() {
128: return postConstruct;
129: }
130:
131: public boolean preDestroy() {
132: return preDestroy;
133: }
134:
135: public int messageCount() {
136: return messageCount;
137: }
138:
139: public int rollbackCmtQueueRan() {
140: return rollbackCmtQueueRan;
141: }
142:
143: public int expirationQueueRan() {
144: return expirationQueueRan;
145: }
146: }
|