Source Code Cross Referenced for PMF.java in  » Database-ORM » Speedo_1.4.5 » org » objectweb » speedo » jmx » mbeans » 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 » Database ORM » Speedo_1.4.5 » org.objectweb.speedo.jmx.mbeans 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright (C) 2001-2005 France Telecom R&D
003:         */package org.objectweb.speedo.jmx.mbeans;
004:
005:        import java.util.Arrays;
006:        import java.util.Collection;
007:        import java.util.Map;
008:
009:        import org.objectweb.jorm.api.PMapper;
010:        import org.objectweb.perseus.pool.api.Pool;
011:        import org.objectweb.perseus.pool.api.PoolAttributes;
012:        import org.objectweb.speedo.AbstractSpeedo;
013:        import org.objectweb.speedo.api.SpeedoProperties;
014:        import org.objectweb.speedo.mapper.api.JormFactory;
015:        import org.objectweb.speedo.mapper.api.JormFactoryAttributes;
016:        import org.objectweb.speedo.pm.jdo.api.JDOPOManagerFactoryItf;
017:
018:        /**
019:         * 
020:         *
021:         * @author chassase
022:         */
023:        public class PMF implements  PMFMBean {
024:
025:            private JDOPOManagerFactoryItf pmf;
026:            private PMapper mapper;
027:            private JormFactory jf;
028:            private JormFactoryAttributes jfa;
029:            private PoolAttributes pa;
030:            private Pool pool;
031:
032:            public PMF(PoolAttributes pa, Pool pool,
033:                    JDOPOManagerFactoryItf pmf, PMapper mapper, JormFactory jf,
034:                    JormFactoryAttributes jfa) {
035:                this .pa = pa;
036:                this .pool = pool;
037:                this .pmf = pmf;
038:                this .mapper = mapper;
039:                this .jf = jf;
040:                this .jfa = jfa;
041:            }
042:
043:            public int getPool_Of_PM_MaxSize() {
044:                return pa.getMaxSize();
045:            }
046:
047:            public void setPool_Of_PM_MaxSize(int arg0) throws Exception {
048:                pa.setMaxSize(arg0);
049:            }
050:
051:            public int getPool_Of_PM_MinSize() {
052:                return pa.getMinSize();
053:            }
054:
055:            public void setPool_Of_PM_MinSize(int arg0) throws Exception {
056:                pa.setMinSize(arg0);
057:            }
058:
059:            public long getPool_Of_PM_Timeout() {
060:                return pa.getTimeout();
061:            }
062:
063:            public void setPool_Of_PM_Timeout(long arg0) {
064:                pa.setTimeout(arg0);
065:            }
066:
067:            public long getPool_Of_PM_TTL() {
068:                return pa.getTTL();
069:            }
070:
071:            public void setPool_Of_PM_TTL(long arg0) {
072:                pa.setTTL(arg0);
073:            }
074:
075:            public int getPool_Of_PM_Current_Size() {
076:                return pool.getSize();
077:            }
078:
079:            public int getPool_Of_PM_Current_Free_Number() {
080:                return pool.getFreeResourceNumber();
081:            }
082:
083:            public int getPool_Of_PM_Current_Used_Number() {
084:                return pool.getUsedResourceNumber();
085:            }
086:
087:            public boolean getTransaction_RetainValues() {
088:                return pmf.getRetainValues();
089:            }
090:
091:            public void setTransaction_RetainValues(boolean rv) {
092:                pmf.setRetainValues(rv);
093:            }
094:
095:            public boolean getTransaction_RestoreValues() {
096:                return pmf.getRestoreValues();
097:            }
098:
099:            public void setTransaction_RestoreValues(boolean rv) {
100:                pmf.setRestoreValues(rv);
101:            }
102:
103:            public boolean getTransaction_MultiThread() {
104:                return pmf.getMultithreaded();
105:            }
106:
107:            public void setTransaction_MultiThread(boolean mt) {
108:                pmf.setMultithreaded(mt);
109:            }
110:
111:            public boolean getIsOpen() {
112:                return !pmf.isClosed();
113:            }
114:
115:            public String getMappingStructure() {
116:                return AbstractSpeedo.getMappingStructureString(jf
117:                        .getMappingStructureRule());
118:            }
119:
120:            public boolean getDebug() {
121:                return Boolean
122:                        .valueOf(
123:                                pmf.getProperties().getProperty(
124:                                        SpeedoProperties.DEBUG)).booleanValue();
125:            }
126:
127:            public void setDebug(boolean d) {
128:                pmf.getProperties().setProperty(SpeedoProperties.DEBUG,
129:                        Boolean.TRUE.toString());
130:            }
131:
132:            public Collection getPersistentClasseNames() {
133:                return Arrays.asList(mapper.getMappedClasses());
134:            }
135:
136:            public void clean() {
137:                try {
138:                    pmf.clean();
139:                } catch (Exception e) {
140:                    e.printStackTrace();
141:                }
142:            }
143:
144:            public Map getProperties() {
145:                return jfa.getSpeedoProperties();
146:            }
147:
148:            public void setProperty(String name, String value) {
149:                jfa.setSpeedoProperty(new String[] { name, value });
150:            }
151:
152:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.