Harry Levinson wrote:
> What is the proper way to read attributes of a Resource in context.xml, for
> example the "url" attribute?
> 
> I am building a test web page that shows whether or not we are successfully
> connected to the database. Only techies inide the company will be able to
> view that web page, so security is not an issue. (I will not display
> username/password anyway.)

I think the JMX MBeans would be the correct way for this -- however I've not
worked with them, so cannot provide any direct information, only this vague
pointer.

Another way could be to use the capabilities provided by the underlying
DataSource implementation. F.ex. if the used DataSource implementation
is OracleDataSource, you could recast the ds object you get from JNDI
back to OracleDataSource, and call getUrl() on that. But this completely
depends on the database and DataSource you're using, while the JMX approach
would be usable for any JNDI resource.
-- 
..Juha

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to