Author: markt Date: Tue Oct 29 14:32:30 2013 New Revision: 1536735 URL: http://svn.apache.org/r1536735 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55703 Clarify role of singleton attribute for JNDI factories
Modified: tomcat/trunk/webapps/docs/jndi-resources-howto.xml Modified: tomcat/trunk/webapps/docs/jndi-resources-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jndi-resources-howto.xml?rev=1536735&r1=1536734&r2=1536735&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/jndi-resources-howto.xml (original) +++ tomcat/trunk/webapps/docs/jndi-resources-howto.xml Tue Oct 29 14:32:30 2013 @@ -227,8 +227,9 @@ conn.close();]]></source> 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> @@ -789,8 +790,10 @@ conn.close();]]></source> <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. @@ -927,6 +930,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>]]></source> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org