public Object getObject() throws javax.naming.NamingException { Object o = super.getObject(); try { o = copy(o); } catch (final Exception e) { throw new NamingException("Error copying object into local class loader", e); } return o; }
private Reference buildReferenceLocation(final ReferenceLocationInfo location) { if (location.jndiProviderId != null) { final String subContextName = "openejb/remote_jndi_contexts/" + location.jndiProviderId; return new JndiReference(subContextName, location.jndiName); } else { return new JndiUrlReference(location.jndiName); } }
public NameNode(NameNode parent, ParsedName name, Object obj, NameNode parentTree) { atomicName = name.getComponent(); atomicHash = name.getComponentHashCode(); this.parent = parent; this.parentTree = parentTree; if (name.next()) subTree = new NameNode(this, name, obj, this); else myObject = obj; }
public NameNode(final NameNode parent, final ParsedName name, final Object obj, final NameNode parentTree) { atomicName = name.getComponent(); atomicHash = name.getComponentHashCode(); this.parent = parent; this.parentTree = parentTree; if (name.next()) { subTree = new NameNode(this, name, obj, this); } else if (obj instanceof Context) { myObject = new Federation(); ((Federation) myObject).add((Context) obj); } else { myObject = obj; } }
public MyNamingEnumeration(final NameNode parentNode) { final Vector vect = new Vector(); NameNode node = parentNode.getSubTree(); if (node == null) { node = parentNode; } else { vect.addElement(node); } gatherNodes(node, vect); buildEnumeration(vect); }
public IvmContext(final String nodeName) { this(new NameNode(null, new ParsedName(nodeName), null, null)); }
public JndiEncArtifact(final IvmContext context) { NameNode node = context.mynode; do { path = node.getAtomicName() + "/" + path; node = node.getParent(); } while (node != null); }
private boolean hasChildren(NameNode node) { if (subTree != null && subTree.hasChildren(node)) return true; if (grtrTree != null && grtrTree.hasChildren(node)) return true; if (lessTree != null && lessTree.hasChildren(node)) return true; return (parent == node); }
private void unbind(final NameNode node) { if (subTree == node) { subTree = null; } else if (grtrTree == node) { grtrTree = null; } else if (lessTree == node) { lessTree = null; } rebalance(this, node); }
@Override public String toString() { return "IvmContext{" + "mynode=" + mynode.getAtomicName() + '}'; }
private <T> T customizePort(final T port) { if (customizer != null && configuration != null) { customizer.customize(port, configuration); } return port; }
public NameNode(final NameNode parent, final ParsedName name, final Object obj, final NameNode parentTree) { atomicName = name.getComponent(); atomicHash = name.getComponentHashCode(); this.parent = parent; this.parentTree = parentTree; if (name.next()) { subTree = new NameNode(this, name, obj, this); } else if (obj instanceof Context) { myObject = new Federation(); ((Federation) myObject).add((Context) obj); } else { myObject = obj; } }
public Object getObject() throws javax.naming.NamingException { Object o = super.getObject(); try { o = copy(o); } catch (final Exception e) { throw new NamingException("Error copying object into local class loader", e); } return o; }
private Reference buildReferenceLocation(final ReferenceLocationInfo location) { if (location.jndiProviderId != null) { final String subContextName = "openejb/remote_jndi_contexts/" + location.jndiProviderId; return new JndiReference(subContextName, location.jndiName); } else { return new JndiUrlReference(location.jndiName); } }
public IvmContext() { this(new NameNode(null, new ParsedName(""), null, null)); }
private boolean hasChildren(final NameNode node) { if (subTree != null && subTree.hasChildren(node)) { return true; } if (grtrTree != null && grtrTree.hasChildren(node)) { return true; } if (lessTree != null && lessTree.hasChildren(node)) { return true; } return parent == node; }
public Object getObject() throws javax.naming.NamingException { Object o = super.getObject(); try { o = copy(o); } catch (Exception e) { throw new NamingException("Error copying object into local class loader", e); } return o; }
private Reference buildReferenceLocation(ReferenceLocationInfo location) { if (location.jndiProviderId != null){ String subContextName = "openejb/remote_jndi_contexts/" + location.jndiProviderId; return new JndiReference(subContextName, location.jndiName); } else { return new JndiUrlReference(location.jndiName); } }