Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8709C610 for ; Thu, 27 Jun 2013 13:37:58 +0000 (UTC) Received: (qmail 99384 invoked by uid 500); 27 Jun 2013 13:37:58 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 99345 invoked by uid 500); 27 Jun 2013 13:37:58 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Delivered-To: moderator for users@activemq.apache.org Received: (qmail 74881 invoked by uid 99); 27 Jun 2013 09:04:26 -0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: encountered temporary error during SPF processing of domain of logu.it86@gmail.com) Date: Thu, 27 Jun 2013 02:03:00 -0700 (PDT) From: loganathan To: users@activemq.apache.org Message-ID: <1372323780558-4668639.post@n4.nabble.com> Subject: Problem in VM broker url along with simpleAuthenticationPlugin in activemq MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Below is sample test code for connecting to tcp broker url and the tcp://localhost:61616 url and simpleAuthenticationPlugin also configured in context-activemq.xml below code is working fine if I given wrong username and password its showing exception as "wrong username" but what's my problem instead of tcp broker url and have acheives through vm broker url. suppose if i configured vm://BrokerDefault url and simpleAuthenticationPlugin in context-activemq.xml on that scanerio even if i given wrong username and password the below code is not showing any exception as "wrong username" how i can acheived it through vm broker url.Is anyone help for this issue would be highly appreciated? public class ExampleCheck { private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory .getLog(ExampleCheck.class); public static void main(String[] args) { ConnectionFactory connectionFactory = null; Connection connection = null; Session session = null; Queue queue = null; MessageProducer producer = null; final int NUM_MSGS = 20; final String url = "tcp://localhost:61616"; try { connectionFactory = new ActiveMQConnectionFactory(url); log.info("Got ConnectionFactory"); connection = connectionFactory.createConnection("logu", "gafoor"); log.info("Got Connection"); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); log.info("Got Session"); queue = session.createQueue("jms:queue:Testsubscription1.outbound.queue"); log.info("Got Destination"); producer = session.createProducer(queue); log.info("Got Producer"); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); TextMessage message = session.createTextMessage(); for (int i = 0; i < NUM_MSGS; i++) { message.setText("This is message " + (i + 1)); log.info("Sending message: " + message.getText()); Thread.sleep(5000); producer.send(message); } producer.send(session.createMessage()); } catch (Exception e1) { e1.printStackTrace(); } finally { if (connection != null) { try { connection.close(); } catch (JMSException e) { } } } } } -- View this message in context: http://activemq.2283324.n4.nabble.com/Problem-in-VM-broker-url-along-with-simpleAuthenticationPlugin-in-activemq-tp4668639.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.