Example usage for javax.naming CompositeName getSuffix

List of usage examples for javax.naming CompositeName getSuffix

Introduction

In this page you can find the example usage for javax.naming CompositeName getSuffix.

Prototype

public Name getSuffix(int posn) 

Source Link

Document

Creates a composite name whose components consist of a suffix of the components in this composite name.

Usage

From source file:org.eclipse.ecr.runtime.jtajca.NuxeoContainer.java

protected static void addDeepBinding(Context dir, CompositeName comp, Object obj) throws NamingException {
    Name name = comp.getPrefix(1);
    if (comp.size() == 1) {
        addBinding(dir, name, obj);/*from w  w w  . ja v a2  s  .  c  om*/
        return;
    }
    Context subdir;
    try {
        subdir = (Context) dir.lookup(name);
    } catch (NamingException e) {
        subdir = dir.createSubcontext(name);
    }
    addDeepBinding(subdir, (CompositeName) comp.getSuffix(1), obj);
}