You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/09/30 23:35:40 UTC

DO NOT REPLY [Bug 23491] - Can't configure PerUserPoolDataSource for use with tomcat

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23491>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23491

Can't configure PerUserPoolDataSource for use with tomcat





------- Additional Comments From dirk.verbeeck@pandora.be  2003-09-30 21:35 -------
If I make a PerUserPoolDataSourceFactory then I can make it work

PerUserPoolDataSourceFactory.java:
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.spi.ObjectFactory;

public class PerUserPoolDataSourceFactory implements ObjectFactory {
    public Object getObjectInstance(Object obj, Name name, Context nameCtx,
Hashtable environment) throws Exception {
        return new PerUserPoolDataSource();
    }
}
----------------------------------
server.xml:
<Resource name="jdbc/PerUserEmployeeAppDb" auth="SERVLET"
          type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/PerUserEmployeeAppDb">
  <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.datasources.PerUserPoolDataSourceFactory</value>
  </parameter>
</ResourceParams>
----------------------------------
I deployed on tomcat 4.1.27 and the JNDI lookup was successfull.