Source Code Cross Referenced for EjbModule.java in  » J2EE » openejb3 » org » apache » openejb » config » 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 » openejb3 » org.apache.openejb.config 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         *
003:         * Licensed to the Apache Software Foundation (ASF) under one or more
004:         * contributor license agreements.  See the NOTICE file distributed with
005:         * this work for additional information regarding copyright ownership.
006:         * The ASF licenses this file to You under the Apache License, Version 2.0
007:         * (the "License"); you may not use this file except in compliance with
008:         * the License.  You may obtain a copy of the License at
009:         *
010:         *     http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         *  Unless required by applicable law or agreed to in writing, software
013:         *  distributed under the License is distributed on an "AS IS" BASIS,
014:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:         *  See the License for the specific language governing permissions and
016:         *  limitations under the License.
017:         */package org.apache.openejb.config;
018:
019:        import org.apache.openejb.jee.EjbJar;
020:        import org.apache.openejb.jee.Webservices;
021:        import org.apache.openejb.jee.oejb3.OpenejbJar;
022:
023:        import java.io.File;
024:        import java.util.Map;
025:        import java.util.HashMap;
026:        import java.util.Set;
027:        import java.util.TreeSet;
028:
029:        /**
030:         * Class is to remain "dumb" and should not have deployment logic added to it.
031:         * Class is intentionally not an interface as that would encourage "smart" implementations
032:         * @version $Revision: 607308 $ $Date: 2007-12-28 10:31:49 -0800 $
033:         */
034:        public class EjbModule implements  WsModule {
035:
036:            private final ValidationContext validation;
037:
038:            private ClassLoader classLoader;
039:            private String jarLocation;
040:            private EjbJar ejbJar;
041:            private OpenejbJar openejbJar;
042:            private Webservices webservices;
043:            private String moduleId;
044:            private final Map<String, Object> altDDs = new HashMap<String, Object>();
045:            private final Set<String> watchedResources = new TreeSet<String>();
046:
047:            public EjbModule(EjbJar ejbJar) {
048:                this (Thread.currentThread().getContextClassLoader(), null,
049:                        ejbJar, null);
050:            }
051:
052:            public EjbModule(EjbJar ejbJar, OpenejbJar openejbJar) {
053:                this (Thread.currentThread().getContextClassLoader(), null,
054:                        ejbJar, openejbJar);
055:            }
056:
057:            public EjbModule(ClassLoader classLoader, String moduleId,
058:                    String jarURI, EjbJar ejbJar, OpenejbJar openejbJar) {
059:                if (classLoader == null) {
060:                    throw new NullPointerException("classLoader is null");
061:                }
062:                this .classLoader = classLoader;
063:                this .ejbJar = ejbJar;
064:                this .openejbJar = openejbJar;
065:
066:                if (jarURI == null) {
067:                    if (moduleId != null) {
068:                        jarURI = moduleId;
069:                    } else if (ejbJar.getId() != null
070:                            && !ejbJar.getId().equals("")) {
071:                        jarURI = ejbJar.getId();
072:                    } else {
073:                        jarURI = ejbJar.toString();
074:                    }
075:                }
076:                this .jarLocation = jarURI;
077:
078:                if (moduleId == null) {
079:                    if (ejbJar != null && ejbJar.getId() != null
080:                            && !ejbJar.getId().equals("")) {
081:                        moduleId = ejbJar.getId();
082:                    } else {
083:                        File file = new File(jarURI);
084:                        moduleId = file.getName();
085:                        if (moduleId == null) {
086:                            moduleId = jarURI;
087:                        }
088:                    }
089:                }
090:                this .moduleId = moduleId;
091:                validation = new ValidationContext(EjbModule.class, jarLocation);
092:            }
093:
094:            public EjbModule(ClassLoader classLoader, String jarURI,
095:                    EjbJar ejbJar, OpenejbJar openejbJar) {
096:                this (classLoader, null, jarURI, ejbJar, openejbJar);
097:            }
098:
099:            public ValidationContext getValidation() {
100:                return validation;
101:            }
102:
103:            public Map<String, Object> getAltDDs() {
104:                return altDDs;
105:            }
106:
107:            public ClassLoader getClassLoader() {
108:                return classLoader;
109:            }
110:
111:            public void setClassLoader(ClassLoader classLoader) {
112:                this .classLoader = classLoader;
113:            }
114:
115:            public EjbJar getEjbJar() {
116:                return ejbJar;
117:            }
118:
119:            public void setEjbJar(EjbJar ejbJar) {
120:                this .ejbJar = ejbJar;
121:            }
122:
123:            public String getJarLocation() {
124:                return jarLocation;
125:            }
126:
127:            public void setJarLocation(String jarLocation) {
128:                this .jarLocation = jarLocation;
129:            }
130:
131:            public String getModuleId() {
132:                return moduleId;
133:            }
134:
135:            public void setModuleId(String moduleId) {
136:                this .moduleId = moduleId;
137:            }
138:
139:            public OpenejbJar getOpenejbJar() {
140:                return openejbJar;
141:            }
142:
143:            public void setOpenejbJar(OpenejbJar openejbJar) {
144:                this .openejbJar = openejbJar;
145:            }
146:
147:            public Webservices getWebservices() {
148:                return webservices;
149:            }
150:
151:            public void setWebservices(Webservices webservices) {
152:                this .webservices = webservices;
153:            }
154:
155:            public Set<String> getWatchedResources() {
156:                return watchedResources;
157:            }
158:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.