本文整理了Java中javax.naming.Binding.setObject()
方法的一些代码示例,展示了Binding.setObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.setObject()
方法的具体详情如下:
包路径:javax.naming.Binding
类名称:Binding
方法名:setObject
暂无
代码示例来源:origin: org.ow2.joram/jndi-shared
public void resolveReferences() throws NamingException {
for (int i = 0; i < bindings.length; i++) {
bindings[i].setObject(
LookupReply.resolveObject(
bindings[i].getObject()));
}
}
代码示例来源:origin: org.objectweb.joram/jndi-shared
public void resolveReferences() throws NamingException {
for (int i = 0; i < bindings.length; i++) {
bindings[i].setObject(
LookupReply.resolveObject(
bindings[i].getObject()));
}
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-client
public synchronized Object getObject() {
if (super.getObject() == null){
if (failed != null) throw failed;
try {
super.setObject(context.lookup(getName()));
} catch (NamingException e) {
throw failed = new RuntimeException("Failed to lazily fetch the binding '"+getName()+"'", e);
}
}
return super.getObject();
}
}
代码示例来源:origin: org.realityforge.jndikit/jndikit
public T next()
throws NamingException
{
if ( !hasMore() )
{
throw new NoSuchElementException();
}
final T object = m_items[ m_index++ ];
if ( object instanceof Binding )
{
final Binding binding = (Binding) object;
final Object resolvedObject = resolve( binding.getName(), binding.getObject() );
binding.setObject( resolvedObject );
}
return object;
}
代码示例来源:origin: org.sapia/sapia_archie
public Object onNext(Name contextName, Object next) throws NamingException{
if(next instanceof Binding && ((Binding)next).getObject() instanceof Context){
Binding b = (Binding)next;
b.setObject(new TestContextProxy((Context)b.getObject()));
return b;
}
else if(next instanceof Context){
return new TestContextProxy((Context)next);
}
else{
return next;
}
}
}
代码示例来源:origin: org.apache.openejb/openejb-client
@Override
public synchronized Object getObject() {
if (super.getObject() == null) {
if (failed != null) {
throw failed;
}
try {
super.setObject(context.lookup(getName()));
} catch (final NamingException e) {
throw failed = new ClientRuntimeException("Failed to lazily fetch the binding '" + getName() + "'", e);
}
}
return super.getObject();
}
}
代码示例来源:origin: org.realityforge.jndikit/jndikit
result.setObject( ( (MarshalledObject) object ).get() );
代码示例来源:origin: org.objectweb.joram/jndi-client
public NamingEnumeration listBindings(String name) throws NamingException {
if (Trace.logger.isLoggable(BasicLevel.DEBUG))
Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.listBindings(" + name + ')');
CompositeName queryPath = merge(contextPath, name);
JndiReply reply = connection.invoke(new ListBindingsRequest(queryPath));
if (reply instanceof JndiError) {
NamingException exc = ((JndiError)reply).getException();
exc.fillInStackTrace();
throw exc;
}
ListBindingsReply lbr = (ListBindingsReply)reply;
// 1- resolve contexts
Binding[] bindings = lbr.getContexts();
for (int i = 0; i < bindings.length; i++) {
CompositeName subCtxPath = (CompositeName)queryPath.clone();
subCtxPath.add(bindings[i].getName());
bindings[i].setObject(new NamingContextImpl(
connection.cloneConnection(), subCtxPath));
}
// 2- resolve references
lbr.resolveReferences();
return lbr.getEnumeration();
}
内容来源于网络,如有侵权,请联系作者删除!