Examples of JndiContext


Examples of com.enioka.jqm.jndi.JndiContext

        jqmlogger.trace("registering remote agent");
        try
        {
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            JndiContext ctx = (JndiContext) NamingManager.getInitialContext(null);
            ctx.registerRmiContext(LocateRegistry.createRegistry(registryPort));

            JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://" + hostname + ":" + serverPort + "/jndi/rmi://" + hostname + ":"
                    + registryPort + "/jmxrmi");

            JMXConnectorServer cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
View Full Code Here

Examples of org.apache.camel.guice.jndi.internal.JndiContext

                                    new Provider<Context>() {
                                        @Inject
                                        Injector injector;

                                        public Context get() {
                                            JndiContext context = new JndiContext(
                                                    environment);
                                            Properties jndiNames = createJndiNamesProperties(environment);
                                            try {
                                                JndiBindings
                                                        .bindInjectorAndBindings(
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

     */
    private CamelContext configure(StatefulKnowledgeSession session) throws Exception {
        GridImpl grid = new GridImpl(new HashMap<String, Object>());       
        GridNode node = grid.createGridNode("testnode");

        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);

        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

     * 3) marshalling route (enables creating commands through API and converting to JSON)
     */
    private CamelContext configure(StatefulKnowledgeSession session) throws Exception {
        GridImpl grid = new GridImpl(new HashMap());
        GridNode node = grid.createGridNode("testnode");
        Context context = new JndiContext();
        context.bind("testnode", node);
        node.set("ksession", session);
       
        CamelContext camelContext = new DefaultCamelContext(context);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

    public void testPojoRoutes() throws Exception {
        // START SNIPPET: register
        // lets populate the context with the services we need
        // note that we could just use a spring.xml file to avoid this step
        JndiContext context = new JndiContext();
        context.bind("bye", new SayService("Good Bye!"));

        CamelContext camelContext = new DefaultCamelContext(context);
        // END SNIPPET: register

        // START SNIPPET: route
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

    private static final transient Log LOG = LogFactory.getLog(TimerRouteTest.class);

    public void testPojoRoutes() throws Exception {
        final AtomicInteger hitCount = new AtomicInteger();

        JndiContext context = new JndiContext();
        context.bind("bar", new Runnable() {
            public void run() {
                LOG.debug("hit");
                hitCount.incrementAndGet();
            }
        });
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

        // Boot up a local RMI registry
        LocateRegistry.createRegistry(1099);

        // START SNIPPET: register
        JndiContext context = new JndiContext();
        context.bind("bye", new SayService("Good Bye!"));

        CamelContext camelContext = new DefaultCamelContext(context);
        // END SNIPPET: register

        // START SNIPPET: route
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

        assertSame("Lookup of 'myBean' should return same object!", myBean, lookedUpBean);
    }

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

        assertMockEndpointsSatisfied();
    }

    @Override
    protected Context createJndiContext() throws Exception {
        jndiContext = new JndiContext();
        jndiContext.bind("myBean", new MyBean());
        return jndiContext;
    }
View Full Code Here

Examples of org.apache.camel.util.jndi.JndiContext

        assertEquals("bean body: " + myPredicate, expectedBody, myPredicate.body);
    }

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("myPredicate", myPredicate);
        return answer;
    }
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.