Source Code Cross Referenced for EjbRef.java in  » J2EE » openejb3 » org » apache » openejb » jee » 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.jee 
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.jee;
018:
019:        import javax.xml.bind.annotation.XmlAccessType;
020:        import javax.xml.bind.annotation.XmlAccessorType;
021:        import javax.xml.bind.annotation.XmlAttribute;
022:        import javax.xml.bind.annotation.XmlElement;
023:        import javax.xml.bind.annotation.XmlID;
024:        import javax.xml.bind.annotation.XmlType;
025:        import javax.xml.bind.annotation.XmlTransient;
026:        import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
027:        import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
028:        import java.util.ArrayList;
029:        import java.util.List;
030:
031:        /**
032:         * The ejb-refType is used by ejb-ref elements for the
033:         * declaration of a reference to an enterprise bean's home or
034:         * to the remote business interface of a 3.0 bean.
035:         * The declaration consists of:
036:         * <p/>
037:         * - an optional description
038:         * - the EJB reference name used in the code of
039:         * the Deployment Component that's referencing the enterprise
040:         * bean.
041:         * - the optional expected type of the referenced enterprise bean
042:         * - the optional remote interface of the referenced enterprise bean
043:         * or the remote business interface of the referenced enterprise
044:         * bean
045:         * - the optional expected home interface of the referenced
046:         * enterprise bean.  Not applicable if this ejb-ref
047:         * refers to the remote business interface of a 3.0 bean.
048:         * - optional ejb-link information, used to specify the
049:         * referenced enterprise bean
050:         * - optional elements to define injection of the named enterprise
051:         * bean into a component field or property
052:         */
053:        @XmlAccessorType(XmlAccessType.FIELD)
054:        @XmlType(name="ejb-refType",propOrder={"description","ejbRefName","ejbRefType","home","remote","ejbLink","mappedName","injectionTarget"})
055:        public class EjbRef implements  EjbReference {
056:
057:            @XmlElement(required=true)
058:            protected List<Text> description;
059:            @XmlElement(name="ejb-ref-name",required=true)
060:            protected String ejbRefName;
061:            @XmlElement(name="ejb-ref-type")
062:            protected EjbRefType ejbRefType;
063:            protected String home;
064:            protected String remote;
065:            @XmlElement(name="ejb-link")
066:            protected String ejbLink;
067:            @XmlElement(name="mapped-name")
068:            protected String mappedName;
069:            @XmlElement(name="injection-target",required=true)
070:            protected List<InjectionTarget> injectionTarget;
071:            @XmlAttribute
072:            @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
073:            @XmlID
074:            protected String id;
075:
076:            @XmlTransient
077:            protected Type refType = Type.REMOTE;
078:
079:            public Type getRefType() {
080:                return refType;
081:            }
082:
083:            public void setRefType(Type refType) {
084:                this .refType = refType;
085:            }
086:
087:            public List<Text> getDescription() {
088:                if (description == null) {
089:                    description = new ArrayList<Text>();
090:                }
091:                return this .description;
092:            }
093:
094:            public String getEjbRefName() {
095:                return ejbRefName;
096:            }
097:
098:            public String getName() {
099:                return getEjbRefName();
100:            }
101:
102:            public String getKey() {
103:                return getName();
104:            }
105:
106:            public String getType() {
107:                return getEjbRefType().name();
108:            }
109:
110:            public void setName(String name) {
111:                setEjbRefName(name);
112:            }
113:
114:            public void setType(String type) {
115:            }
116:
117:            /**
118:             * The ejb-ref-name element contains the name of an EJB
119:             * reference. The EJB reference is an entry in the
120:             * Deployment Component's environment and is relative to the
121:             * java:comp/env context.  The name must be unique within the
122:             * Deployment Component.
123:             * <p/>
124:             * It is recommended that name is prefixed with "ejb/".
125:             * <p/>
126:             * Example:
127:             * <p/>
128:             * <ejb-ref-name>ejb/Payroll</ejb-ref-name>
129:             */
130:            public void setEjbRefName(String value) {
131:                this .ejbRefName = value;
132:            }
133:
134:            public EjbRefType getEjbRefType() {
135:                return ejbRefType;
136:            }
137:
138:            public void setEjbRefType(EjbRefType value) {
139:                this .ejbRefType = value;
140:            }
141:
142:            public String getHome() {
143:                return home;
144:            }
145:
146:            public void setHome(String value) {
147:                this .home = value;
148:            }
149:
150:            public String getRemote() {
151:                return remote;
152:            }
153:
154:            public String getInterface() {
155:                return getRemote();
156:            }
157:
158:            public void setRemote(String value) {
159:                this .remote = value;
160:            }
161:
162:            /**
163:             * The value of the ejb-link element must be the ejb-name of an
164:             * enterprise bean in the same ejb-jar file or in another ejb-jar
165:             * file in the same Java EE application unit.
166:             * <p/>
167:             * Alternatively, the name in the ejb-link element may be
168:             * composed of a path name specifying the ejb-jar containing the
169:             * referenced enterprise bean with the ejb-name of the target
170:             * bean appended and separated from the path name by "#".  The
171:             * path name is relative to the Deployment File containing
172:             * Deployment Component that is referencing the enterprise
173:             * bean.  This allows multiple enterprise beans with the same
174:             * ejb-name to be uniquely identified.
175:             * <p/>
176:             * Examples:
177:             * <p/>
178:             * <ejb-link>EmployeeRecord</ejb-link>
179:             * <p/>
180:             * <ejb-link>../products/product.jar#ProductEJB</ejb-link>
181:             */
182:            public String getEjbLink() {
183:                return ejbLink;
184:            }
185:
186:            public void setEjbLink(String value) {
187:                this .ejbLink = value;
188:            }
189:
190:            public String getMappedName() {
191:                return mappedName;
192:            }
193:
194:            public void setMappedName(String value) {
195:                this .mappedName = value;
196:            }
197:
198:            public List<InjectionTarget> getInjectionTarget() {
199:                if (injectionTarget == null) {
200:                    injectionTarget = new ArrayList<InjectionTarget>();
201:                }
202:                return this .injectionTarget;
203:            }
204:
205:            public String getId() {
206:                return id;
207:            }
208:
209:            public void setId(String value) {
210:                this.id = value;
211:            }
212:
213:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.