KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > test > mdb > TestStatusBean


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * 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.mdb;
23
24 import javax.ejb.Stateless JavaDoc;
25 import javax.ejb.Remote JavaDoc;
26
27 import org.jboss.logging.Logger;
28
29 /**
30  * Comment
31  *
32  * @author <a HREF="mailto:bill@jboss.org">Bill Burke</a>
33  * @version $Revision: 58493 $
34  */

35 @Stateless
36 @Remote JavaDoc(TestStatus.class)
37 public class TestStatusBean implements TestStatus
38 {
39    @SuppressWarnings JavaDoc("unused")
40    private static final Logger log = Logger.getLogger(TestStatusBean.class);
41    
42    public static int queueRan = 0;
43    public static int overrideQueueRan = 0;
44    public static int defaultedQueueRan = 0;
45    public static int overrideDefaultedQueueRan = 0;
46    public static int nondurableQueueRan = 0;
47    public static int topicRan = 0;
48    public static int bmtQueueRan = 0;
49    static int cmtQueueRan = 0;
50    public static int messageCount = 0;
51    public static boolean interceptedTopic = false;
52    public static boolean interceptedQueue = false;
53    public static boolean postConstruct = false;
54    public static boolean preDestroy = false;
55    static int rollbackCmtQueueRan = 0;
56
57    public void clear()
58    {
59       queueRan = 0;
60       topicRan = 0;
61       bmtQueueRan = 0;
62       cmtQueueRan = 0;
63       overrideQueueRan = 0;
64       defaultedQueueRan = 0;
65       overrideDefaultedQueueRan = 0;
66       messageCount = 0;
67       nondurableQueueRan = 0;
68       interceptedTopic = false;
69       interceptedQueue = false;
70       postConstruct = false;
71       preDestroy = false;
72    }
73
74    public int queueFired()
75    {
76       return queueRan;
77    }
78    
79    public int overrideQueueFired()
80    {
81       return overrideQueueRan;
82    }
83    
84    public int overrideDefaultedQueueFired()
85    {
86       return overrideDefaultedQueueRan;
87    }
88    
89    public int defaultedQueueFired()
90    {
91       return defaultedQueueRan;
92    }
93    
94    public int nondurableQueueFired()
95    {
96       return nondurableQueueRan;
97    }
98
99    public int topicFired()
100    {
101       return topicRan;
102    }
103    
104    public int bmtQueueRan()
105    {
106       return bmtQueueRan;
107    }
108
109    public int cmtQueueRan()
110    {
111       return cmtQueueRan;
112    }
113    
114    public boolean interceptedTopic()
115    {
116       return interceptedTopic;
117    }
118
119    public boolean interceptedQueue()
120    {
121       return interceptedQueue;
122    }
123
124    public boolean postConstruct()
125    {
126       return postConstruct;
127    }
128
129    public boolean preDestroy()
130    {
131       return preDestroy;
132    }
133    
134    public int messageCount()
135    {
136       return messageCount;
137    }
138    
139    public int rollbackCmtQueueRan()
140    {
141       return rollbackCmtQueueRan;
142    }
143 }
144
Popular Tags