Listing Application Server Users
Is there any way to programmatically list the users in the current realm for Application Server Platform 9?
I'm trying to have a GUI where a user may choose (using, say, a ComboBox) from a list of all the users on the Application Server.
-- I'm using NetBeans 5.5 IDE and Sun Java System Application Server Platform 9.
Message was edited by:
thomasfcd
Each type of realm have different ways to access the information. For an LDAP realm you could use JNDI.
One generic way you could use is JMX: The application server MBean "com.sun.appserv/auth-realm/<realm-name>/server-config/config" has the operation "getUserNames". The file realm supports this operation and other realms probably have better ways to get at their user lists.
Of course, for the file realm it might be simpler just to read the keyfile in the config directory.
You should (obviously) do this at the server side, e g in a session bean, and provide a method that the client could call.
HTH,
Gunnar