Methods Summary |
---|
protected void | bind(java.lang.Object object)Bind the object into jndi
InitialContext ctx = new InitialContext();
try
{
Util.bind(ctx, jndiName, object);
log.info("Bound admin object '" + object.getClass().getName() + "' at '" + jndiName + "'");
}
finally
{
ctx.close();
}
|
protected java.lang.Object | createAdminObject(org.jboss.resource.metadata.AdminObjectMetaData aomd)Create the admin object
try
{
return AdminObjectFactory.createAdminObject(jndiName, rarName, aomd, properties);
}
catch (Throwable t)
{
DeploymentException.rethrowAsDeploymentException("Error creating admin object metadata type=" + type + " ra=" + rarName, t);
return null; // unreachable
}
|
public java.lang.String | getJNDIName()
return jndiName;
|
public java.util.Properties | getProperties()
return properties;
|
public javax.management.ObjectName | getRARName()
return rarName;
|
public java.lang.String | getType()
return type;
|
protected org.jboss.resource.metadata.AdminObjectMetaData | retrieveAdminObjectMetaData()Retrieve the admin object metadata
try
{
ConnectorMetaData cmd = (ConnectorMetaData) server.getAttribute(rarName, "MetaData");
return cmd.getAdminObject(type);
}
catch (Throwable t)
{
DeploymentException.rethrowAsDeploymentException("Error retrieving admin object metadata type=" + type + " ra=" + rarName, t);
return null; // unreachable
}
|
public void | setJNDIName(java.lang.String jndiName)
this.jndiName = jndiName;
|
public void | setProperties(java.util.Properties properties)
this.properties = properties;
|
public void | setRARName(javax.management.ObjectName rarName)
this.rarName = rarName;
|
public void | setType(java.lang.String type)
this.type = type;
|
protected void | startService()
AdminObjectMetaData aomd = retrieveAdminObjectMetaData();
if (aomd == null)
throw new DeploymentException("No admin object metadata type=" + type + " ra=" + rarName);
Object adminObject = createAdminObject(aomd);
bind(adminObject);
|
protected void | stopService()
unbind();
|
protected void | unbind()Unbind the object from jndi
InitialContext ctx = new InitialContext();
try
{
Util.unbind(ctx, jndiName);
log.info("Unbound admin object at '" + jndiName + "'");
}
finally
{
ctx.close();
}
|