Package javax.naming

Examples of javax.naming.Context.rebind()


        MockContextFactory.setAsInitial();
       
        final Context ctx = NamingContextPool.getNamingContext(null);
        try
        {
            ctx.rebind(CONNECTION_FACTORY, new MockQueueConnectionFactory());
            ctx.rebind(TOPIC_CONNECTION_FACTORY, new MockTopicConnectionFactory());
            ctx.rebind(QUEUE_NAME, new MockQueue(QUEUE_NAME));
            ctx.rebind(TOPIC_NAME, new MockTopic(TOPIC_NAME));
        }
        finally
View Full Code Here


       
        final Context ctx = NamingContextPool.getNamingContext(null);
        try
        {
            ctx.rebind(CONNECTION_FACTORY, new MockQueueConnectionFactory());
            ctx.rebind(TOPIC_CONNECTION_FACTORY, new MockTopicConnectionFactory());
            ctx.rebind(QUEUE_NAME, new MockQueue(QUEUE_NAME));
            ctx.rebind(TOPIC_NAME, new MockTopic(TOPIC_NAME));
        }
        finally
        {
View Full Code Here

        final Context ctx = NamingContextPool.getNamingContext(null);
        try
        {
            ctx.rebind(CONNECTION_FACTORY, new MockQueueConnectionFactory());
            ctx.rebind(TOPIC_CONNECTION_FACTORY, new MockTopicConnectionFactory());
            ctx.rebind(QUEUE_NAME, new MockQueue(QUEUE_NAME));
            ctx.rebind(TOPIC_NAME, new MockTopic(TOPIC_NAME));
        }
        finally
        {
            NamingContextPool.releaseNamingContext(ctx) ;
View Full Code Here

        try
        {
            ctx.rebind(CONNECTION_FACTORY, new MockQueueConnectionFactory());
            ctx.rebind(TOPIC_CONNECTION_FACTORY, new MockTopicConnectionFactory());
            ctx.rebind(QUEUE_NAME, new MockQueue(QUEUE_NAME));
            ctx.rebind(TOPIC_NAME, new MockTopic(TOPIC_NAME));
        }
        finally
        {
            NamingContextPool.releaseNamingContext(ctx) ;
        }
View Full Code Here

            Context context = new InitialContext();
            MockContextFactory.setDelegateContext( context );
       
            final MockQueue queue = new SerializableMockQueue( QUEUE_NAME );
       
            context.rebind( QUEUE_NAME, queue );

            // inbound is to simulate a jms message arriving at a gateway endpoint.
            TextMessageImpl inBoundJmsMessage = new TextMessageImpl();
            inBoundJmsMessage.setJMSReplyTo( queue );
            new DefaultESBPropertiesSetter().setPropertiesFromJMSMessage( inBoundJmsMessage, msg );
View Full Code Here

        }

        Context ctx = new InitialContext();

        SQLWorkSpace sp = new SQLWorkSpace();
        ctx.rebind("syrupWorkSpace", sp);

        com.mysql.jdbc.jdbc2.optional.MysqlDataSource ds = new com.mysql.jdbc.jdbc2.optional.MysqlDataSource();
        ds.setURL(url);

        if (user != null)
View Full Code Here

        }
        if (password != null)
        {
            ds.setPassword(password);
        }
        ctx.rebind("syrupDataSource", ds);

        SQLImpl impl = new MySQLImpl();
        ctx.rebind("syrupSQLImpl", impl);
    }
}
View Full Code Here

            ds.setPassword(password);
        }
        ctx.rebind("syrupDataSource", ds);

        SQLImpl impl = new MySQLImpl();
        ctx.rebind("syrupSQLImpl", impl);
    }
}
View Full Code Here

        }

        Context ctx = new InitialContext();

        BlobClient client = new BlobClient(location);
        ctx.rebind("syrupBlobClient", client);

    }
}
View Full Code Here

        else
        {
            final Context context = lookupSubContext( getPathName( name ) );
            if( rebind )
            {
                context.rebind( getLeafName( name ), object );
            }
            else
            {
                context.bind( getLeafName( name ), object );
            }
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.