activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suneel Papineni <Suneel.Papin...@mettoni.com>
Subject No Errors at ActiveMQ-CPP client for wrong credentials.
Date Mon, 18 Apr 2011 13:31:36 GMT
Hi,

 

I am using ActiveMQ-CPP 3.2.5 and ActiveMQ 5.5. An application is
designed using this and is connected successfully with correct
credentials. When I pass wrong credentials, I didn't receive any error
message at client-side. Only at ActiveMQ logs, it is shown as a warning.

 

"WARN | Failed to add Connection ID:SuneelP-M6500-53700-1303-0:0,
reason: java.lang.SecurityException: User name or password is invalid."

 

Following is the code I am using....

try {

activemq::library::ActiveMQCPP::initializeLibrary();

      auto_ptr<ConnectionFactory>
connectionFactory(ConnectionFactory::createCMSConnectionFactory("tcp://l
ocalhost:61616")); 

      connection =
connectionFactory->createConnection("system","password");  //Wrong
Credentials

      connection->setExceptionListener(this);

}catch (CMSException cmsexp) {

      std::cout << cmsexp.getMessage();

}     

 

Could you please let me know if I need to modify or add anything else to
get error at client for wrong credentials.

 

 

Also, is there any way to know at client side if ActiveMQ is started and
running properly, before creating a connection with ActiveMQ.

 

Thanks & Regards

Suneel

 

 

      

 


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