Package javax.naming

Examples of javax.naming.Context.bind()


                    try {
                        ctx.lookup("java:comp/WebServiceContext");
                    } catch (NamingException e) {
                        WebServiceContext wsContext;
                        wsContext = new EjbWsContext(sessionContext);
                        ctx.bind("java:comp/WebServiceContext", wsContext);
                    }
                }

                fillInjectionProperties(objectRecipe, beanClass, deploymentInfo, ctx);
View Full Code Here


                try {
                    sessionContext = (SessionContext) ctx.lookup("java:comp/EJBContext");
                } catch (NamingException e1) {
                    StatefulUserTransaction userTransaction = new StatefulUserTransaction(new EjbUserTransaction(), entityManagerRegistry);
                    sessionContext = new StatefulContext(securityService, userTransaction);
                    ctx.bind("java:comp/EJBContext", sessionContext);
                }
            }

            // Create bean instance
            InjectionProcessor injectionProcessor = new InjectionProcessor(beanClass, deploymentInfo.getInjections(), null, null, ctx);
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        Context context = super.createJndiContext();
        repository = new TransientRepository("target/repository.xml", "target/repository");
        context.bind("repository", repository);
        return context;
    }
}
View Full Code Here

        accessControlManager.setPolicy(path, acl);

        session.save();
        session.logout();

        context.bind("repository", repository);
        return context;
    }

    protected Repository getRepository() {
        return repository;
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        Context context = super.createJndiContext();
        repository = new TransientRepository("target/repository.xml", "target/repository");
        context.bind("repository", repository);
        return context;
    }

}
View Full Code Here

        String unit = persistenceUnitGBean.getPersistenceUnitName();
        String rootUrl = persistenceUnitGBean.getPersistenceUnitRoot();
        String id = unit + " " + rootUrl.hashCode();
        Context context = SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext();
        try {
            context.bind("java:openejb/PersistenceUnit/" + id, persistenceUnitGBean.getEntityManagerFactory());
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
    }
View Full Code Here

    }

    @Override
    protected Context createJndiContext() throws Exception {
        Context context = super.createJndiContext();
        context.bind("foo", dataSet);
        return context;
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
View Full Code Here

        MemoryContext me = new MemoryContext(namespace, new Hashtable(), null);
       
        try
        {
            Context testContext = me.createSubcontext("test");
            testContext.bind("key", "jndivalue");
            testContext.bind("key2","jndivalue2");
            testContext.bind("short","1");
            testContext.bind("boolean","true");
            testContext.bind("byte","10");
            testContext.bind("double","10.25");
View Full Code Here

       
        try
        {
            Context testContext = me.createSubcontext("test");
            testContext.bind("key", "jndivalue");
            testContext.bind("key2","jndivalue2");
            testContext.bind("short","1");
            testContext.bind("boolean","true");
            testContext.bind("byte","10");
            testContext.bind("double","10.25");
            testContext.bind("float","20.25");
View Full Code Here

        try
        {
            Context testContext = me.createSubcontext("test");
            testContext.bind("key", "jndivalue");
            testContext.bind("key2","jndivalue2");
            testContext.bind("short","1");
            testContext.bind("boolean","true");
            testContext.bind("byte","10");
            testContext.bind("double","10.25");
            testContext.bind("float","20.25");
            testContext.bind("integer","10");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.