activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TheKK <jkrishnaku...@gmail.com>
Subject Re: Configure Simple Authentication Plugin in apache-activemq-4.1.1
Date Tue, 24 Apr 2007 08:56:09 GMT

Hi James,
I followed the steps mentioned in the below url and it works fine now.
https://bugzilla.spamassassin.org/activemq/browse/AMQ-982
https://bugzilla.spamassassin.org/activemq/browse/AMQ-982 

Thanks James.

Wbr,
KK


James.Strachan wrote:
> 
> BTW with the wrong credentials its the createConnection() which should
> fail
> 
> On 4/24/07, James Strachan  wrote:
>> Could you show us the complete activemq.xml and the activemq log
>> please? Are you running the broker using the activemq script?
>>
>> On 4/19/07, TheKK  wrote:
>> >
>> > Hi All,
>> >
>> >
>> > I am basically trying to authenticate users while creating connection
>> using
>> > the Simple Authentication Plugin.
>> >
>> > activemq.xml
>> > ===============
>> > 
>> >       > userPasswords="#users"/>
>> >  
>> >
>> >
>> >
>> >     
>> >     
>> >       
>> >          
>> >       
>> >     
>> >     
>> >        
>> >          
>> >         
>> >   
>> >
>> >
>> >
>> >
>> > Code Snippet
>> > ============
>> >
>> > public class SimpleProducer {
>> >
>> >     private static final org.apache.commons.logging.Log log =
>> > org.apache.commons.logging.LogFactory
>> >             .getLog(SimpleProducer.class);
>> >
>> >      public static void main(String[] args) {
>> >         ConnectionFactory connectionFactory = null;
>> >         Connection connection = null;
>> >         Session session = null;
>> >         Topic topic = 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("kk","abc");
>> >                         log.info("Got Connection");
>> >
>> >                         session = connection.createSession(false,
>> Session.AUTO_ACKNOWLEDGE);
>> >                         log.info("Got Session");
>> >
>> >                         topic = session.createTopic("eMeterTopic");
>> >                         log.info("Got Destination");
>> >
>> >                         producer = session.createProducer(topic);
>> >                         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) {
>> >                 }
>> >             }
>> >         }
>> >     }
>> > }
>> >
>> >
>> >
>> > While running the SimpleProducer application,with wrong credentials it
>> does
>> > not throw any exception like user is invalid or user is not
>> authtenticated.
>> >
>> >
>> > So,Please let me know the correct steps to configure Simple
>> Authentication
>> > Plugin in apache-activemq-4.1.1.
>> >
>> > Thanks in advance,
>> > KK
>> > --
>> > View this message in context:
>> http://www.nabble.com/Configure-Simple-Authentication-Plugin-in-apache-activemq-4.1.1-tf3607805s2354.html#a10080142
>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >
>> >
>>
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Configure-Simple-Authentication-Plugin-in-apache-activemq-4.1.1-tf3607805s2354.html#a10156841
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message