File: connection-pool.html

package info (click to toggle)
cocoon 1.8-1
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 12,016 kB
  • ctags: 3,793
  • sloc: xml: 16,682; java: 8,089; sh: 174; makefile: 61
file content (291 lines) | stat: -rw-r--r-- 39,236 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<HTML><HEAD><SCRIPT language="JavaScript" src="resources/script.js" type="text/javascript"></SCRIPT><TITLE>Using DB Connection Pooling</TITLE></HEAD><BODY alink="#cc0000" bgcolor="#ffffff" leftmargin="4" link="#039acc" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0086b2"><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="resources/logo.gif" vspace="0" width="135"></TD><TD align="left" background="resources/line.gif" colspan="2" height="5" valign="top" width="100%"><IMG align="left" border="0" height="5" hspace="0" src="resources/line.gif" vspace="0" width="1"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="2" height="35" valign="top" width="100%"><IMG align="right" alt="" border="0" height="35" hspace="0" src="graphics/connection-pool-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" background="resources/bottom.gif" bgcolor="#0086b2" height="20" valign="top" width="100%"><IMG align="left" border="0" height="20" hspace="0" src="resources/bottom.gif" vspace="0" width="3"></TD><TD align="right" background="resources/bottom.gif" bgcolor="#0086b2" height="20" valign="top" width="288"><TABLE border="0" cellpadding="0" cellspacing="0" width="288"><TR><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');" src="resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');" src="resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');" src="resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="resources/join.gif" vspace="0" width="120"><BR>
  <A href="index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Index" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','graphics/index-label-2.jpg','graphics/index-label-3.jpg');" src="graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="license.html" onMouseOut="rolloverOff('side-license');" onMouseOver="rolloverOn('side-license');"><IMG alt="License" border="0" height="12" hspace="0" name="side-license" onLoad="rolloverLoad('side-license','graphics/license-label-2.jpg','graphics/license-label-3.jpg');" src="graphics/license-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Install" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','graphics/install-label-2.jpg','graphics/install-label-3.jpg');" src="graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="install-case-solaris.html" onMouseOut="rolloverOff('side-install-case-solaris');" onMouseOver="rolloverOn('side-install-case-solaris');"><IMG alt="Install on Solaris8" border="0" height="12" hspace="0" name="side-install-case-solaris" onLoad="rolloverLoad('side-install-case-solaris','graphics/install-case-solaris-label-2.jpg','graphics/install-case-solaris-label-3.jpg');" src="graphics/install-case-solaris-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="install-case-windows.html" onMouseOut="rolloverOff('side-install-case-windows');" onMouseOver="rolloverOn('side-install-case-windows');"><IMG alt="Install on Win2k" border="0" height="12" hspace="0" name="side-install-case-windows" onLoad="rolloverLoad('side-install-case-windows','graphics/install-case-windows-label-2.jpg','graphics/install-case-windows-label-3.jpg');" src="graphics/install-case-windows-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="technologies.html" onMouseOut="rolloverOff('side-technologies');" onMouseOver="rolloverOn('side-technologies');"><IMG alt="Technologies" border="0" height="12" hspace="0" name="side-technologies" onLoad="rolloverLoad('side-technologies','graphics/technologies-label-2.jpg','graphics/technologies-label-3.jpg');" src="graphics/technologies-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="infrastructure.html" onMouseOut="rolloverOff('side-infrastructure');" onMouseOver="rolloverOn('side-infrastructure');"><IMG alt="Infrastructure" border="0" height="12" hspace="0" name="side-infrastructure" onLoad="rolloverLoad('side-infrastructure','graphics/infrastructure-label-2.jpg','graphics/infrastructure-label-3.jpg');" src="graphics/infrastructure-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="guide.html" onMouseOut="rolloverOff('side-guide');" onMouseOver="rolloverOn('side-guide');"><IMG alt="User Guide" border="0" height="12" hspace="0" name="side-guide" onLoad="rolloverLoad('side-guide','graphics/guide-label-2.jpg','graphics/guide-label-3.jpg');" src="graphics/guide-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="dynamic.html" onMouseOut="rolloverOff('side-dynamic');" onMouseOver="rolloverOn('side-dynamic');"><IMG alt="Dynamic Content" border="0" height="12" hspace="0" name="side-dynamic" onLoad="rolloverLoad('side-dynamic','graphics/dynamic-label-2.jpg','graphics/dynamic-label-3.jpg');" src="graphics/dynamic-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="how-it-works.html" onMouseOut="rolloverOff('side-how-it-works');" onMouseOver="rolloverOn('side-how-it-works');"><IMG alt="How it works" border="0" height="12" hspace="0" name="side-how-it-works" onLoad="rolloverLoad('side-how-it-works','graphics/how-it-works-label-2.jpg','graphics/how-it-works-label-3.jpg');" src="graphics/how-it-works-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="xsp.html" onMouseOut="rolloverOff('side-xsp');" onMouseOver="rolloverOn('side-xsp');"><IMG alt="XSP Processor" border="0" height="12" hspace="0" name="side-xsp" onLoad="rolloverLoad('side-xsp','graphics/xsp-label-2.jpg','graphics/xsp-label-3.jpg');" src="graphics/xsp-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="sqltaglib.html" onMouseOut="rolloverOff('side-sqltaglib');" onMouseOver="rolloverOn('side-sqltaglib');"><IMG alt="SQL XSP Taglib" border="0" height="12" hspace="0" name="side-sqltaglib" onLoad="rolloverLoad('side-sqltaglib','graphics/sqltaglib-label-2.jpg','graphics/sqltaglib-label-3.jpg');" src="graphics/sqltaglib-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="fp.html" onMouseOut="rolloverOff('side-fp');" onMouseOver="rolloverOn('side-fp');"><IMG alt="FP XSP Taglib" border="0" height="12" hspace="0" name="side-fp" onLoad="rolloverLoad('side-fp','graphics/fp-label-2.jpg','graphics/fp-label-3.jpg');" src="graphics/fp-label-3.jpg" vspace="0" width="120"></A><BR>
  <IMG alt="SQL Conn Pool" border="0" height="12" hspace="0" src="graphics/connection-pool-label-1.jpg" vspace="0" width="120"><BR>
  <A href="sql.html" onMouseOut="rolloverOff('side-sql');" onMouseOver="rolloverOn('side-sql');"><IMG alt="SQL Processor" border="0" height="12" hspace="0" name="side-sql" onLoad="rolloverLoad('side-sql','graphics/sql-label-2.jpg','graphics/sql-label-3.jpg');" src="graphics/sql-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="ldap.html" onMouseOut="rolloverOff('side-ldap');" onMouseOver="rolloverOn('side-ldap');"><IMG alt="LDAP Processor" border="0" height="12" hspace="0" name="side-ldap" onLoad="rolloverLoad('side-ldap','graphics/ldap-label-2.jpg','graphics/ldap-label-3.jpg');" src="graphics/ldap-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="dcp.html" onMouseOut="rolloverOff('side-dcp');" onMouseOver="rolloverOn('side-dcp');"><IMG alt="DCP Processor" border="0" height="12" hspace="0" name="side-dcp" onLoad="rolloverLoad('side-dcp','graphics/dcp-label-2.jpg','graphics/dcp-label-3.jpg');" src="graphics/dcp-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="wd-xsp.html" onMouseOut="rolloverOff('side-wd-xsp');" onMouseOver="rolloverOn('side-wd-xsp');"><IMG alt="XSP WD" border="0" height="12" hspace="0" name="side-wd-xsp" onLoad="rolloverLoad('side-wd-xsp','graphics/wd-xsp-label-2.jpg','graphics/wd-xsp-label-3.jpg');" src="graphics/wd-xsp-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="./api/index.html" onMouseOut="rolloverOff('side-ext-48');" onMouseOver="rolloverOn('side-ext-48');"><IMG alt="Javadocs" border="0" height="12" hspace="0" name="side-ext-48" onLoad="rolloverLoad('side-ext-48','graphics/ext-48-label-2.jpg','graphics/ext-48-label-3.jpg');" src="graphics/ext-48-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="cocoon2.html" onMouseOut="rolloverOff('side-cocoon2');" onMouseOver="rolloverOn('side-cocoon2');"><IMG alt="Cocoon 2" border="0" height="12" hspace="0" name="side-cocoon2" onLoad="rolloverLoad('side-cocoon2','graphics/cocoon2-label-2.jpg','graphics/cocoon2-label-3.jpg');" src="graphics/cocoon2-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQ" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','graphics/faqs-label-2.jpg','graphics/faqs-label-3.jpg');" src="graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="changes.html" onMouseOut="rolloverOff('side-changes');" onMouseOver="rolloverOn('side-changes');"><IMG alt="Changes" border="0" height="12" hspace="0" name="side-changes" onLoad="rolloverLoad('side-changes','graphics/changes-label-2.jpg','graphics/changes-label-3.jpg');" src="graphics/changes-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="todo.html" onMouseOut="rolloverOff('side-todo');" onMouseOver="rolloverOn('side-todo');"><IMG alt="Todo" border="0" height="12" hspace="0" name="side-todo" onLoad="rolloverLoad('side-todo','graphics/todo-label-2.jpg','graphics/todo-label-3.jpg');" src="graphics/todo-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="livesites.html" onMouseOut="rolloverOff('side-livesites');" onMouseOver="rolloverOn('side-livesites');"><IMG alt="Live Sites" border="0" height="12" hspace="0" name="side-livesites" onLoad="rolloverLoad('side-livesites','graphics/livesites-label-2.jpg','graphics/livesites-label-3.jpg');" src="graphics/livesites-label-3.jpg" vspace="0" width="120"></A><BR>
<IMG border="0" height="6" hspace="0" src="resources/separator.gif" vspace="0" width="120"><BR>
  <A href="http://xml.apache.org/websrc/index.cgi/xml-cocoon/" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="Code Repository" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','graphics/ext-68-label-2.jpg','graphics/ext-68-label-3.jpg');" src="graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="http://xml.apache.org/from-cvs/xml-cocoon/" onMouseOut="rolloverOff('side-ext-70');" onMouseOver="rolloverOn('side-ext-70');"><IMG alt="Dev Snapshots" border="0" height="12" hspace="0" name="side-ext-70" onLoad="rolloverLoad('side-ext-70','graphics/ext-70-label-2.jpg','graphics/ext-70-label-3.jpg');" src="graphics/ext-70-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="mail-lists.html" onMouseOut="rolloverOff('side-mail-lists');" onMouseOver="rolloverOn('side-mail-lists');"><IMG alt="Mail Lists" border="0" height="12" hspace="0" name="side-mail-lists" onLoad="rolloverLoad('side-mail-lists','graphics/mail-lists-label-2.jpg','graphics/mail-lists-label-3.jpg');" src="graphics/mail-lists-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="http://mail-archives.apache.org/" onMouseOut="rolloverOff('side-ext-74');" onMouseOver="rolloverOn('side-ext-74');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-74" onLoad="rolloverLoad('side-ext-74','graphics/ext-74-label-2.jpg','graphics/ext-74-label-3.jpg');" src="graphics/ext-74-label-3.jpg" vspace="0" width="120"></A><BR>
  
<IMG border="0" height="14" hspace="0" src="resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="*"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD><BR>
 

 

 <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Required Components</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">

  <P align="justify">
   In the <CODE><FONT face="courier, monospaced">/lib</FONT></CODE> directory you'll find the <CODE><FONT face="courier, monospaced">turbine-pool.jar</FONT></CODE>
   jar package that contains the Turbine Connection Pool binary files
   (a new addition to Cocoon in version 1.8).
   While this package may not be the most up-to-date version, it is
   guaranteed and tested to work properly with Cocoon so, we suggest that you
   use it.
  </P>
 </FONT></TD></TR></TABLE></DIV><BR>

 <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Installing Turbine Connection Pool</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">

  <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Installing on Apache JServ</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
   <P align="justify">
    On JServ, it is necessary to make sure that the new turbine-pool.jar is visible to Java.
    This implies adding
    the following to the servlet engine classpath by adding a line
    to your <CODE><FONT face="courier, monospaced">jserv.properties</FONT></CODE> file for the connection pool jar package.
   </P>

<DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>wrapper.classpath=[path-to-jar]/[jar-name].jar</PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>

   <P align="justify">
    Here is an example:
   </P>

<DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>
wrapper.classpath=/usr/local/java/cocoon/lib/turbine-pool.jar
</PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>

   <P align="justify">Please also read the next section.</P>
  </FONT></TD></TR></TABLE></DIV><BR>

  <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Generic Installation for All Servlet Engines</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="95%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
     <P align="justify">To use the pool, you need to have the appropriate properties defined
        in your <I>cocoon.properties</I> file. The important ones are listed below.
        This is an example of creating a default pool for use with Oracle. Currently
        Turbine supports a wide number of different databases. If your database
        is not already supported, please subscribe to the mailing list and ask
        for help or try on your own. It is quite easy to add support for your favorite
        database.</P>
     <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>
        # These are your database settings, look in the
        # org.apache.turbine.util.db.pool.* package for more information.
        processor.xsp.pool.database.default.driver=oracle.jdbc.driver.OracleDriver
        processor.xsp.pool.database.default.url=jdbc:oracle:thin:@localhost:1521:ORCL
        processor.xsp.pool.database.default.username=dbUser
        processor.xsp.pool.database.default.password=dbPass
        processor.xsp.pool.database.default.maxConnections=3
        processor.xsp.pool.database.default.expiryTime=3600000
        # These are the supported jdbc-drivers and their adaptors.
        # These properties are used by the DBFactory.
        processor.xsp.pool.database.adaptor=DBWeblogic,DBOracle,DBInstantDB,DBPostgres,DBSybase,DBInformix
        processor.xsp.pool.database.adaptor.DBWeblogic=weblogic.jdbc.pool.Driver
        processor.xsp.pool.database.adaptor.DBOracle=oracle.jdbc.driver.OracleDriver
        processor.xsp.pool.database.adaptor.DBInstantDB=org.enhydra.instantdb.jdbc.idbDriver
        processor.xsp.pool.database.adaptor.DBPostgres=postgresql.Driver
        processor.xsp.pool.database.adaptor.DBInformix=com.informix.jdbc.IfxDriver
        processor.xsp.pool.database.adaptor.DBSybase=com.sybase.jdbc.SybDriver
        # The full path name to a pool log file
        # if not given, commands to log events using org.apache.turbine.util.Log will be ignored.
        # This file must already exist and be writable.
        # Default: none
        #
        processor.xsp.pool.logfile=/opt/apache/var/log/dbPool.log
     </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>

     <P align="justify"> The <B>default</B> is by convention the default connection used
         by the Turbine Connection Pool.  To define a Named connection, add new entries
         with the word &quot;default&quot; replaced with the name you want.  Here is an example
         for defining a connection to an Oracle database called &quot;helpdesk&quot;:</P>
     <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>
        processor.xsp.pool.database.helpdesk.driver=oracle.jdbc.driver.OracleDriver
        processor.xsp.pool.database.helpdesk.url=jdbc:oracle:thin:@localhost:1521:ORCL
        processor.xsp.pool.database.helpdesk.username=dbUser
        processor.xsp.pool.database.helpdesk.password=dbPass
        processor.xsp.pool.database.helpdesk.maxConnections=3
        processor.xsp.pool.database.helpdesk.expiryTime=3600000
     </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>

     <P align="justify">The maxConnections setting is the maximum number
        of connections to cache. The expiryTime setting is for automaticially timing
        out cached connections to the database. This is to prevent connections
        from becoming stale. The username and password settings should be obvious.
        If your database does not support users, then simply leave these items
        blank. The rest of the settings are database specific and you should read
        the various connection interfaces javadoc and drivers to find out the appropriate
        strings to use.</P>

   </FONT></TD></TR></TABLE></DIV><BR>

 </FONT></TD></TR></TABLE></DIV><BR>
 <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD align="right" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-top.gif"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD align="left" height="7" valign="bottom" width="9"><IMG border="0" height="7" hspace="0" src="resources/bar-top-right.gif" vspace="0" width="9"></TD></TR><TR><TD background="resources/bar-border-left.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD><TD bgcolor="#0086b2" width="100%"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="5" hspace="0" src="resources/void.gif" vspace="0" width="5"><B>Using Turbine Connection Pool</B></FONT></TD><TD background="resources/bar-border-right.gif" width="9"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="9"></TD></TR><TR><TD align="right" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-left.gif" vspace="0" width="9"></TD><TD background="resources/bar-border-bottom.gif"><IMG border="0" height="12" hspace="0" src="resources/void.gif" vspace="0"></TD><TD align="left" height="12" valign="top" width="9"><IMG border="0" height="12" hspace="0" src="resources/bar-bottom-right.gif" vspace="0" width="9"></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="98%"><TR><TD><FONT color="#000000" face="arial,helvetica,sanserif">
    <P align="justify">This section is to describe how you can use the Turbine connection pool
    in your own code. (At the time of writing, in Cocoon only the SQL taglibs
    use connection pooling - another good reason to use the SQL taglibs!)
    To demonstrate this, I'll show an example of how I modified
    Ricardo Rocha's excellent example XSQL. This is some of the code that he
    had before:</P>

  <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>
    import java.sql.*;
    import java.util.*;
    import org.w3c.dom.*;
    import DBConnectionManager;

    public class XSQL {
      static DBConnectionManager manager = DBConnectionManager.getInstance();

      public static Element executeQuery(
        String connectionName,
        String statementId,
        String statementText,
        Document factory
      )
        throws SQLException
      {
        Connection connection = null;

        try {
          connection = manager.getConnection(connectionName);
          Statement statement = connection.createStatement();
          ResultSet resultSet = statement.executeQuery(statementText);
          ResultSetMetaData metaData = resultSet.getMetaData();
          int columnCount = metaData.getColumnCount();

          Element rowSet = factory.createElement(&quot;xsql:rowset&quot;);
          rowSet.setAttribute(&quot;id&quot;, statementId);

          for (int i = 0; resultSet.next(); i++) {
            Element row = factory.createElement(&quot;xsql:row&quot;);
            row.setAttribute(&quot;sequence&quot;, String.valueOf(i + 1));
            rowSet.appendChild(row);
    
            for (int j = 0; j &amp;lt; columnCount; j++) {
              String value = resultSet.getString(j + 1);

              Element element = factory.createElement(
               metaData.getColumnLabel(j + 1).toLowerCase()
              );
              row.appendChild(element);

              if (value != null) {
                element.appendChild(
                  factory.createTextNode(value)
                );
              }
            }
          }

          resultSet.close();
          statement.close();

          return rowSet;
        } catch (SQLException e) {
          throw(new SQLException(statementText));
        } finally {
          if (connection != null) {
            manager.freeConnection(connectionName, connection);
          }
        }
      }

    }
    </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
    <P align="justify">Now this is the code modified to use the Turbine connection pool:</P>

  <DIV align="center"><TABLE border="0" cellpadding="0" cellspacing="4"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff"><PRE>
    import java.sql.*;
    import java.util.*;
    import org.w3c.dom.*;
    import DBConnectionManager;

    public class XSQL {
        static DBBroker pool = DBBroker.getInstance();       // &lt;---- Pool code!

        public static Element executeQuery(
        String connectionName,
        String statementId,
        String statementText,
        Document factory
      )
        throws SQLException
      {
        Connection connection = null;
        DBConnection db = null;                              // &lt;---- Pool code!
        try {
          db = pool.getConnection(connectionName);           // &lt;---- Pool code!
          connection = db.getConnection();                   // &lt;---- Pool code!
          Statement statement = connection.createStatement();
          ResultSet resultSet = statement.executeQuery(statementText);
          ResultSetMetaData metaData = resultSet.getMetaData();
          int columnCount = metaData.getColumnCount();

          Element rowSet = factory.createElement(&quot;xsql:rowset&quot;);
          rowSet.setAttribute(&quot;id&quot;, statementId);

          for (int i = 0; resultSet.next(); i++) {
            Element row = factory.createElement(&quot;xsql:row&quot;);
            row.setAttribute(&quot;sequence&quot;, String.valueOf(i + 1));
            rowSet.appendChild(row);

            for (int j = 0; j &amp;lt; columnCount; j++) {
              String value = resultSet.getString(j + 1);

              Element element = factory.createElement(
                metaData.getColumnLabel(j + 1).toLowerCase()
              );
              row.appendChild(element);

              if (value != null) {
                element.appendChild(
                  factory.createTextNode(value)
                );
              }
            }
          }

          resultSet.close();
          statement.close();

          return rowSet;
        } catch (SQLException e) {
          throw(new SQLException(statementText));
        } finally {
          if (connection != null) {
            pool.releaseConnection(db);                      // &lt;---- Pool code!
          }
        }
      }

    }
    </PRE></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>

    <P align="justify">Please see the <A href="http://java.apache.org/turbine/getting_started.html">getting
     started</A> documentation at the <A href="http://java.apache.org/turbine/">Turbine</A>
     homepage for more information about Turbine (a server-side framework which is
     the home of the connection pool code).
    </P>
  </FONT></TD></TR></TABLE></DIV><BR>

</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1"></TD></TR><TR><TD align="center"><FONT color="#0086b2" face="arial,helvetica,sanserif" size="-1"><I>
              Copyright &copy; 1999-2000 The Apache Software Foundation.
              All Rights Reserved.
            </I></FONT></TD></TR></TABLE></BODY></HTML>