Source Code Cross Referenced for JdbcEndpoint.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » runtime » component » jdbc » 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 » ESB » cbesb 1.2 » com.bostechcorp.cbesb.runtime.component.jdbc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ChainBuilder ESB
003:         * 		Visual Enterprise Integration
004:         * 
005:         * Copyright (C) 2006 Bostech Corporation
006:         * 
007:         * This program is free software; you can redistribute it and/or modify it 
008:         * under the terms of the GNU General Public License as published by the 
009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
010:         * any later version.
011:         *
012:         * This program is distributed in the hope that it will be useful, 
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
015:         * for more details.
016:         * 
017:         * You should have received a copy of the GNU General Public License along with 
018:         * this program; if not, write to the Free Software Foundation, Inc., 
019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020:         *
021:         * $Id: JdbcEndpoint.java 9749 2007-10-26 11:05:37Z lzheng $
022:         */
023:
024:        package com.bostechcorp.cbesb.runtime.component.jdbc;
025:
026:        import java.util.ArrayList;
027:        import java.util.List;
028:
029:        import javax.jbi.messaging.MessageExchange;
030:
031:        import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.IComponentProcessor;
032:        import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.LifeCycleEndpoint;
033:        import com.bostechcorp.cbesb.runtime.component.jdbc.processors.JdbcProviderProcessor;
034:
035:        public class JdbcEndpoint extends LifeCycleEndpoint {
036:
037:            private String driver;
038:            private String url;
039:            private String user;
040:            private String password;
041:            private String requestHandler;
042:            private String execHandler;
043:            private boolean autoCommit;
044:            private int connectionRetries;
045:            private int connectionInterval;
046:            private int transactionTimeout;
047:            private int defaultPageSize;
048:
049:            /**
050:             * @return the autoCommit
051:             */
052:            public boolean isAutoCommit() {
053:                return autoCommit;
054:            }
055:
056:            /**
057:             * @param autoCommit the autoCommit to set
058:             */
059:            public void setAutoCommit(boolean autoCommit) {
060:                this .autoCommit = autoCommit;
061:            }
062:
063:            /**
064:             * @return the connectionInterval
065:             */
066:            public int getConnectionInterval() {
067:                return connectionInterval;
068:            }
069:
070:            /**
071:             * @param connectionInterval the connectionInterval to set
072:             */
073:            public void setConnectionInterval(int connectionInterval) {
074:                this .connectionInterval = connectionInterval;
075:            }
076:
077:            /**
078:             * @return the connectionRetries
079:             */
080:            public int getConnectionRetries() {
081:                return connectionRetries;
082:            }
083:
084:            /**
085:             * @param connectionRetries the connectionRetries to set
086:             */
087:            public void setConnectionRetries(int connectionRetries) {
088:                this .connectionRetries = connectionRetries;
089:            }
090:
091:            /**
092:             * @return the defaultPageSize
093:             */
094:            public int getDefaultPageSize() {
095:                return defaultPageSize;
096:            }
097:
098:            /**
099:             * @param defaultPageSize the defaultPageSize to set
100:             */
101:            public void setDefaultPageSize(int defaultPageSize) {
102:                this .defaultPageSize = defaultPageSize;
103:            }
104:
105:            /**
106:             * @return the driver
107:             */
108:            public String getDriver() {
109:                return driver;
110:            }
111:
112:            /**
113:             * @param driver the driver to set
114:             */
115:            public void setDriver(String driver) {
116:                this .driver = driver;
117:            }
118:
119:            /**
120:             * @return the execHandler
121:             */
122:            public String getExecHandler() {
123:                return execHandler;
124:            }
125:
126:            /**
127:             * @param execHandler the execHandler to set
128:             */
129:            public void setExecHandler(String execHandler) {
130:                this .execHandler = execHandler;
131:            }
132:
133:            /**
134:             * @return the requestHandler
135:             */
136:            public String getRequestHandler() {
137:                return requestHandler;
138:            }
139:
140:            /**
141:             * @param requestHandler the requestHandler to set
142:             */
143:            public void setRequestHandler(String requestHandler) {
144:                this .requestHandler = requestHandler;
145:            }
146:
147:            /**
148:             * @return the password
149:             */
150:            public String getPassword() {
151:                return password;
152:            }
153:
154:            /**
155:             * @param password the password to set
156:             */
157:            public void setPassword(String password) {
158:                this .password = password;
159:            }
160:
161:            /**
162:             * @return the transactionTimeout
163:             */
164:            public int getTransactionTimeout() {
165:                return transactionTimeout;
166:            }
167:
168:            /**
169:             * @param transactionTimeout the transactionTimeout to set
170:             */
171:            public void setTransactionTimeout(int transactionTimeout) {
172:                this .transactionTimeout = transactionTimeout;
173:            }
174:
175:            /**
176:             * @return the url
177:             */
178:            public String getUrl() {
179:                return url;
180:            }
181:
182:            /**
183:             * @param url the url to set
184:             */
185:            public void setUrl(String url) {
186:                this .url = url;
187:            }
188:
189:            /**
190:             * @return the user
191:             */
192:            public String getUser() {
193:                return user;
194:            }
195:
196:            /**
197:             * @param user the user to set
198:             */
199:            public void setUser(String user) {
200:                this .user = user;
201:            }
202:
203:            public void processAsConsumer(MessageExchange exchange)
204:                    throws Exception {
205:
206:                Exception e = new Exception(
207:                        "JDBCConfig component doesn't support Consumer role ");
208:                exchange.setError(e);
209:                channel.send(exchange);
210:                throw e;
211:
212:            }
213:
214:            protected IComponentProcessor createProviderProcessor()
215:                    throws Exception {
216:                return new JdbcProviderProcessor(this );
217:            }
218:
219:            protected IComponentProcessor createConsumerProcessor() {
220:                return null;
221:            }
222:
223:            /**********************************************************************************
224:             * These attributes and methods customize the LifeCycleEndpoint for this component
225:             ***********************************************************************************/
226:
227:            /*
228:             * The display parameters are general information for the admin console to display.
229:             */
230:            public String[] getDisplayParameterTitles() {
231:                return new String[] { JdbcPropertiesEnumeration.DRIVER.name(),
232:                        JdbcPropertiesEnumeration.URL.name(),
233:                        JdbcPropertiesEnumeration.USER.name(),
234:                        JdbcPropertiesEnumeration.AUTO_COMMIT.name(),
235:                        JdbcPropertiesEnumeration.CONNECTION_INTERVAL.name() };
236:            }
237:
238:            /*
239:             * The values returned here correspond to the titles above.
240:             */
241:            public String[] getDisplayParameters() {
242:                return new String[] {
243:                        JdbcPropertiesEnumeration.DRIVER.getValue(this ),
244:                        JdbcPropertiesEnumeration.URL.getValue(this ),
245:                        JdbcPropertiesEnumeration.USER.getValue(this ),
246:                        JdbcPropertiesEnumeration.AUTO_COMMIT.getValue(this ),
247:                        JdbcPropertiesEnumeration.CONNECTION_INTERVAL
248:                                .getValue(this ) };
249:            }
250:
251:            /*
252:             * This returns a list of properties that can be read.
253:             */
254:            public String[] getGetableProperties() {
255:                JdbcPropertiesEnumeration[] fps = JdbcPropertiesEnumeration
256:                        .values();
257:                List<String> result = new ArrayList<String>();
258:                for (int i = 0; i < fps.length; i++) {
259:                    result.add(fps[i].name());
260:                }
261:                String[] sr = new String[result.size()];
262:                return result.toArray(sr);
263:            }
264:
265:            /*
266:             * This gets one property from the list above.
267:             */
268:            public String getProperty(int index) {
269:                return JdbcPropertiesEnumeration.values()[index].getValue(this );
270:            }
271:
272:            /*
273:             * This gets one property from the list above.
274:             */
275:            public String getProperty(String property) {
276:                return JdbcPropertiesEnumeration.valueOf(property).getValue(
277:                        this );
278:            }
279:
280:            /*
281:             * This returns a list of properties that can be set.
282:             */
283:            public String[] getSetableProperties() {
284:                JdbcPropertiesEnumeration[] fps = JdbcPropertiesEnumeration
285:                        .values();
286:                List<String> result = new ArrayList<String>();
287:                for (int i = 0; i < fps.length; i++) {
288:                    if (fps[i].isSetable())
289:                        result.add(fps[i].name());
290:                }
291:                String[] sr = new String[result.size()];
292:                return result.toArray(sr);
293:            }
294:
295:            /*
296:             * This sets one property from the list above.
297:             */
298:            public void setProperty(int index, String value) {
299:                JdbcPropertiesEnumeration.values()[index].setValue(this , value);
300:            }
301:
302:            /*
303:             * This sets one property from the list above.
304:             */
305:            public void setProperty(String property, String value) {
306:                JdbcPropertiesEnumeration.valueOf(property).setValue(this ,
307:                        value);
308:            }
309:
310:            /**************************************************
311:             * Done with LifeCycleEndpoint methods
312:             ***************************************************/
313:
314:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.