Package org.apache.xbean.naming.context

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


    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


                    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("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

*/
public class KarafInitialContextFactory extends GlobalContextManager {

    public KarafInitialContextFactory() throws Exception {
        super();
        setGlobalContext(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

    private ServiceRegistration registration;

    public void start(BundleContext bundleContext) throws Exception {
        osgiIcfb = new OSGiInitialContextFactoryBuilder(bundleContext, new OSGiContext(new OSGiServicesContext(bundleContext)));
        globalIcfb = new GlobalInitialContextFactoryBuilder();
        GlobalContextManager.setGlobalContext(new WritableContext());
        Properties props = new Properties();
        props.put(Constants.SERVICE_RANKING, Integer.valueOf(-1));
        registration = bundleContext.registerService(InitialContextFactoryBuilder.class.getName(), globalIcfb, props);
    }
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

                    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

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.