tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roytman, Alex" <>
Subject RE: Catalina: How to specify factory class name for a Resource inserver.xml
Date Tue, 07 Aug 2001 22:45:12 GMT

Thank you very much for your help. I have one more question. Why new
instance of my factory gets created every time I lookup for a resource
created by this factory?

-----Original Message-----
From: Craig R. McClanahan []
Sent: Tuesday, August 07, 2001 5:05 PM
Subject: Re: Catalina: How to specify factory class name for a Resource

On Tue, 7 Aug 2001, Roytman, Alex wrote:

> Hello,
> I am writing several jndi factories for catalina's JNDI implementation
> and I am trying to figure out how to specify factory class for a
> resource. The only sample I found was
> <Resource name="jdbc/usorg" auth="CONTAINER"
> type="javax.sql.DataSource"/>
> and factory class for type="javax.sql.DataSource" is hard coded. 
> How do I specify factory class for my resource?

In server.xml, you configure the actual resource with a
which can have nested <parameter> entries.  Use a parameter named
to define the fully qualified clas name of the resource factory class

Alternatively, you can pass system properties that define the factory
a particular resource type.  For example, to set the factory class name
for a resource type "com.mycompany.Foo", you could say:

  export \

before starting Tomcat 4.

> Thank you very much
> Alex Roytman


View raw message