本文整理了Java中org.jboss.util.naming.Util.bind()
方法的一些代码示例,展示了Util.bind()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.bind()
方法的具体详情如下:
包路径:org.jboss.util.naming.Util
类名称:Util
方法名:bind
[英]Bind val to name in ctx, and make sure that all intermediate contexts exist
[中]将val绑定到ctx中的name,并确保所有中间上下文都存在
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-timerservice-naming
/**
* Binds the {@link TimerService} to {@link #jndiName} under {@link #context}
*
* @throws NamingException If there is any exception during the bind operation
*/
public void start() throws NamingException
{
Reference ref = new Reference(TimerService.class.getName(), TimerServiceObjectFactory.class.getName(), null);
Util.bind(this.context, jndiName, ref);
}
代码示例来源:origin: org.jboss.ejb3.jndi/jboss-ejb3-jndi-binder
@SuppressWarnings({"deprecation"})
protected void bind(Context ctx, String name, Object obj) throws NamingException
{
if(log.isDebugEnabled())
log.debug("Binding " + obj + " at " + name + " under " + ctx);
Util.bind(ctx, name, obj);
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-connector
/**
* Bind the object into jndi
*
* @param object the object to bind
* @throws Exception for any error
*/
protected void bind(Object object) throws Exception
{
InitialContext ctx = new InitialContext();
try
{
Util.bind(ctx, jndiName, object);
log.info("Bound admin object '" + object.getClass().getName() + "' at '" + jndiName + "'");
}
finally
{
ctx.close();
}
}
代码示例来源:origin: org.jboss/jboss-common-core
/** Bind val to name in ctx, and make sure that all intermediate contexts exist
@param ctx the parent JNDI Context under which value will be bound
@param name the name relative to ctx where value will be bound
@param value the value to bind.
@throws NamingException for any error
*/
public static void bind(Context ctx, String name, Object value) throws NamingException
{
Name n = ctx.getNameParser("").parse(name);
bind(ctx, n, value);
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-server
if (type == String.class)
Util.bind(ctx, entry.getName(), entry.getValue());
Util.bind(ctx, entry.getName(), new Integer(entry.getValue()));
Util.bind(ctx, entry.getName(), new Long(entry.getValue()));
Util.bind(ctx, entry.getName(), new Double(entry.getValue()));
Util.bind(ctx, entry.getName(), new Float(entry.getValue()));
Util.bind(ctx, entry.getName(), new Byte(entry.getValue()));
Util.bind(ctx, entry.getName(), value);
Util.bind(ctx, entry.getName(), new Short(entry.getValue()));
Util.bind(ctx, entry.getName(), new Boolean(entry.getValue()));
Util.bind(ctx, entry.getName(), entry.getValue());
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceReferenceMetaData sref) throws NamingException
{
if (!sref.isProcessed())
{
final UnifiedServiceRefMetaData spiRef = getUnifiedServiceRefMetaData(vfsRoot, sref);
final Referenceable jndiReferenceable = delegate.createReferenceable(spiRef);
final String jndiFullName = encCtx.getNameInNamespace() + "/" + encName;
log.info("Binding service reference to [jndi=" + jndiFullName + "]");
Util.bind(encCtx, encName, jndiReferenceable);
sref.setProcessed(true);
}
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-profileservice
Util.bind(ctx, jndiName, psProxy);
log.debug("Bound ProfileService proxy under: "+jndiName);
if(mgtViewJndiName != null && mgtViewJndiName.length() > 0)
Util.bind(ctx, mgtViewJndiName, mgtViewProxy);
log.debug("Bound ManagementView proxy under: "+mgtViewJndiName);
if(deployMgrJndiName != null && deployMgrJndiName.length() > 0)
Util.bind(ctx, deployMgrJndiName, deployMgrProxy);
log.debug("Bound DeploymentManager proxy under: "+deployMgrJndiName);
内容来源于网络,如有侵权,请联系作者删除!