Source Code Cross Referenced for TraceEjb.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas_ejb » container » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » JOnAS 4.8.6 » org.objectweb.jonas_ejb.container 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * JOnAS: Java(TM) Open Application Server
003:         * Copyright (C) 1999-2005 Bull S.A.
004:         * Contact: jonas-team@objectweb.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * --------------------------------------------------------------------------
022:         * $Id: TraceEjb.java 6681 2005-05-02 15:18:31Z benoitf $
023:         * --------------------------------------------------------------------------
024:         */package org.objectweb.jonas_ejb.container;
025:
026:        import org.objectweb.util.monolog.api.BasicLevel;
027:        import org.objectweb.util.monolog.api.Logger;
028:        import org.objectweb.util.monolog.api.LoggerFactory;
029:        import org.objectweb.util.monolog.wrapper.printwriter.LoggerImpl;
030:
031:        /**
032:         * For message logging
033:         * @author Sebastien Chassande-Barrioz sebastien.chassande@inrialpes.fr
034:         */
035:
036:        class DummyLogger extends LoggerImpl {
037:
038:            /**
039:             * Dummy Logger used when jotm classes are used on client side
040:             */
041:            public void log(int level, java.lang.Object o) {
042:            }
043:        }
044:
045:        public class TraceEjb {
046:
047:            public static Logger logger = new DummyLogger();
048:            private static boolean isWarnLogger = false;
049:
050:            public static Logger query = new DummyLogger();
051:            private static boolean isDebugQuery = false;
052:
053:            public static Logger interp = new DummyLogger();
054:            private static boolean isDebugInterp = false;
055:
056:            public static Logger genclass = new DummyLogger();
057:            private static boolean isDebugGenclass = false;
058:
059:            public static Logger coherence = new DummyLogger();
060:            private static boolean isDebugCoherence = false;
061:
062:            public static Logger thread = new DummyLogger();
063:            private static boolean isDebugThread = false;
064:
065:            public static Logger synchro = new DummyLogger();
066:            private static boolean isDebugSynchro = false;
067:
068:            public static Logger ssfpool = new DummyLogger();
069:            private static boolean isDebugSsfpool = false;
070:
071:            public static Logger swapper = new DummyLogger();
072:            private static boolean isDebugSwapper = false;
073:
074:            public static Logger mapper = new DummyLogger();
075:            private static boolean isDebugMapper = false;
076:
077:            public static Logger context = new DummyLogger();
078:            private static boolean isDebugContext = false;
079:
080:            public static Logger security = new DummyLogger();
081:            private static boolean isDebugSecurity = false;
082:
083:            public static Logger factory = new DummyLogger();
084:            private static boolean isDebugFactory = false;
085:
086:            public static Logger mdb = new DummyLogger();
087:            private static boolean isDebugMdb = false;
088:
089:            public static Logger tx = new DummyLogger();
090:            private static boolean isDebugTx = false;
091:
092:            public static Logger txlistener = new DummyLogger();
093:            private static boolean isDebugTxlistener = false;
094:
095:            public static Logger dd = new DummyLogger();
096:            private static boolean isDebugDd = false;
097:
098:            public static Logger loaderlog = new DummyLogger();
099:            private static boolean isDebugLoaderlog = false;
100:
101:            public static final String prefix = "org.objectweb.jonas_ejb";
102:
103:            public static LoggerFactory loggerFactory = null;
104:
105:            /**
106:             * Configure loggers for monolog
107:             * @param lf the logger factory
108:             */
109:            public static void configure(LoggerFactory lf) {
110:                loggerFactory = lf;
111:                logger = lf.getLogger(prefix);
112:                interp = lf.getLogger(prefix + ".interp");
113:                query = lf.getLogger(prefix + ".query");
114:                genclass = lf.getLogger(prefix + ".genclass");
115:                coherence = lf.getLogger(prefix + ".coherence");
116:                thread = lf.getLogger(prefix + ".thread");
117:                synchro = lf.getLogger(prefix + ".synchro");
118:                ssfpool = lf.getLogger(prefix + ".ssfpool");
119:                swapper = lf.getLogger(prefix + ".swapper");
120:                mapper = lf.getLogger(prefix + ".mapper");
121:                context = lf.getLogger(prefix + ".context");
122:                security = lf.getLogger(prefix + ".security");
123:                factory = lf.getLogger(prefix + ".factory");
124:                mdb = lf.getLogger(prefix + ".mdb");
125:                tx = lf.getLogger(prefix + ".tx");
126:                txlistener = lf.getLogger(prefix + ".txlistener");
127:                dd = lf.getLogger(prefix + ".dd");
128:                loaderlog = lf.getLogger("org.objectweb.jonas.loader");
129:                syncLevels();
130:            }
131:
132:            /**
133:             * Sets booleans which enable debugging (debug level or Warn)
134:             */
135:            public static void syncLevels() {
136:                // Warn
137:                isWarnLogger = logger.isLoggable(BasicLevel.WARN);
138:
139:                // debug
140:                isDebugQuery = query.isLoggable(BasicLevel.DEBUG);
141:                isDebugInterp = interp.isLoggable(BasicLevel.DEBUG);
142:                isDebugGenclass = genclass.isLoggable(BasicLevel.DEBUG);
143:                isDebugCoherence = coherence.isLoggable(BasicLevel.DEBUG);
144:                isDebugThread = thread.isLoggable(BasicLevel.DEBUG);
145:                isDebugSynchro = synchro.isLoggable(BasicLevel.DEBUG);
146:                isDebugSsfpool = ssfpool.isLoggable(BasicLevel.DEBUG);
147:                isDebugSwapper = swapper.isLoggable(BasicLevel.DEBUG);
148:                isDebugMapper = mapper.isLoggable(BasicLevel.DEBUG);
149:                isDebugContext = context.isLoggable(BasicLevel.DEBUG);
150:                isDebugSecurity = security.isLoggable(BasicLevel.DEBUG);
151:                isDebugFactory = factory.isLoggable(BasicLevel.DEBUG);
152:                isDebugMdb = mdb.isLoggable(BasicLevel.DEBUG);
153:                isDebugTx = tx.isLoggable(BasicLevel.DEBUG);
154:                isDebugTxlistener = txlistener.isLoggable(BasicLevel.DEBUG);
155:                isDebugDd = dd.isLoggable(BasicLevel.DEBUG);
156:                isDebugLoaderlog = loaderlog.isLoggable(BasicLevel.DEBUG);
157:            }
158:
159:            public static final boolean isVerbose() {
160:                return isWarnLogger;
161:            }
162:
163:            public static final boolean isDebugThread() {
164:                return isDebugThread;
165:            }
166:
167:            public static final boolean isDebugSynchro() {
168:                return isDebugSynchro;
169:            }
170:
171:            public static final boolean isDebugSsfpool() {
172:                return isDebugSsfpool;
173:            }
174:
175:            public static final boolean isDebugContext() {
176:                return isDebugContext;
177:            }
178:
179:            public static final boolean isDebugSwapper() {
180:                return isDebugSwapper;
181:            }
182:
183:            public static final boolean isDebugMapper() {
184:                return isDebugMapper;
185:            }
186:
187:            public static final boolean isDebugIc() {
188:                return isDebugInterp;
189:            }
190:
191:            public static final boolean isDebugSecurity() {
192:                return isDebugSecurity;
193:            }
194:
195:            public static final boolean isDebugFactory() {
196:                return isDebugFactory;
197:            }
198:
199:            public static final boolean isDebugJms() {
200:                return isDebugMdb;
201:            }
202:
203:            public static final boolean isDebugTx() {
204:                return isDebugTx;
205:            }
206:
207:            public static final boolean isDebugTxlistener() {
208:                return isDebugTxlistener;
209:            }
210:
211:            public static final boolean isDebugDd() {
212:                return isDebugDd;
213:            }
214:
215:            public static final boolean isDebugQuery() {
216:                return isDebugQuery;
217:            }
218:
219:            public static final boolean isDebugLoaderLog() {
220:                return isDebugLoaderlog;
221:            }
222:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.