You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/02/29 21:46:44 UTC
(commons-dbcp) branch master updated (bb417231 -> a5e46e78)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
from bb417231 Make release notes more GitHub Markdown friendly
new e654be3a Javadoc
new a5e46e78 Javadoc
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../commons/dbcp2/cpdsadapter/package-info.java | 18 +++----
.../commons/dbcp2/datasources/package-info.java | 56 +++++++---------------
2 files changed, 26 insertions(+), 48 deletions(-)
(commons-dbcp) 01/02: Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
commit e654be3ad043fe1b0094e2b8e3b424027404cd22
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Feb 29 16:39:32 2024 -0500
Javadoc
---
.../apache/commons/dbcp2/cpdsadapter/package-info.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java
index 6bce5599..5b0b2c58 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java
@@ -35,15 +35,15 @@
* <name>factory</name>
* <value>org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS</value>
* </parameter>
- * <parameter><name>user</name><value>root</value></parameter>
- * <parameter><name>password</name><value></value></parameter>
- * <parameter>
- * <name>driver</name>
- * <value>org.gjt.mm.mysql.Driver</value></parameter>
- * <parameter>
- * <name>url</name>
- * <value>jdbc:mysql://localhost:3306/bookstore</value>
- * </parameter>
+ * <parameter><name>user</name><value>root</value></parameter>
+ * <parameter><name>password</name><value></value></parameter>
+ * <parameter>
+ * <name>driver</name>
+ * <value>org.gjt.mm.mysql.Driver</value></parameter>
+ * <parameter>
+ * <name>url</name>
+ * <value>jdbc:mysql://localhost:3306/bookstore</value>
+ * </parameter>
* </ResourceParams>
* </pre>
*
(commons-dbcp) 02/02: Javadoc
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
commit a5e46e78a63a15be87c22281fa17e7b8c466a55e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Feb 29 16:46:40 2024 -0500
Javadoc
---
.../commons/dbcp2/cpdsadapter/package-info.java | 8 ++--
.../commons/dbcp2/datasources/package-info.java | 56 +++++++---------------
2 files changed, 21 insertions(+), 43 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java
index 5b0b2c58..857ee717 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java
@@ -38,11 +38,11 @@
* <parameter><name>user</name><value>root</value></parameter>
* <parameter><name>password</name><value></value></parameter>
* <parameter>
- * <name>driver</name>
- * <value>org.gjt.mm.mysql.Driver</value></parameter>
+ * <name>driver</name>
+ * <value>org.gjt.mm.mysql.Driver</value></parameter>
* <parameter>
- * <name>url</name>
- * <value>jdbc:mysql://localhost:3306/bookstore</value>
+ * <name>url</name>
+ * <value>jdbc:mysql://localhost:3306/bookstore</value>
* </parameter>
* </ResourceParams>
* </pre>
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java b/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java
index e52dba25..26fcea6e 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java
@@ -22,9 +22,7 @@
* Below are a couple of usage examples. One shows deployment into a JNDI system.
* The other is a simple example initializing the pool using standard Java code.
* </p>
- *
* <h2>JNDI</h2>
- *
* <p>
* Most
* J2EE containers will provide some way of deploying resources into JNDI. The
@@ -35,8 +33,7 @@
* <p>In server.xml, the following would be added to the <Context> for your
* webapp:
* </p>
- *
- * <code>
+ * <pre>
* <Resource name="jdbc/bookstore" auth="Container"
* type="org.apache.commons.dbcp2.datasources.PerUserPoolPoolDataSource"/>
* <ResourceParams name="jdbc/bookstore">
@@ -51,14 +48,12 @@
* <name>defaultMaxTotal</name><value>30</value>
* </parameter>
* </ResourceParams>
- * </code>
- *
+ * </pre>
* <p>
* In web.xml. Note that elements must be given in the order of the dtd
* described in the servlet specification:
* </p>
- *
- * <code>
+ * <pre>
* <resource-ref>
* <description>
* Resource reference to a factory for java.sql.Connection
@@ -75,8 +70,7 @@
* Container
* </res-auth>
* </resource-ref>
- * </code>
- *
+ * </pre>
* <p>
* Apache Tomcat deploys all objects configured similarly to above within the
* <strong>java:comp/env</strong> namespace. So the JNDI path given for
@@ -84,14 +78,11 @@
* {@code ConnectionPoolDataSource} that is deployed as given in the
* <a href="../cpdsadapter/package-summary.html">cpdsadapter example</a>
* </p>
- *
* <p>
* The {@code DataSource} is now available to the application as shown
* below:
* </p>
- *
- * <code>
- *
+ * <pre>
* Context ctx = new InitialContext();
* DataSource ds = (DataSource)
* ctx.lookup("java:comp/env/jdbc/bookstore");
@@ -108,9 +99,7 @@
* if (con != null)
* con.close();
* }
- *
- * </code>
- *
+ * </pre>
* <p>
* The reference to the {@code DataSource} could be maintained, for
* multiple getConnection() requests. Or the {@code DataSource} can be
@@ -120,24 +109,19 @@
* between different lookups. This behavior may be different in other
* implementations.
* </p>
- *
* <h2>Without JNDI</h2>
- *
* <p>
* Connection pooling is useful in applications regardless of whether they run
* in a J2EE environment and a {@code DataSource} can be used within a
* simpler environment. The example below shows SharedPoolDataSource using
* DriverAdapterCPDS as the back end source, though any CPDS is applicable.
* </p>
+ * <pre>
+ * public class Pool {
*
- * <code>
- *
- * public class Pool
- * {
* private static DataSource ds;
*
- * static
- * {
+ * static {
* DriverAdapterCPDS cpds = new DriverAdapterCPDS();
* cpds.setDriver("org.gjt.mm.mysql.Driver");
* cpds.setUrl("jdbc:mysql://localhost:3306/bookstore");
@@ -152,32 +136,26 @@
* ds = tds;
* }
*
- * public static getConnection()
- * {
+ * public static getConnection() {
* return ds.getConnection();
* }
* }
- *
- * </code>
- *
+ * </pre>
* <p>
* This class can then be used wherever a connection is needed:
* </p>
- *
- * <code>
+ * <pre>
* Connection con = null;
- * try
- * {
+ * try {
* con = Pool.getConnection();
* ...
* use the connection
* ...
- * }
- * finally
- * {
- * if (con != null)
+ * } finally {
+ * if (con != null) {
* con.close();
+ * }
* }
- * </code>
+ * </pre>
*/
package org.apache.commons.dbcp2.datasources;