本文整理了Java中org.jboss.util.naming.Util.unbind()
方法的一些代码示例,展示了Util.unbind()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.unbind()
方法的具体详情如下:
包路径:org.jboss.util.naming.Util
类名称:Util
方法名:unbind
[英]Unbinds a name from ctx, and removes parents if they are empty
[中]从ctx中取消绑定名称,如果父项为空,则删除父项
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-core
public void stop() throws Exception
{
Util.unbind(ctx, jndiName);
}
}
代码示例来源:origin: org.jboss.reloaded/jboss-reloaded-naming-deployers
@Override
public void stop() throws Exception
{
Util.unbind(parentContext, name);
context = null;
parentContext = null;
}
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-timerservice-naming
/**
* Unbinds {@link TimerService} from {@link #jndiName} under {@link #context}
* @throws NamingException If there is any exception during the bind operation
*/
public void stop() throws NamingException
{
Util.unbind(this.context, jndiName);
}
}
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
/**
* Unregister an internal slee component with jndi.
*
* @param Name -
* the full path to the resource except the "java:" prefix.
*/
public static void unregisterWithJndi(String name) {
Context ctx;
String path = JVM_ENV + name;
try {
ctx = new InitialContext();
Util.unbind(ctx, path);
} catch (NamingException ex) {
logger.warn("unregisterWithJndi failed for " + path);
}
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-profileservice
public void stop()
throws Exception
{
Dispatcher.singleton.unregisterTarget(dispatchName);
String mvDispatchName = dispatchName+".ManagementView";
Dispatcher.singleton.unregisterTarget(mvDispatchName);
InitialContext ctx = new InitialContext();
Util.unbind(ctx, jndiName);
log.debug("Unbound ProfileService proxy");
if(mgtViewJndiName != null && mgtViewJndiName.length() > 0)
{
Util.unbind(ctx, mgtViewJndiName);
log.debug("Unbound ManagementView proxy");
}
if(deployMgrJndiName != null && deployMgrJndiName.length() > 0)
{
Util.unbind(ctx, deployMgrJndiName);
log.debug("Unbound DeploymentManager proxy");
}
//
if(createEjb3Links)
{
Util.unbind(ctx, "SecureProfileService/remote");
Util.unbind(ctx, "SecureManagementView/remote");
Util.unbind(ctx, "SecureDeploymentManager/remote");
log.debug("Unbound links back to secure ejb names");
}
}
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-connector
/**
* Unbind the object from jndi
*
* @throws Exception for any error
*/
protected void unbind() throws Exception
{
InitialContext ctx = new InitialContext();
try
{
Util.unbind(ctx, jndiName);
log.info("Unbound admin object at '" + jndiName + "'");
}
finally
{
ctx.close();
}
}
}
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
public void stopRMIServer() {
try {
if (logger.isDebugEnabled()) {
logger.debug("Stopping RMI Server for slee service");
}
InitialContext ctx = new InitialContext();
Util.unbind(ctx, "/SleeService");
rmiServer.destroy();
} catch (NamingException e) {
logger.error(
"Failed to stop RMI Server for remote slee service", e);
}
}
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
public void stopRMIServer() {
try {
if (logger.isDebugEnabled()) {
logger.debug("Stopping HA RMI Server for slee service");
}
InitialContext ctx = new InitialContext();
Util.unbind(ctx, "/SleeService");
rmiServer.destroy();
} catch (NamingException e) {
logger
.error("Failed to stop HA RMI Server for remote slee service",
e);
}
}
}
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
private void cleanNamingContext() throws NamingException {
Context ctx = new InitialContext();
Util.unbind(ctx, getFactoryInterfaceJNDIName());
Util.unbind(ctx, getInterfaceJNDIName());
if (log.isDebugEnabled()) {
log.debug("Context " + getFactoryInterfaceJNDIName() + " unbound from Naming Service");
}
}
代码示例来源:origin: org.jboss/jboss-common-core
/** Unbinds a name from ctx, and removes parents if they are empty
@param ctx the parent JNDI Context under which the name will be unbound
@param name The name to unbind
@throws NamingException for any error
*/
public static void unbind(Context ctx, String name) throws NamingException
{
unbind(ctx, ctx.getNameParser("").parse(name));
}
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-core
public void stop() throws Exception
{
super.stop();
Util.unbind(ctx, jndiName + PROXY_FACTORY_NAME);
Dispatcher.singleton.unregisterTarget(jndiName + PROXY_FACTORY_NAME);
}
}
代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-tomcat-jboss4
InitialContext iniCtx = new InitialContext();
Context applicationNameEnvCtx = (Context) iniCtx.lookup("java:/sip/" + applicationName);
Util.unbind(applicationNameEnvCtx,SipNamingContextListener.SIP_FACTORY_JNDI_NAME);
Util.unbind(applicationNameEnvCtx, SipNamingContextListener.SIP_SESSIONS_UTIL_JNDI_NAME);
Util.unbind(applicationNameEnvCtx,SipNamingContextListener.TIMER_SERVICE_JNDI_NAME);
Context sipEnvCtx = (Context) iniCtx.lookup("java:/sip/");
Util.unbind(sipEnvCtx, applicationName);
} catch (OperationNotSupportedException onse) {
log.warn("Could not remove the JNDI context java:/sip/" + applicationName + ", cause " + onse.getMessage());
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
private void unbindFromJndi() {
Context ctx;
try {
ctx = new InitialContext();
ComponentKey key = resourceAdaptorId.getComponentKey();
Util.unbind(ctx, CTX_JAVA_SLEE_RESOURCES + "/" + key.getName() + "/" + key.getVendor() + "/" + key.getVersion());
} catch (NamingException e) {
log.error("Failed binding RA in JNDI. RA ID: " + resourceAdaptorId, e);
}
}
代码示例来源:origin: org.jboss.switchboard/jboss-switchboard-mc-impl
Util.unbind(ctx, relativeJndiName);
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
/**
*
* Cleanup in the reverse order of init()
*
* @throws NamingException
*
*/
public void close() throws NamingException {
// Cleaning up the cache is not desired for failover scenarios.
// Cache should be cleaned only when the last node in a SLEE cluster is
// shutting down.
// TODO: cleanSleeCache();
unregisterWithJndi();
Context ctx = new InitialContext();
Util.unbind(ctx, JVM_ENV + CTX_SLEE);
// closeSipResourceAdaptor();
closeTckResourceAdaptor();
stopRMIServer();
}
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-core
public static void unbind(Context ctx, String strName) throws NamingException
{
Name name = ctx.getNameParser("").parse(strName);
int size = name.size();
String atom = name.get(size - 1);
Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
String key = parentCtx.getNameInNamespace() + "/" + atom;
wrapperMap.remove(key);
Util.unbind(ctx, strName);
}
内容来源于网络,如有侵权,请联系作者删除!