You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2012/09/11 10:40:34 UTC

svn commit: r1383289 - in /camel/branches/camel-2.9.x: ./ components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java

Author: ningjiang
Date: Tue Sep 11 08:40:34 2012
New Revision: 1383289

URL: http://svn.apache.org/viewvc?rev=1383289&view=rev
Log:
Merged revisions 1383231 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x

................
  r1383231 | ningjiang | 2012-09-11 11:20:29 +0800 (Tue, 11 Sep 2012) | 9 lines
  
  Merged revisions 1383220 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1383220 | ningjiang | 2012-09-11 10:04:30 +0800 (Tue, 11 Sep 2012) | 1 line
    
    CAMEL-5536 Fix the issue of ApnServiceFactory by applying the patch of Robert
  ........
................

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1383220
  Merged /camel/branches/camel-2.10.x:r1383231

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java?rev=1383289&r1=1383288&r2=1383289&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java (original)
+++ camel/branches/camel-2.9.x/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java Tue Sep 11 08:40:34 2012
@@ -25,6 +25,8 @@ import com.notnoop.apns.ApnsDelegate;
 import com.notnoop.apns.ApnsService;
 import com.notnoop.apns.ApnsServiceBuilder;
 import com.notnoop.apns.ReconnectPolicy;
+import com.notnoop.apns.internal.Utilities;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.component.apns.model.ConnectionStrategy;
@@ -54,9 +56,15 @@ public class ApnsServiceFactory implemen
     private ApnsDelegate apnsDelegate;
 
     public ApnsServiceFactory() {
+        this.gatewayHost = Utilities.PRODUCTION_GATEWAY_HOST;
+        this.gatewayPort = Utilities.PRODUCTION_GATEWAY_PORT;
+
+        this.feedbackHost = Utilities.PRODUCTION_FEEDBACK_HOST;
+        this.feedbackPort = Utilities.PRODUCTION_FEEDBACK_PORT;
     }
 
     public ApnsServiceFactory(CamelContext camelContext) {
+        this();
         this.camelContext = camelContext;
     }
 
@@ -185,7 +193,7 @@ public class ApnsServiceFactory implemen
             if (certificateInputStream == null) {
                 throw new FileNotFoundException("Cannot load " + getCertificatePath() + " from classpath");
             }
-            builder.withCert(certificateInputStream, getCertificatePassword()).withProductionDestination();
+            builder.withCert(certificateInputStream, getCertificatePassword());
         } finally {
             ResourceUtils.close(certificateInputStream);
         }