Source Code Cross Referenced for Configuration.java in  » Testing » mockrunner-0.4 » com » mockrunner » ejb » 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 » Testing » mockrunner 0.4 » com.mockrunner.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package com.mockrunner.ejb;
02:
03:        import javax.naming.Context;
04:
05:        /**
06:         * Global configuration options regarding EJB and JNDI.
07:         * Usually you do not have to change these options.
08:         */
09:        public class Configuration {
10:            private String userTransactionJNDIName;
11:            private boolean bindMockUserTransactionToJNDI;
12:            private Context context;
13:
14:            public Configuration() {
15:                this ("javax.transaction.UserTransaction");
16:            }
17:
18:            public Configuration(String userTransactionJNDIName) {
19:                this (userTransactionJNDIName, true);
20:            }
21:
22:            public Configuration(String userTransactionJNDIName,
23:                    boolean bindMockUserTransactionToJNDI) {
24:                this .userTransactionJNDIName = userTransactionJNDIName;
25:                this .bindMockUserTransactionToJNDI = bindMockUserTransactionToJNDI;
26:                this .context = null;
27:            }
28:
29:            /**
30:             * Get the JNDI context. This method returns <code>null</code> if no context
31:             * is set. In this case the {@link com.mockrunner.mock.ejb.EJBMockObjectFactory}
32:             * uses the MockEJB JNDI implementation.
33:             * @return the JNDI context
34:             */
35:            public Context getContext() {
36:                return context;
37:            }
38:
39:            /**
40:             * Set the JNDI context used by {@link com.mockrunner.mock.ejb.EJBMockObjectFactory}.
41:             * @param context the JNDI context
42:             */
43:            public void setContext(Context context) {
44:                this .context = context;
45:            }
46:
47:            /**
48:             * Get if the mock transaction should be bound to JNDI.
49:             * @return if the mock transaction should be bound to JNDI
50:             */
51:            public boolean getBindMockUserTransactionToJNDI() {
52:                return bindMockUserTransactionToJNDI;
53:            }
54:
55:            /**
56:             * Set if the mock transaction should be bound to JNDI.
57:             * When the {@link com.mockrunner.mock.ejb.EJBMockObjectFactory}
58:             * creates a {@link com.mockrunner.mock.ejb.MockUserTransaction},
59:             * it tries to rebind the transaction to the JNDI tree with the
60:             * specified name {@link #setUserTransactionJNDIName}, the name
61:             * <code>javax.transaction.UserTransaction</code> (which is used
62:             * by MockEJB and Weblogic) and the name 
63:             * <code>java:comp/UserTransaction</code> (which is the standard name), 
64:             * if this option is <code>true</code>. 
65:             * If this option is <code>false</code>, a mock transaction is created 
66:             * but not bound to JNDI.
67:             * Default is <code>true</code>.
68:             * @param bindMockUserTransactionToJNDI should the mock transaction be bound to JNDI
69:             */
70:            public void setBindMockUserTransactionToJNDI(
71:                    boolean bindMockUserTransactionToJNDI) {
72:                this .bindMockUserTransactionToJNDI = bindMockUserTransactionToJNDI;
73:            }
74:
75:            /**
76:             * Get the JNDI name for the user transaction.
77:             * @return the JNDI name for the user transaction
78:             */
79:            public String getUserTransactionJNDIName() {
80:                return userTransactionJNDIName;
81:            }
82:
83:            /**
84:             * Set the JNDI name for the user transaction. The
85:             * {@link com.mockrunner.mock.ejb.EJBMockObjectFactory} tries to
86:             * obtain a <code>UserTransaction</code> from JNDI using this
87:             * name. If the lookup fails, a {@link com.mockrunner.mock.ejb.MockUserTransaction}
88:             * is created and bound to JNDI, if {@link #setBindMockUserTransactionToJNDI} is
89:             * set to <code>true</code>.
90:             * Default is <code>javax.transaction.UserTransaction</code>.
91:             * @param userTransactionJNDIName the JNDI name for the user transaction
92:             */
93:            public void setUserTransactionJNDIName(
94:                    String userTransactionJNDIName) {
95:                this.userTransactionJNDIName = userTransactionJNDIName;
96:            }
97:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.