public javax.management.ObjectName | create(java.lang.String name, java.lang.String username, java.lang.String password, java.lang.String[] principals, java.lang.String[] userGroups)
final String containerName = getContainerName();
final OldConnectorConnectionPoolMBean ccp =
getOldConfigProxies().getOldConnectorConnectionPool( containerName );
final Map<String,Serializable> params = new HashMap<String,Serializable>();
params.put( "name", name );
params.put( "pool_name", containerName );
params.put( "principal", principals );
params.put( "user_group", userGroups );
final AttributeList attrs = new AttributeList();
for( final String key : params.keySet() )
{
attrs.add( new Attribute( key, params.get( key ) ) );
}
final String targetName = null;
getOld().createSecurityMap( attrs, username, password, targetName );
// doesn't return the ObjectName; returns null!
final ObjectName oldObjectName = ccp.getSecurityMapByName( name );
final ObjectName amxName = finish( oldObjectName, null );
return( amxName );
|