Re: List available data sources in EJB
From: Alex Molochnikov (NOBODY_at_NOSPAM.COM)
Date: 03/10/05
- Next message: hiwa: "Re: Form validation in JSF"
- Previous message: Aleksander Strączek: "Re: what can't you do in swing but in awt?"
- In reply to: Alex Molochnikov: "List available data sources in EJB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 10 Mar 2005 03:03:40 GMT
Responding to my own post:
It is possible. Here is the code:
InitialContext context = new InitialContext();
NamingEnumeration ne = context.listBindings("java:/");
while (ne.hasMore())
{
Binding b = (Binding) ne.next();
if (b.getClassName().endsWith(".DataSource"))
System.out.println(" data source = " + b.getName());
}
- Next message: hiwa: "Re: Form validation in JSF"
- Previous message: Aleksander Strączek: "Re: what can't you do in swing but in awt?"
- In reply to: Alex Molochnikov: "List available data sources in EJB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]