On Thu, 11 Nov 2004 23:25:05 -0500, V D [EMAIL PROTECTED] wrote:
Using Embedded Tomcat, in 5.0, one would add a resource as:
StandardContext context =
(StandardContext)embeddedTomcat.createContext(context, path);
ContextResource res = new ContextResource();
res.setName( jdbc/ name);
res.setType( javax.sql.DataSource );
res.setAuth( Container );
context.addResource(res);
ResourceParams params = new ResourceParams();
params.setName( jdbc/ name);
params.addParameter( factory ,
org.apache.commons.dbcp.BasicDataSourceFactory );
...
context.addResourceParams(params);
With Tomcat 5.5, someone said using res.setProperty() instead of using
params.
So does it look like this:
res.setProperty( factory ,
org.apache.commons.dbcp.BasicDataSourceFactory );
etc.
If you're using DBCP, I recommend using the default factory (Tomcat
still includes DBCP, but with renamed packages to avoid conflict
issues).
If this is the case, then how do I set the resource name
(params.setName( jdbc/ name);*)*?
You set the name on the resource, and the params object doesn't exist
anymore. So there's no problem.
Also, if I have more than one resource, how do I take care of this?
You have multiple ContextResource objects.
--
x
Rémy Maucherat
Developer Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]