Source Code Cross Referenced for TestInterceptor00.java in  » J2EE » ow2-easybeans » org » ow2 » easybeans » tests » deploymentdesc » 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 » ow2 easybeans » org.ow2.easybeans.tests.deploymentdesc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * EasyBeans
003:         * Copyright (C) 2006 Bull S.A.S.
004:         * Contact: easybeans@ow2.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * --------------------------------------------------------------------------
022:         * $Id: TestInterceptor00.java 1970 2007-10-16 11:49:25Z benoitf $
023:         * --------------------------------------------------------------------------
024:         */package org.ow2.easybeans.tests.deploymentdesc;
025:
026:        import org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.interceptorxml.ItfInterceptorTester00;
027:        import org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.interceptorxml.SFSBInterceptorTester00;
028:        import org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.ItfCallbackLoggerAccess;
029:        import org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.SLSBCallbackLoggerAccess;
030:        import org.ow2.easybeans.tests.common.helper.EJBHelper;
031:        import org.testng.annotations.BeforeMethod;
032:        import org.testng.annotations.Test;
033:
034:        /**
035:         * Verifies if the container can deploy an bean with the interceptors defined in
036:         * the deployment description. Item 12.8
037:         * @reference JSR 220 - FINAL RELEASE
038:         * @requirement the bean SFSBInterceptorTester00,SFSBInterceptorXML and
039:         *              SLSBCallbackLoggerAccess must be deployed to make the tests,
040:         *              and, the deployment descriptors must be used too.
041:         * @setup gets an instance of the SFSBInterceptorTester00 and the
042:         *        SLSBCallbackLoggerAccess. Also, it cleans the log.
043:         * @author Gisele Pinheiro Souza
044:         * @author Eduardo Studzinski Estima de Castro
045:         */
046:        public class TestInterceptor00 {
047:
048:            /**
049:             * Bean used to verify the interceptor definition..
050:             */
051:            private ItfInterceptorTester00 tester;
052:
053:            /**
054:             * Bean used to clean the callback methods.
055:             */
056:            private ItfCallbackLoggerAccess clBean;
057:
058:            /**
059:             * Creates the beans used during the tests.
060:             * @throws Exception if an error occurs during the lookup.
061:             */
062:            @BeforeMethod
063:            public void setup() throws Exception {
064:                clBean = EJBHelper.getBeanRemoteInstance(
065:                        SLSBCallbackLoggerAccess.class,
066:                        ItfCallbackLoggerAccess.class);
067:                clBean.deleteAll();
068:                tester = EJBHelper.getBeanRemoteInstance(
069:                        SFSBInterceptorTester00.class,
070:                        ItfInterceptorTester00.class);
071:            }
072:
073:            /**
074:             * Verifies if the default interceptors and the class interceptors defined
075:             * in the deployment descriptors are called.
076:             * @input -
077:             * @output the correct method execution.
078:             */
079:            @Test
080:            public void testInterceptorOrder01() {
081:                tester.testInterceptorOrder01();
082:            }
083:
084:            /**
085:             * Verifies if the interceptor defined for a method works correctly. The
086:             * interceptor is defined to the methods with the name insertOrder2, so the
087:             * both methods( insertOrder2(List) and insertOrder2(List, int) ) must have
088:             * the same interceptors.
089:             * @input -
090:             * @output the correct method execution.
091:             */
092:            @Test
093:            public void testInterceptorOrder02() {
094:                tester.testInterceptorOrder02();
095:            }
096:
097:            /**
098:             * Verifies the element exclude class interceptors.
099:             * @input -
100:             * @output the correct method execution.
101:             */
102:            @Test
103:            public void testInterceptorOrder03() {
104:                tester.testInterceptorOrder03();
105:            }
106:
107:            /**
108:             * Verifies if the postConstruct defined by deployment descriptor in a bean
109:             * class is called.
110:             * @input -
111:             * @output the correct method execution.
112:             */
113:            @Test
114:            public void testPostConstruct() {
115:                tester.testPostConstruct();
116:            }
117:
118:            /**
119:             * Verifies if the preDestroy defined by deployment descriptor in a bean
120:             * class is called.
121:             * @input -
122:             * @output the correct method execution.
123:             */
124:            @Test
125:            public void testPreDestroy() {
126:                tester.testPreDestroy();
127:            }
128:
129:            /**
130:             * Verifies if the prePassivate defined by deployment descriptor in a bean
131:             * class is called.
132:             * @input -
133:             * @output the correct method execution.
134:             * @throws Exception if an error occurs during the test.
135:             */
136:            @Test
137:            public void testPrePassivate() throws Exception {
138:                tester.testPrePassivate();
139:                //TODO: Needs to be implemented
140:            }
141:
142:            /**
143:             * Verifies if the postActivate defined by deployment descriptor in a bean
144:             * class is called.
145:             * @input -
146:             * @output the correct method execution.
147:             * @throws Exception if an error occurs during the test.
148:             */
149:            @Test
150:            public void testPostActivate() throws Exception {
151:                tester.testPostActivate();
152:                //TODO: Needs to be implemented
153:            }
154:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.