KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2006, Red Hat Middleware LLC, 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.mdbtopic;
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: 58399 $
34  */

35 @Stateless JavaDoc
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
56    public void clear()
57    {
58       queueRan = 0;
59       topicRan = 0;
60       bmtQueueRan = 0;
61       cmtQueueRan = 0;
62       overrideQueueRan = 0;
63       defaultedQueueRan = 0;
64       overrideDefaultedQueueRan = 0;
65       messageCount = 0;
66       nondurableQueueRan = 0;
67       interceptedTopic = false;
68       interceptedQueue = false;
69       postConstruct = false;
70       preDestroy = false;
71    }
72
73    public int queueFired()
74    {
75       return queueRan;
76    }
77    
78    public int overrideQueueFired()
79    {
80       return overrideQueueRan;
81    }
82    
83    public int overrideDefaultedQueueFired()
84    {
85       return overrideDefaultedQueueRan;
86    }
87    
88    public int defaultedQueueFired()
89    {
90       return defaultedQueueRan;
91    }
92    
93    public int nondurableQueueFired()
94    {
95       return nondurableQueueRan;
96    }
97
98    public int topicFired()
99    {
100       return topicRan;
101    }
102    
103    public int bmtQueueRan()
104    {
105       return bmtQueueRan;
106    }
107
108    public int cmtQueueRan()
109    {
110       return cmtQueueRan;
111    }
112    
113    public boolean interceptedTopic()
114    {
115       return interceptedTopic;
116    }
117
118    public boolean interceptedQueue()
119    {
120       return interceptedQueue;
121    }
122
123    public boolean postConstruct()
124    {
125       return postConstruct;
126    }
127
128    public boolean preDestroy()
129    {
130       return preDestroy;
131    }
132    
133    public int messageCount()
134    {
135       return messageCount;
136    }
137 }
138
Popular Tags