Programmatic method to add users, groups, realms, etc?
Is there a way from within a Java EE app (a stateless session bean or web service) to create and add new users to a security realm? I want to be able to make a little Swing GUI widget within my app that lets anyone with admin access go ahead and create new users for the application. Is this possible?
[308 byte] By [
codebooka] at [2007-11-26 12:20:57]

# 1
In j2ee sdk docs i find in package com.sun.appserv.management.config the interface AuthRealmConfig which has an addUser(String user, String password, String[] groupList) method - ONLY FOR THE DEFAULT IMPLEMENTATION
I haven't found yet how to get a handle to this interface.
I found that under appserv-admin.jar contains the com.sun.enterprise.management.config package with the AuthRealmConfigImpl class having the methods adsUser, removeUser and updateUser
I bet some annotation - i think it wast com.sun.appserv/auth-realm/file/server-config/config somehow can let you communicate with the bean. If this helps, can you tell me the steps to take to let a servlet do this - i find the tutorial most unreadeble and after about 20 hour on this subject i'm getting very frustrated!
Message was edited by:
secondhand