You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sophia Wright <so...@gmail.com> on 2013/11/05 11:28:05 UTC

Changes to user name and password in ConnectionInfo not working

Hi there,

I am seeing a strange issue. I am using a TransportListener to detect
transport interrupted events and when this happens, I am changing the user
name and password in ActiveMQConnectionFactory as well as in the
ActiveMQConnection.getConnectionInfo() objects (using setUserName and
setPassword methods). My requirement is that everytime broker crashes and
restarts, I want to suppy a different user name and password fields.

These new user name and password are not being sent to the broker upon
restart. Could somebody please help why? Upon restart, the broker is seeing
previous user name and password fields in the connection info objects in
addConnection() method in a plugin. Does the broker persist this
information?

=Sophia=



--
View this message in context: http://activemq.2283324.n4.nabble.com/Changes-to-user-name-and-password-in-ConnectionInfo-not-working-tp4673891.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Changes to user name and password in ConnectionInfo not working

Posted by Sophia Wright <so...@gmail.com>.
Thanks Christian. I tried that but that didnt work as well. Perhaps, the
state of the connection is  lost and I have to create producer/consumer
again.

On a related note: The weird thing is  the user name and pass word is
changed in ConnectionInfo/ActiveMQConnection (I confirmed this by logging)
but when broker restarts, I don't know from where broker is getting old user
name and password. Is the broker persisting this old username and password
information somewhere? How does client replay its connection info to the
broker when broker restarts? Where is that code where client detects broker
restart and sends new connection info again? Any ideas why it is sending old
connection info details?

This is all getting hair pulling mystery. Help please... 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Changes-to-user-name-and-password-in-ConnectionInfo-not-working-tp4673891p4673933.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Changes to user name and password in ConnectionInfo not working

Posted by Christian Posta <ch...@gmail.com>.
Maybe call ActiveMQConnection#cleanup() and then
ActiveMQConnection#changeUserInfo(user, password) and try the
connection again.

On Tue, Nov 5, 2013 at 3:28 AM, Sophia Wright <so...@gmail.com> wrote:
> Hi there,
>
> I am seeing a strange issue. I am using a TransportListener to detect
> transport interrupted events and when this happens, I am changing the user
> name and password in ActiveMQConnectionFactory as well as in the
> ActiveMQConnection.getConnectionInfo() objects (using setUserName and
> setPassword methods). My requirement is that everytime broker crashes and
> restarts, I want to suppy a different user name and password fields.
>
> These new user name and password are not being sent to the broker upon
> restart. Could somebody please help why? Upon restart, the broker is seeing
> previous user name and password fields in the connection info objects in
> addConnection() method in a plugin. Does the broker persist this
> information?
>
> =Sophia=
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Changes-to-user-name-and-password-in-ConnectionInfo-not-working-tp4673891.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta