This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 8179a04637 Remove references to ResourceParams
8179a04637 is described below
commit 8179a0463708fefd250b0e6073b0ada0636132b7
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Nov 26 12:21:20 2024 +0000
Remove references to ResourceParams
---
java/org/apache/naming/factory/BeanFactory.java | 53 ++++++----------------
.../apache/naming/factory/MailSessionFactory.java | 18 ++------
.../org/apache/naming/factory/SendMailFactory.java | 36 +++++----------
webapps/docs/changelog.xml | 9 ++++
webapps/docs/jndi-resources-howto.xml | 4 +-
5 files changed, 40 insertions(+), 80 deletions(-)
diff --git a/java/org/apache/naming/factory/BeanFactory.java
b/java/org/apache/naming/factory/BeanFactory.java
index 2257f9d650..bd54e13e23 100644
--- a/java/org/apache/naming/factory/BeanFactory.java
+++ b/java/org/apache/naming/factory/BeanFactory.java
@@ -42,46 +42,19 @@ import org.apache.naming.StringManager;
* in your <code>conf/server.xml</code>
* configuration file. An example of factory configuration is:</p>
* <pre>
- * <Resource name="jdbc/myDataSource" auth="SERVLET"
- * type="oracle.jdbc.pool.OracleConnectionCacheImpl"/>
- * <ResourceParams name="jdbc/myDataSource">
- * <parameter>
- * <name>factory</name>
- * <value>org.apache.naming.factory.BeanFactory</value>
- * </parameter>
- * <parameter>
- * <name>driverType</name>
- * <value>thin</value>
- * </parameter>
- * <parameter>
- * <name>serverName</name>
- * <value>hue</value>
- * </parameter>
- * <parameter>
- * <name>networkProtocol</name>
- * <value>tcp</value>
- * </parameter>
- * <parameter>
- * <name>databaseName</name>
- * <value>XXXX</value>
- * </parameter>
- * <parameter>
- * <name>portNumber</name>
- * <value>NNNN</value>
- * </parameter>
- * <parameter>
- * <name>user</name>
- * <value>XXXX</value>
- * </parameter>
- * <parameter>
- * <name>password</name>
- * <value>XXXX</value>
- * </parameter>
- * <parameter>
- * <name>maxLimit</name>
- * <value>5</value>
- * </parameter>
- * </ResourceParams>
+ * <Resource name="jdbc/myDataSource"
+ * auth="SERVLET"
+ * type="oracle.jdbc.pool.OracleConnectionCacheImpl"
+ * factory="org.apache.naming.factory.BeanFactory"
+ * driverType="thin"
+ * serverName="hue"
+ * networkProtocol="tcp"
+ * databaseName="XXXX"
+ * portNumber="NNNN"
+ * user="XXXX"
+ * password="XXXX"
+ * maxLimit="5"
+ * />
* </pre>
*
* @author Aner Perez [aner at ncstech.com]
diff --git a/java/org/apache/naming/factory/MailSessionFactory.java
b/java/org/apache/naming/factory/MailSessionFactory.java
index baf8ab6762..4598e3c78b 100644
--- a/java/org/apache/naming/factory/MailSessionFactory.java
+++ b/java/org/apache/naming/factory/MailSessionFactory.java
@@ -38,7 +38,6 @@ import javax.naming.spi.ObjectFactory;
* described in the JavaMail Specification may be passed to the Session
* factory; however the following properties are the most commonly used:</p>
* <ul>
- * <li>
* <li><strong>mail.smtp.host</strong> - Hostname for outbound transport
* connections. Defaults to <code>localhost</code> if not specified.</li>
* </ul>
@@ -47,18 +46,11 @@ import javax.naming.spi.ObjectFactory;
* <code><Context></code> element in your <code>conf/server.xml</code>
* configuration file. An example of factory configuration is:</p>
* <pre>
- * <Resource name="mail/smtp" auth="CONTAINER"
- * type="javax.mail.Session"/>
- * <ResourceParams name="mail/smtp">
- * <parameter>
- * <name>factory</name>
- * <value>org.apache.naming.factory.MailSessionFactory</value>
- * </parameter>
- * <parameter>
- * <name>mail.smtp.host</name>
- * <value>mail.mycompany.com</value>
- * </parameter>
- * </ResourceParams>
+ * <Resource name="mail/smtp"
+ * auth="CONTAINER"
+ * type="jakarta.mail.Session"
+ * mail.smtp.host="mail.mycompany.com"
+ * />
* </pre>
*
* @author Craig R. McClanahan
diff --git a/java/org/apache/naming/factory/SendMailFactory.java
b/java/org/apache/naming/factory/SendMailFactory.java
index 4edd031513..dcac9c7d89 100644
--- a/java/org/apache/naming/factory/SendMailFactory.java
+++ b/java/org/apache/naming/factory/SendMailFactory.java
@@ -41,31 +41,17 @@ import javax.naming.spi.ObjectFactory;
* <p>
* Example:
* <pre>
- * <Resource name="mail/send" auth="CONTAINER"
- * type="javax.mail.internet.MimePartDataSource"/>
- * <ResourceParams name="mail/send">
- * <parameter><name>factory</name>
- * <value>org.apache.naming.factory.SendMailFactory</value>
- * </parameter>
- * <parameter><name>mail.smtp.host</name>
- * <value>your.smtp.host</value>
- * </parameter>
- * <parameter><name>mail.smtp.user</name>
- * <value>someuser</value>
- * </parameter>
- * <parameter><name>mail.from</name>
- * <value>[email protected]</value>
- * </parameter>
- * <parameter><name>mail.smtp.sendpartial</name>
- * <value>true</value>
- * </parameter>
- * <parameter><name>mail.smtp.dsn.notify</name>
- * <value>FAILURE</value>
- * </parameter>
- * <parameter><name>mail.smtp.dsn.ret</name>
- * <value>FULL</value>
- * </parameter>
- * </ResourceParams>
+ * <Resource name="mail/send"
+ * auth="CONTAINER"
+ * type="jakarta.mail.internet.MimePartDataSource"
+ * factory="org.apache.naming.factory.SendMailFactory"
+ * mail.smtp.host="your.smtp.host"
+ * mail.smtp.user="someuser"
+ * mail.from="[email protected]"
+ * mail.smtp.sendpartial="true"
+ * mail.smtp.dsn.notify="FAILURE"
+ * mail.smtp.dsn.ret="FULL"
+ * />
* </pre>
*
* @author Glenn Nielsen Rich Catlett
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 778717e16b..6cbf70a5ec 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -204,6 +204,15 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Web applications">
+ <changelog>
+ <fix>
+ Documentation. Remove references to the <code>ResourceParams</code>
+ element. Support for <code>ResourceParams</code> was removed in Tomcat
+ 5.5.x. (markt)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="Tomcat 9.0.97 (remm)" rtext="2024-11-09">
<subsection name="Catalina">
diff --git a/webapps/docs/jndi-resources-howto.xml
b/webapps/docs/jndi-resources-howto.xml
index 6636bf50df..de8b42f250 100644
--- a/webapps/docs/jndi-resources-howto.xml
+++ b/webapps/docs/jndi-resources-howto.xml
@@ -1098,8 +1098,8 @@ public class MyBeanFactory implements ObjectFactory {
<p>In this example, we are unconditionally creating a new instance of
the <code>com.mycompany.MyBean</code> class, and populating its properties
- based on the parameters included in the <code><ResourceParams></code>
- element that configures this factory (see below). You should note that any
+ based on the parameters included in the <code><Resource></code>
+ element that configures this resource (see below). You should note that any
parameter named <code>factory</code> should be skipped - that parameter is
used to specify the name of the factory class itself (in this case,
<code>com.mycompany.MyBeanFactory</code>) rather than a property of the
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]