Package org.apache.xbean.naming.context

Examples of org.apache.xbean.naming.context.WritableContext


                break;
            }
        }
        if (!hasEnv) bindings.put("java:comp/env/dummy", "dummy");

        WritableContext context = null;
        try {
            context = new WritableContext("", bindings);
        } catch (NamingException e) {
            throw new IllegalStateException(e);
        }
        return context;
    }
View Full Code Here


                break;
            }
        }
        if (!hasEnv) bindings.put("java:comp/env/dummy", "dummy");

        WritableContext context = null;
        try {
            context = new WritableContext("", bindings);
        } catch (NamingException e) {
            throw new IllegalStateException(e);
        }
        return context;
    }
View Full Code Here

                    break;
                }
            }
            if (!hasEnv) bindings.put("java:comp/env/dummy", "dummy");

            WritableContext context = null;
            try {
                context = new WritableContext("", bindings);
            } catch (NamingException e) {
                throw new IllegalStateException(e);
            }
            return context;
        }
View Full Code Here

*/
public class DeepBindableContextTest extends TestCase {
   
    public void testBindUnbind() throws Exception {
        System.setProperty("java.naming.factory.initial", "org.apache.xbean.naming.global.GlobalContextManager");
        WritableContext globalContext = new WritableContext("");
        GlobalContextManager.setGlobalContext(globalContext);
        DeepBindableContext context = new DeepBindableContext("openejb", false, true, false, false);
        globalContext.bind("openejb", context);

        Context contextWrapper = context.newContextWrapper();
        testBindUnbind(context, contextWrapper, "openejb/foo/bar", "");
        testBindUnbind(context, contextWrapper, "java:openejb/foo/bar", "java:");

View Full Code Here

        bindings.put("comp/env/hello", "Hello");
        bindings.put("comp/env/world", "Hello World");
        bindings.put("comp/env/here/there/anywhere", "long name");
        bindings.put("comp/env/link", link);

        readOnlyContext = new WritableContext("", bindings, ContextAccess.UNMODIFIABLE);

        envBinding = new HashMap();
        envBinding.put("hello", "Hello");
        envBinding.put("world", "Hello World");
        envBinding.put("here", readOnlyContext.lookup("comp/env/here"));
View Full Code Here

    private final Context context;

    public WritableURLContextFactory(String urlScheme) throws NamingException {
        super(urlScheme);
        context = new WritableContext(urlScheme + ":", Collections.<String, Object>emptyMap(), ContextAccess.MODIFIABLE, false);
    }
View Full Code Here

*/
public class DefaultInitialContextFactoryBuilder implements InitialContextFactoryBuilder {
    private final Context initialContext;

    public DefaultInitialContextFactoryBuilder() throws NamingException {
        initialContext = new WritableContext();
    }
View Full Code Here

        bindings.put("env/hello", "Hello");
        bindings.put("env/world", "Hello World");
        bindings.put("env/here/there/anywhere", "long name");
        bindings.put("env/link", link);

        readOnlyContext = new WritableContext("", bindings, ContextAccess.UNMODIFIABLE);

        envBinding = new HashMap();
        envBinding.put("hello", "Hello");
        envBinding.put("world", "Hello World");
        envBinding.put("here", readOnlyContext.lookup("env/here"));
View Full Code Here

                break;
            }
        }
        if (!hasEnv) bindings.put("java:comp/env/dummy", "dummy");

        WritableContext context = null;
        try {
            context = new WritableContext("", bindings);
        } catch (NamingException e) {
            throw new IllegalStateException(e);
        }
        return context;
    }
View Full Code Here

        bindings.put("env/hello", "Hello");
        bindings.put("env/world", "Hello World");
        bindings.put("env/here/there/anywhere", "long name");
        bindings.put("env/link", link);

        readOnlyContext = new WritableContext("", bindings, ContextAccess.UNMODIFIABLE);

        envBinding = new HashMap();
        envBinding.put("hello", "Hello");
        envBinding.put("world", "Hello World");
        envBinding.put("here", readOnlyContext.lookup("env/here"));
View Full Code Here

TOP

Related Classes of org.apache.xbean.naming.context.WritableContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.