There are a couple of approaches to doing this and all of these involve
invoking operations on underlying JMX MBeans. Both wlconfig,
weblogic.Admin, and direct calls to the JMX API make this possible.

You are correct in that the default name of the MBean that you want to
invoke on is registered in JMX with the name:


This MBean supports methods that are defined by the Java interface
RoleEditorMBean which is documented at:

As far as I can tell there are no elements defined in the wlconfig command
for invoking on these MBeans. This means that you will need to use the
weblogic.Admin command if you want to accomplish this from a script. The
syntax for using invoke is documented at:

If you are doing a bunch at time you will want to use the "Batch Update

As for details on the best way to best define these I am cross posting this
reponse to the security newsgroup. You might bet a more detailed response
as to how to best use these APIs.

"PremS" wrote in message
> Can I create roles and assign role conditions via Ant wlconfig ?
> I have LOTS of roles to be created and currently I do it manualy via the

> console and it is very tedious.
> any pointers ?
> something to do with Security=Name:myrealmDefaultRoleMapper -method

> and then -method setExpression ?
> Please help
> PS