Source Code Cross Referenced for JMSException.java in  » Testing » Ejb3Unit » javax » jms » 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 » Testing » Ejb3Unit » javax.jms 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the terms 
003:         * of the Common Development and Distribution License 
004:         * (the License).  You may not use this file except in
005:         * compliance with the License.
006:         * 
007:         * You can obtain a copy of the license at 
008:         * https://glassfish.dev.java.net/public/CDDLv1.0.html or
009:         * glassfish/bootstrap/legal/CDDLv1.0.txt.
010:         * See the License for the specific language governing 
011:         * permissions and limitations under the License.
012:         * 
013:         * When distributing Covered Code, include this CDDL 
014:         * Header Notice in each file and include the License file 
015:         * at glassfish/bootstrap/legal/CDDLv1.0.txt.  
016:         * If applicable, add the following below the CDDL Header, 
017:         * with the fields enclosed by brackets [] replaced by
018:         * you own identifying information: 
019:         * "Portions Copyrighted [year] [name of copyright owner]"
020:         * 
021:         * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
022:         */
023:
024:        package javax.jms;
025:
026:        /**
027:         * <P>
028:         * This is the root class of all JMS API exceptions.
029:         * 
030:         * <P>
031:         * It provides the following information:
032:         * <UL>
033:         * <LI> A provider-specific string describing the error. This string is the
034:         * standard exception message and is available via the <CODE>getMessage</CODE>
035:         * method.
036:         * <LI> A provider-specific string error code
037:         * <LI> A reference to another exception. Often a JMS API exception will be the
038:         * result of a lower-level problem. If appropriate, this lower-level exception
039:         * can be linked to the JMS API exception.
040:         * </UL>
041:         * 
042:         */
043:
044:        public class JMSException extends Exception {
045:
046:            private static final long serialVersionUID = 1L;
047:
048:            /**
049:             * Vendor-specific error code.
050:             */
051:            private String errorCode;
052:
053:            /**
054:             * <CODE>Exception</CODE> reference.
055:             */
056:            private Exception linkedException;
057:
058:            /**
059:             * Constructs a <CODE>JMSException</CODE> with the specified reason and
060:             * error code.
061:             * 
062:             * @param reason
063:             *            a description of the exception
064:             * @param errorCode
065:             *            a string specifying the vendor-specific error code
066:             */
067:            public JMSException(String reason, String errorCode) {
068:                super (reason);
069:                this .errorCode = errorCode;
070:                linkedException = null;
071:            }
072:
073:            /**
074:             * Constructs a <CODE>JMSException</CODE> with the specified reason and
075:             * with the error code defaulting to null.
076:             * 
077:             * @param reason
078:             *            a description of the exception
079:             */
080:            public JMSException(String reason) {
081:                super (reason);
082:                this .errorCode = null;
083:                linkedException = null;
084:            }
085:
086:            /**
087:             * Gets the vendor-specific error code.
088:             * 
089:             * @return a string specifying the vendor-specific error code
090:             */
091:            public String getErrorCode() {
092:                return this .errorCode;
093:            }
094:
095:            /**
096:             * Gets the exception linked to this one.
097:             * 
098:             * @return the linked <CODE>Exception</CODE>, null if none
099:             */
100:            public Exception getLinkedException() {
101:                return (linkedException);
102:            }
103:
104:            /**
105:             * Adds a linked <CODE>Exception</CODE>.
106:             * 
107:             * @param ex
108:             *            the linked <CODE>Exception</CODE>
109:             */
110:            public synchronized void setLinkedException(Exception ex) {
111:                linkedException = ex;
112:            }
113:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.