[ 
https://issues.apache.org/activemq/browse/CAMEL-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44772#action_44772
 ] 

Claus Ibsen commented on CAMEL-659:
-----------------------------------

Anyone up for the task of creating a patch for the upgrade to smack 3.0.4. 
Michael, sorry we have changed the camel-xmpp quite a bit lately so your 
original patch must be redone.

We have a maven repo with the 3.0.4 jars now. 

1) Add this to pom.xml
  <repositories>
    <!-- ServiceMix repo -->
    <repository>
      <id>servicemix</id>
      <name>Apache ServiceMix Repository</name>
      <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
    </repository>
  </repositories>

2) Upgrade to 3.0.4 in pom.xml
    <dependency>
      <groupId>org.igniterealtime.smack</groupId>
      <artifactId>smack</artifactId>
      <version>3.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.igniterealtime.smack</groupId>
      <artifactId>smackx</artifactId>
      <version>3.0.4</version>
    </dependency>

Then you are set. You will get some compilation errors since the API in 3.0 is 
different than 2.x.

> XMPP endpoint should should auto-reconnect if it loses connection to the xmpp 
> server
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-659
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-659
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-xmpp
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Michael Kahn
>             Fix For: 1.5.0
>
>         Attachments: camel-xmpp-smack_3_0_4.patch
>
>
> In 1.3.0, XmppEndpoint.java and related classes use the smack 2.2.1 API, and 
> have a getConnection() method that sets up and caches the xmpp connection and 
> chat once when the endpoint is initialized. If the network connection to the 
> xmpp server is subsequently lost, attempts to route throw an exception.  This 
> makes use of this component on remote and roaming/wireless devices difficult.
> Smack API 3.0.4+ (the only version available for "official" download right 
> now) should auto-reconnect the XMPPConnection once it is created, reusing the 
> same credentials from the current login() session, however the API is not a 
> drop-in replacement, there are a few differences.  It also isn't in the maven 
> repository yet - that maxes out at 2.2.1.

-- 
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