Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Properties jndiParameters = new Properties() ;
- jndiParameters.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
- jndiParameters.put(Context.PROVIDER_URL, "tcp://localhost:61616");
- Context context = new InitialContext(jndiParameters);
- ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("ConnectionFactory");
- Queue queue = (Queue) context.lookup("MyQueue");
- Context context = new InitialContext();
- ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("ConnectionFactory");
- Queue queue = (Queue) context.lookup("MyQueue");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement