Source Code Cross Referenced for SessionEnterpriseBean.java in  » EJB-Server-JBoss-4.2.1 » ejb3 » org » jboss » ejb3 » metamodel » 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 » EJB Server JBoss 4.2.1 » ejb3 » org.jboss.ejb3.metamodel 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JBoss, Home of Professional Open Source.
003:         * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004:         * as indicated by the @author tags. See the copyright.txt file in the
005:         * distribution for a full listing of individual contributors.
006:         *
007:         * This is free software; you can redistribute it and/or modify it
008:         * under the terms of the GNU Lesser General Public License as
009:         * published by the Free Software Foundation; either version 2.1 of
010:         * the License, or (at your option) any later version.
011:         *
012:         * This software is distributed in the hope that it will be useful,
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015:         * Lesser General Public License for more details.
016:         *
017:         * You should have received a copy of the GNU Lesser General Public
018:         * License along with this software; if not, write to the Free
019:         * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020:         * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021:         */
022:        package org.jboss.ejb3.metamodel;
023:
024:        import java.util.List;
025:        import java.util.ArrayList;
026:        import org.jboss.logging.Logger;
027:
028:        import org.jboss.metamodel.descriptor.PersistenceUnitRef;
029:
030:        /**
031:         * Represents a Session EJB element of the ejb-jar.xml deployment descriptor for
032:         * the 1.4 schema
033:         *
034:         * @author <a href="mailto:bdecoste@jboss.com">William DeCoste</a>
035:         * @version <tt>$Revision: 60233 $</tt>
036:         */
037:        public class SessionEnterpriseBean extends EnterpriseBean {
038:            private static final Logger log = Logger
039:                    .getLogger(SessionEnterpriseBean.class);
040:
041:            public static final String STATELESS = "Stateless";
042:
043:            public static final String STATEFUL = "Stateful";
044:
045:            // ejb-jar.xml
046:            private String sessionType = STATELESS;
047:            private Method aroundInvoke;
048:            private Method postConstruct;
049:            private Method postActivate;
050:            private Method preDestroy;
051:            private Method prePassivate;
052:            private List<RemoveMethod> removeMethods = new ArrayList<RemoveMethod>();
053:            private List<InitMethod> initMethods = new ArrayList<InitMethod>();
054:
055:            private String clustered = null;
056:            private ClusterConfig clusterConfig = null;
057:            private CacheConfig cacheConfig = null;
058:
059:            private String concurrent = null;
060:
061:            public CacheConfig getCacheConfig() {
062:                return cacheConfig;
063:            }
064:
065:            public void setCacheConfig(CacheConfig cacheConfig) {
066:                this .cacheConfig = cacheConfig;
067:            }
068:
069:            public String getConcurrent() {
070:                return concurrent;
071:            }
072:
073:            public void setConcurrent(String concurrent) {
074:                this .concurrent = concurrent;
075:            }
076:
077:            public String getClustered() {
078:                return clustered;
079:            }
080:
081:            public void setClustered(String clustered) {
082:                this .clustered = clustered;
083:            }
084:
085:            public ClusterConfig getClusterConfig() {
086:                return clusterConfig;
087:            }
088:
089:            public void setClusterConfig(ClusterConfig clusterConfig) {
090:                this .clusterConfig = clusterConfig;
091:            }
092:
093:            public List<RemoveMethod> getRemoveMethods() {
094:                return removeMethods;
095:            }
096:
097:            public void addRemoveMethod(RemoveMethod method) {
098:                removeMethods.add(method);
099:            }
100:
101:            public List<InitMethod> getInitMethods() {
102:                return initMethods;
103:            }
104:
105:            public void addInitMethod(InitMethod method) {
106:                initMethods.add(method);
107:            }
108:
109:            public boolean isStateless() {
110:                return sessionType.equals(STATELESS);
111:            }
112:
113:            public boolean isStateful() {
114:                return sessionType.equals(STATEFUL);
115:            }
116:
117:            public String getSessionType() {
118:                return sessionType;
119:            }
120:
121:            public void setSessionType(String sessionType) {
122:                this .sessionType = sessionType;
123:            }
124:
125:            public Method getAroundInvoke() {
126:                return aroundInvoke;
127:            }
128:
129:            public void setAroundInvoke(Method aroundInvoke) {
130:                this .aroundInvoke = aroundInvoke;
131:            }
132:
133:            public Method getPostActivate() {
134:                if (sessionType.equals(STATELESS))
135:                    return null;
136:                return postActivate;
137:            }
138:
139:            public void setPostActivate(Method postActivate) {
140:                this .postActivate = postActivate;
141:            }
142:
143:            public Method getPostConstruct() {
144:                return postConstruct;
145:            }
146:
147:            public void setPostConstruct(Method postConstruct) {
148:                this .postConstruct = postConstruct;
149:            }
150:
151:            public Method getPreDestroy() {
152:                return preDestroy;
153:            }
154:
155:            public void setPreDestroy(Method preDestroy) {
156:                this .preDestroy = preDestroy;
157:            }
158:
159:            public Method getPrePassivate() {
160:                if (sessionType.equals(STATELESS))
161:                    return null;
162:                return prePassivate;
163:            }
164:
165:            public void setPrePassivate(Method prePassivate) {
166:                this .prePassivate = prePassivate;
167:            }
168:
169:            public String toString() {
170:                StringBuffer sb = new StringBuffer(100);
171:                sb.append('[');
172:                sb.append(super .toString());
173:                sb.append(",");
174:                sb.append("sessionType=").append(sessionType);
175:                sb.append(']');
176:                return sb.toString();
177:            }
178:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.