This content has been marked as final.
Show 4 replies
-
1. Re: Listing all datasources available
formica Dec 21, 2006 12:04 PM (in response to pablojavierpy)./twiddle.sh query "jboss.jca:service=DataSourceBinding,*"
can this help ?
Andrea -
2. Re: Listing all datasources available
pablojavierpy Dec 21, 2006 12:17 PM (in response to pablojavierpy)Hi Andrea.
Thanks a lot for the extremely quick response.
It is exactly what I am looking for. But I'd need a Servlet accesible API to do the same thing, so I can list all datasources in a WebPage.
I will have to see the source code for "twiddle" utility and I can extract some ideas from it.
If you guys have a better idea, or an URL to read from, please post it. -
3. Re: Listing all datasources available
peterj Dec 21, 2006 12:39 PM (in response to pablojavierpy)Use the JMX api. Here is an example that would work in a servlet:
Context ctx = new InitialContext(); MBeanServerConnection mconn = (MBeanServerConnection)ctx.lookup("jmx/invoker/RMIAdaptor"); ObjectName name = new ObjectName("jboss.jca:service=DataSourceBinding,*"); Set s = mconn.queryMBeans(name, null);
Variable s contains a collection of the desired mbeans. -
4. Re: Listing all datasources available
pablojavierpy Dec 21, 2006 6:59 PM (in response to pablojavierpy)Thank you very, very much. It is exactly what I am needing!
:)