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 04:04:31 UTC

svn commit: r1383220 - /camel/trunk/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java

Author: ningjiang
Date: Tue Sep 11 02:04:30 2012
New Revision: 1383220

URL: http://svn.apache.org/viewvc?rev=1383220&view=rev
Log:
CAMEL-5536 Fix the issue of ApnServiceFactory by applying the patch of Robert

Modified:
    camel/trunk/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java

Modified: camel/trunk/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java?rev=1383220&r1=1383219&r2=1383220&view=diff
==============================================================================
--- camel/trunk/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java (original)
+++ camel/trunk/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java Tue Sep 11 02:04:30 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);
         }