[ 
https://issues.apache.org/activemq/browse/SM-331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian updated SM-331:
-------------------------

    Attachment: jabber_login_without_account_creation.diff

i made a small path for this.
it only creates the account, if the first login fails.

it is a patch for the 
src/main/java/org/apache/servicemix/components/jabber/JabberComponentSupport.java
 file in the servicemix-components sub-project

The patch was done against Version 3.0.1 (from the tag in svn)

> JabberComponentSupport attempts to create a jabber account every time on start
> ------------------------------------------------------------------------------
>
>                 Key: SM-331
>                 URL: https://issues.apache.org/activemq/browse/SM-331
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-components
>    Affects Versions: 2.0.2
>         Environment: any
>            Reporter: Jan Maes
>            Priority: Minor
>         Attachments: jabber_login_without_account_creation.diff
>
>
> JabberComponentSupport.start() always tries to create a new account on 
> startup.
>             if (login && !connection.isAuthenticated()) {
>                 if (user != null) {
>                     AccountManager accountManager = new 
> AccountManager(connection);
>                     accountManager.createAccount(user, password);
>                     log.info("Logging in to Jabber as user: " + user + " on 
> connection: " + connection);
>                     connection.login(user, password, resource);
>                 }
>                 else {
>                     log.info("Logging in anonymously to Jabber on connection: 
> " + connection);
>                     connection.loginAnonymously();
>                 }
> At second startup, this throws an exception. Better try to login first, and 
> try to create account if that fails.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to