org.jboss.util.naming.Util.bind()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中org.jboss.util.naming.Util.bind()方法的一些代码示例,展示了Util.bind()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.bind()方法的具体详情如下:
包路径:org.jboss.util.naming.Util
类名称:Util
方法名:bind

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);

相关文章