Author: markt
Date: Tue Oct 29 14:35:17 2013
New Revision: 1536736
URL: http://svn.apache.org/r1536736
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55703
Clarify role of singleton attribute for JNDI factories
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/jndi-resources-howto.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1536735
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1536736&r1=1536735&r2=1536736&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Oct 29 14:35:17 2013
@@ -151,6 +151,10 @@
Update the documentation with information for WebSocket 1.0
specification
and javadoc. (violetagg)
</fix>
+ <fix>
+ <bug>55703</bug>: Clarify the role of the singleton attribute for JNDI
+ resource factories. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Extras">
Modified: tomcat/tc7.0.x/trunk/webapps/docs/jndi-resources-howto.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/jndi-resources-howto.xml?rev=1536736&r1=1536735&r2=1536736&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/jndi-resources-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/jndi-resources-howto.xml Tue Oct 29
14:35:17 2013
@@ -229,8 +229,9 @@ conn.close();
Java class that conforms to standard JavaBeans naming conventions (i.e.
it has a zero-arguments constructor, and has property setters that
conform to the setFoo() naming pattern. The resource factory will
- create a new instance of the appropriate bean class every time a
- <code>lookup()</code> for this entry is made.</p>
+ only create a new instance of the appropriate bean class every time a
+ <code>lookup()</code> for this entry is made if the <code>singleton</code>
+ attribute of the factory is set to <code>false</code>.</p>
<p>The steps required to use this facility are described below.</p>
@@ -815,8 +816,10 @@ conn.close();
<p>You must write a class that implements the JNDI service provider
<code>javax.naming.spi.ObjectFactory</code> inteface. Every time your
web application calls <code>lookup()</code> on a context entry that is
- bound to this factory, the <code>getObjectInstance()</code> method is
- called, with the following arguments:</p>
+ bound to this factory (assuming that the factory is configured with
+ <code>singleton="false"</code>), the
+ <code>getObjectInstance()</code> method is called, with the following
+ arguments:</p>
<ul>
<li><strong>Object obj</strong> - The (possibly null) object containing
location or reference information that can be used in creating an object.
@@ -960,6 +963,7 @@ writer.println("foo = " + bean.getFoo()
<Resource name="bean/MyBeanFactory" auth="Container"
type="com.mycompany.MyBean"
factory="com.mycompany.MyBeanFactory"
+ singleton="false"
bar="23"/>
...
</Context>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]