is it possible to get database URL after looking-up a datasource?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   franz_ho
Posted On:   Saturday, April 13, 2002 07:24 AM

in EJB, i can get database connection by looking-up JNDI.
but i need to get the database host name and the port number which are specified in configuration files externally. i am using jboss2.4.4 as EJB container. please give me some hints. any helps are appreciated.

Re: is it possible to get database URL after looking-up a datasource?

Posted By:   Anonymous  
Posted On:   Saturday, April 13, 2002 10:37 AM

It all depends on the implementation of the datasource. For example, if you are using Orable and you cast your javax.sql.Datasource to a OrableDataSource, you can get much more information on the database name, driver, etc.
About | Sitemap | Contact