java - How to determine info about WebLogic datasource from datasource connection? -


i have spring app running in weblogic. in dao, inherits base class method returns "javax.sql.datasource". inject datasource indirectly using "jee:jndi-lookup" in spring application context datasource jndi. when @ in debugger, appears "weblogic.jdbc.common.internal.rmidatasource".

i'd figure out how can introspect datasource in code determine information database i'm connected to, particularly host, port, sid, , username. there way that?

for background, have extensive diagnostics in app troubleshooting db connection , query issues. helpful if @ runtime, introspect information weblogic datasource database connection in use.

as described, determined in debugger actual type was, , i've examined obvious properties in object casting or reflection opportunities, , don't see obvious indications of information "host", "port", or "sid".

i think can use reflection , call getter methods of class.
should helpful information. based on name of class,
looks it's internal weblogic class , it's not designed this.
still, can reflection, can call private getter methods reflection.

java reflection api


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -