Source Code Cross Referenced for UtilEJB.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » util » 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 » Workflow Engines » wfmopen 2.1.1 » de.danet.an.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Danet GmbH
003:         * 
004:         * $Id: UtilEJB.java,v 1.5 2006/10/11 09:05:54 drmlipp Exp $
005:         *
006:         * $Log: UtilEJB.java,v $
007:         * Revision 1.5  2006/10/11 09:05:54  drmlipp
008:         * Fixed EJB naming.
009:         *
010:         * Revision 1.4  2006/10/07 20:41:34  mlipp
011:         * Merged J2EE 1.4 adaptions from test branch.
012:         *
013:         * Revision 1.3  2005/04/08 11:28:02  drmlipp
014:         * Merged changes from 1.3 branch up to 1.3p6.
015:         *
016:         * Revision 1.2.6.1  2005/04/04 20:08:55  drmlipp
017:         * Changed WLS transaction isolation.
018:         *
019:         * Revision 1.2  2004/09/10 12:44:28  drmlipp
020:         * Enabled call by reference for weblogic by default.
021:         *
022:         * Revision 1.1.1.6  2004/08/18 15:17:35  drmlipp
023:         * Update to 1.2
024:         *
025:         * Revision 1.16  2004/07/07 11:34:00  lipp
026:         * Clarified transaction attributes.
027:         *
028:         * Revision 1.15  2004/06/23 18:50:29  lipp
029:         * Added jndi-names for jonas.
030:         *
031:         * Revision 1.14  2004/06/23 15:06:38  lipp
032:         * Started JOnAS port.
033:         *
034:         * Revision 1.13  2004/01/14 07:59:44  lipp
035:         * Added transaction isolation attribute for WLS.
036:         *
037:         * Revision 1.12  2003/09/28 19:21:09  lipp
038:         * More improvements concerning security handling.
039:         *
040:         * Revision 1.11  2003/09/11 13:25:49  lipp
041:         * Improved naming scheme for symbolic role names.
042:         *
043:         * Revision 1.10  2003/09/03 15:23:50  lipp
044:         * Support for local interfaces.
045:         *
046:         * Revision 1.9  2003/08/25 20:23:33  lipp
047:         * Fixed problem with weblogic principal.
048:         *
049:         * Revision 1.8  2003/05/23 15:42:41  lipp
050:         * Fixed deployment unit dependencies.
051:         *
052:         * Revision 1.7  2003/03/31 16:50:27  huaiyang
053:         * Logging using common-logging.
054:         *
055:         * Revision 1.6  2003/02/14 16:47:21  lipp
056:         * Fixed comments.
057:         *
058:         * Revision 1.5  2002/11/22 09:56:15  lipp
059:         * Clarified usage of the danet utility bean for user preferences.
060:         *
061:         * Revision 1.4  2002/11/18 16:21:00  montag
062:         * role-name changed to "Danet UtilEJBs User".
063:         *
064:         * Revision 1.3  2002/11/18 15:41:51  montag
065:         * wrong permission removed.
066:         *
067:         * Revision 1.2  2002/11/18 14:58:37  montag
068:         * Retrieve getLoggedOnUser() from Util ejb.
069:         *
070:         * Revision 1.1  2002/11/15 15:41:53  montag
071:         * New session ejb Util.
072:         *
073:         *
074:         */
075:        package de.danet.an.util;
076:
077:        import java.security.Principal;
078:
079:        import javax.ejb.SessionBean;
080:        import javax.ejb.SessionContext;
081:        import javax.ejb.CreateException;
082:
083:        /**
084:         * The stateless session bean <code>UtilEJB</code> provides server-side
085:         * util functionalitity which can be used by client applications.
086:         * 
087:         * @ejb.bean name="Util" display-name="Danet Util EJB"
088:         * jndi-name="ejb/@@@_Utility-EJBs_UtilEJB_JNDI_Name_@@@"
089:         * local-jndi-name="ejb/@@@_Utility-EJBs_UtilEJB_JNDI_Name_@@@Local"
090:         * type="Stateless" transaction-type="Container" view-type="both"
091:         * @jonas.bean ejb-name="Util" 
092:         * jndi-name="@@@_Utility-EJBs_UtilEJB_JNDI_Name_@@@"
093:         * @ejb.home remote-class="de.danet.an.util.UtilHome"
094:         * @ejb.interface remote-class="de.danet.an.util.Util"
095:         * @ejb.transaction type="Required"
096:         * @weblogic.enable-call-by-reference True
097:         */
098:        public class UtilEJB implements  SessionBean {
099:
100:            private static final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory
101:                    .getLog(UtilEJB.class);
102:
103:            /**
104:             *The SessionContext interface of the instance.
105:             */
106:            private SessionContext ctx;
107:
108:            /**
109:             * Set the associated session context. The container calls this method 
110:             * after the instance creation.
111:             * @see javax.ejb.SessionBean
112:             * @param context a SessionContext interface for the instance
113:             */
114:            public void setSessionContext(SessionContext context) {
115:                ctx = context;
116:            }
117:
118:            /**
119:             * The activate method is called when the instance is activated from its 
120:             * "passive" state. The instance should acquire any resource that it has 
121:             * released earlier in the ejbPassivate() method.
122:             * @see javax.ejb.SessionBean
123:             */
124:            public void ejbActivate() {
125:                // nothing to do
126:            }
127:
128:            /**
129:             * The passivate method is called before the instance enters the 
130:             * "passive" state. The instance should release any resources that it 
131:             * can re-acquire later in the ejbActivate() method.
132:             * @see javax.ejb.SessionBean
133:             */
134:            public void ejbPassivate() {
135:                // nothing to do
136:            }
137:
138:            /**
139:             * A container invokes this method before it ends the life of the session 
140:             * object. This happens as a result of a client's invoking a remove 
141:             * operation, or when a container decides to terminate the session object 
142:             * after a timeout.
143:             * @see javax.ejb.SessionBean
144:             */
145:            public void ejbRemove() {
146:                // nothing to do
147:            }
148:
149:            /**
150:             * Create an new instance of StaffDirectoryEJB.
151:             * @throws CreateException if the StaffDirectoryEJB can not
152:             * be create.
153:             */
154:            public void ejbCreate() throws CreateException {
155:                // nothing to do
156:            }
157:
158:            /**
159:             * Returns the user currently logged on as a <code>Principal</code>.
160:             * @return the caller principal.
161:             * @ejb.interface-method
162:             */
163:            public Principal getEJBPrincipal() {
164:                return new SimplePrincipal(ctx.getCallerPrincipal().getName());
165:            }
166:
167:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.