Source Code Cross Referenced for TestOverriden00.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: TestOverriden00.java 1970 2007-10-16 11:49:25Z benoitf $
023:         * --------------------------------------------------------------------------
024:         */package org.ow2.easybeans.tests.deploymentdesc;
025:
026:        import javax.naming.NamingException;
027:        import javax.transaction.HeuristicMixedException;
028:        import javax.transaction.HeuristicRollbackException;
029:        import javax.transaction.NotSupportedException;
030:        import javax.transaction.RollbackException;
031:        import javax.transaction.SystemException;
032:
033:        import org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.xmldescriptor.ItfOverrideTester00;
034:        import org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.xmldescriptor.SFSBOverrideTester00;
035:        import org.ow2.easybeans.tests.common.helper.EJBHelper;
036:        import org.testng.annotations.BeforeMethod;
037:        import org.testng.annotations.Test;
038:
039:        /**
040:         * Verifies if the deployment descriptor overrides the bean annotation.
041:         * @reference JSR 220 - FINAL RELEASE
042:         * @requirement the bean SFSBOverrideTester must be deployed to make the tests,
043:         *              and, the SFSBSimpleBeanOverrided with the deployment descriptor
044:         *              must be deployed too.
045:         * @setup gets an instance of the SFSBOverrideTester.
046:         * @author Gisele Pinheiro Souza
047:         * @author Eduardo Studzinski Estima de Castro
048:         */
049:        public class TestOverriden00 {
050:
051:            /**
052:             * Bean used to verify the local access.
053:             */
054:            private ItfOverrideTester00 tester;
055:
056:            /**
057:             * Creates the stateful bean used during the tests.
058:             * @throws Exception if an error occurs during the lookup.
059:             */
060:            @BeforeMethod
061:            public void setup() throws Exception {
062:                tester = EJBHelper.getBeanRemoteInstance(
063:                        SFSBOverrideTester00.class, ItfOverrideTester00.class);
064:            }
065:
066:            /**
067:             * Verifies if the injection works when the local interface and the bean
068:             * name are used. The bean has a different name defined in the annotation
069:             * and in the deployment descriptor,and the local interface defined in the
070:             * deployment descriptor is different too. The test uses the values defined
071:             * in the deployment descriptor.
072:             * @input -
073:             * @output the correct method execution.
074:             */
075:            @Test
076:            public void testLocalInjection() {
077:                tester.testLocalInjection();
078:            }
079:
080:            /**
081:             * Verifies if the injection works when the remotel interface and the bean
082:             * name are used. The bean has a different name defined in the annotation
083:             * and in the deployment descriptor,and the remote interface defined in the
084:             * deployment descriptor is different too. The test uses the values defined
085:             * in the deployment descriptor.
086:             * @input -
087:             * @output the correct method execution.
088:             */
089:            @Test
090:            public void testRemoteInjection() {
091:                tester.testRemoteInjection();
092:            }
093:
094:            /**
095:             * Verififes if the lookup works when a local interface is used. The
096:             * interface defined as local in the deployment descriptor is different of
097:             * the interface defined in the bean class. The test uses the values defined
098:             * in the deployment descriptor.
099:             * @input -
100:             * @output the correct method execution.
101:             * @throws Exception if a lookup error occurs.
102:             */
103:            @Test
104:            public void testLookupLocal() throws Exception {
105:                tester.testLookupLocal();
106:            }
107:
108:            /**
109:             * Verififes if the lookup works when a local interface is used. The
110:             * interface defined as remote in the deployment descriptor is different of
111:             * the interface defined in the bean class. The test uses the values defined
112:             * in the deployment descriptor.
113:             * @input -
114:             * @output the correct method execution.
115:             * @throws Exception if a lookup error occurs.
116:             */
117:            @Test
118:            public void testLookupRemote() throws Exception {
119:                tester.testLookupRemote();
120:            }
121:
122:            /**
123:             * Verifies if the container overrides the transaction type when a
124:             * deployment descriptor is used. The transaction type defined in the bean
125:             * is container managed, but the transaction type defined in the deployment
126:             * descriptor is bean managed.The bean gets an instance of an user
127:             * transaction. If the transaction is bean managed, the operation must not
128:             * throw an exception.
129:             * @input -
130:             * @output the correct method execution.
131:             * @throws NamingException if a lookup error occurs.
132:             * @throws SystemException if an unexpected error occurs.
133:             * @throws NotSupportedException if the resquest cannot be made.
134:             * @throws HeuristicRollbackException if a heuristic decision was made and
135:             *         some relevant update was rolled back.
136:             * @throws RollbackException if the transaction was rolled back instead of
137:             *         committed.
138:             * @throws HeuristicMixedException if a heuristic decision was made and some
139:             *         relevant update was commited and others rolled back.
140:             * @throws IllegalStateException if there is an illegal state
141:             * @throws SecurityException if there is a security exception
142:             */
143:            @Test
144:            public void testTransactionType() throws IllegalStateException,
145:                    SecurityException, HeuristicMixedException,
146:                    HeuristicRollbackException, RollbackException,
147:                    SystemException, NotSupportedException, NamingException {
148:                tester.testTransactionType();
149:            }
150:
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.