JNDIResourceConfigFactorypublic final class JNDIResourceConfigFactory extends ResourceFactoryImplBase MBean managing all instances of JNDIResource. |
Fields Summary |
---|
private static final String | JNDI_LOOKUP_NAME_KEY | private static final String | FACTORY_CLASS_KEY | private static final String | RES_TYPE_KEY |
Constructors Summary |
---|
public JNDIResourceConfigFactory(ConfigFactoryCallback callbacks)
super( callbacks );
|
Methods Summary |
---|
public javax.management.ObjectName | create(java.lang.String jndiName, java.lang.String jndiLookupName, java.lang.String resType, java.lang.String factoryClass, java.util.Map optional)Creates a new <external-jndi-resource>.
final String[] requiredParams = new String[]
{
JNDI_LOOKUP_NAME_KEY, jndiLookupName,
RES_TYPE_KEY, resType,
FACTORY_CLASS_KEY, factoryClass,
};
final Map<String,String> params = initParams( jndiName, requiredParams, optional );
final ObjectName amxName = createNamedChild( jndiName, params );
return( amxName );
| protected javax.management.ObjectName | createOldChildConfig(javax.management.AttributeList translatedAttrs)The caller is responsible for dealing with any Properties.
trace( "JNDIResourceConfigFactory.createOldChildConfig: creating using: " +
stringify( translatedAttrs ) );
final ObjectName objectName =
getOldResourcesMBean().createExternalJndiResource( translatedAttrs );
return( objectName );
| protected java.util.Map | getParamNameOverrides()
return( MapUtil.newMap( CONFIG_NAME_KEY, "jndi-name" ) );
| protected void | removeByName(java.lang.String name)
final Set<ResourceRefConfig> refs =
findAllRefConfigs( XTypes.JNDI_RESOURCE_CONFIG, name );
if ( refs.size() == 0 )
{
getOldResourcesMBean().removeExternalJndiResourceByJndiName( name );
}
else
{
for( final ResourceRefConfig ref : refs )
{
final String target = ref.getContainer().getName();
getOldResourcesMBean().deleteExternalJndiResource( name, target );
}
}
|
|