Well, the Admin app does it. You have to lower some security by adding privileged="true" to your <Context ....> . See the admin.xml in webapps for that info. Once you've done that, look and see how the Tomcat developers coded it (after all, it is open source). The admin app is only a webapp and has no special access that any other webapp couldn't have. You can do exactly what they are doing in your own app. So, yes, you can do this through code :-)

Jake

At 04:22 PM 12/19/2002 -0800, you wrote:

I guess it's time to read up on the Tomcat Admin app.  :-)

Yes, I believe I am using the dbcp datasources along with the oracle jdbc
drivers.

I'm making the following assumption based on your response:  It sounds like
I can theoretically create a new datasource in the tomcat admin, then have
access to it through web-app code without a restart of the system.  But to
create a new datasource through the code is not likely possible.

> -----Original Message-----
> From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 19, 2002 3:44 PM
> To: Tomcat Users List
> Subject: Re: Dynamic DataSources
>
>
> Hello Jay,
>
> Theoretically, yes...through the Tomcat Admin application.  You are
> using DBCP datasources, right?
>
> Jake
>
> Thursday, December 19, 2002, 4:47:48 PM, you wrote:
>
>
> JW> I see in the documentation for Tomcat that all
> DataSources are defined in
> JW> server.xml, then made accessible to webapps through web.xml files.
>
> JW> Is it possible to dynamically create a DataSource?
>
> JW> Jay
>
> JW> --
> JW> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> JW> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
Best regards,
 Jacob                            mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to