You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by li...@inuus.com on 2010/05/13 15:51:15 UTC
Move 'org.apache.shindig.serviceExpirationDurationMinutes' to
shindig.properties (issue1196041)
Reviewers: shindig.remailer_gmail.com,
Please review this at http://codereview.appspot.com/1196041/show
Affected files:
M UPGRADING
M java/common/conf/shindig.properties
M
java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
Index: UPGRADING
diff --git a/UPGRADING b/UPGRADING
index
03734d59dd55f16c2c5cde796ff8f5c33e184b72..40a777f1ddd1226c287a285c33051b7538362338
100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -23,6 +23,7 @@ Too many to mention. Check the top-level pom.xml for all
the new versions
* servlet-api is upgraded to 2.5
+
== Java Interface Changes ==
* AbstractContainerConfig
@@ -65,6 +66,10 @@ is easy, just use the following syntax:
Multibinder.newSetBinder(binder(), Object.class,
Names.named("org.apache.shindig.handlers"))
.addBinding().toInstance(MyHandler.class);
+The long value annotated with the
name "org.apache.shindig.serviceExpirationDurationMinutes" has
+been moved to shindig/common/conf/shindig.properties. Guice 2.0 can
inject Long values from Strings
+automatically.
+
== PHP Changes ==
TBD
Index: java/common/conf/shindig.properties
diff --git a/java/common/conf/shindig.properties
b/java/common/conf/shindig.properties
index
64972e0628e14ad0eef0c4ce350bd7d4392a329c..86b4a223318ec24fcb7f45b1517f5f88d05506c1
100644
--- a/java/common/conf/shindig.properties
+++ b/java/common/conf/shindig.properties
@@ -128,3 +128,6 @@ shindig.api.disallow-unknown-content-types=true
# fashion, ie. by the class itself or tightly controlled code.
shindig.uri.proxy.use-strict-parsing=false
shindig.uri.concat.use-strict-parsing=false
+
+
+org.apache.shindig.serviceExpirationDurationMinutes=60
Index:
java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
diff --git
a/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
b/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
index
eaab74fc29f02616a464ed03add3bb3226b57ff4..195eaa8600b0198f09b4f0253448a4ed1fb26c30
100644
---
a/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
+++
b/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
@@ -75,8 +75,6 @@ public class SocialApiGuiceModule extends AbstractModule {
for (Class handler : getHandlers()) {
handlerBinder.addBinding().toInstance(handler);
}
-
-
bind(Long.class).annotatedWith(Names.named("org.apache.shindig.serviceExpirationDurationMinutes")).toInstance(60L);
}
/**
Re: Move 'org.apache.shindig.serviceExpirationDurationMinutes' to
shindig.properties (issue1196041)
Posted by Paul Lindner <li...@inuus.com>.
Guice can convert constant strings to similarly named primitive and other
types. Also this config value was being set downstream (in
SocialApiGuiceModule) which meant that you couldn't instantiate the gadgets
guice module without errors.
On Thu, May 13, 2010 at 6:51 AM, <li...@inuus.com> wrote:
> Reviewers: shindig.remailer_gmail.com,
>
>
>
> Please review this at http://codereview.appspot.com/1196041/show
>
> Affected files:
> M UPGRADING
> M java/common/conf/shindig.properties
> M
> java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
>
>
> Index: UPGRADING
> diff --git a/UPGRADING b/UPGRADING
> index
> 03734d59dd55f16c2c5cde796ff8f5c33e184b72..40a777f1ddd1226c287a285c33051b7538362338
> 100644
> --- a/UPGRADING
> +++ b/UPGRADING
> @@ -23,6 +23,7 @@ Too many to mention. Check the top-level pom.xml for all
> the new versions
>
> * servlet-api is upgraded to 2.5
>
> +
> == Java Interface Changes ==
>
> * AbstractContainerConfig
> @@ -65,6 +66,10 @@ is easy, just use the following syntax:
> Multibinder.newSetBinder(binder(), Object.class,
> Names.named("org.apache.shindig.handlers"))
> .addBinding().toInstance(MyHandler.class);
>
> +The long value annotated with the name
> "org.apache.shindig.serviceExpirationDurationMinutes" has
> +been moved to shindig/common/conf/shindig.properties. Guice 2.0 can
> inject Long values from Strings
> +automatically.
> +
> == PHP Changes ==
>
> TBD
> Index: java/common/conf/shindig.properties
> diff --git a/java/common/conf/shindig.properties
> b/java/common/conf/shindig.properties
> index
> 64972e0628e14ad0eef0c4ce350bd7d4392a329c..86b4a223318ec24fcb7f45b1517f5f88d05506c1
> 100644
> --- a/java/common/conf/shindig.properties
> +++ b/java/common/conf/shindig.properties
> @@ -128,3 +128,6 @@ shindig.api.disallow-unknown-content-types=true
> # fashion, ie. by the class itself or tightly controlled code.
> shindig.uri.proxy.use-strict-parsing=false
> shindig.uri.concat.use-strict-parsing=false
> +
> +
> +org.apache.shindig.serviceExpirationDurationMinutes=60
> Index:
> java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
> diff --git
> a/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
> b/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
> index
> eaab74fc29f02616a464ed03add3bb3226b57ff4..195eaa8600b0198f09b4f0253448a4ed1fb26c30
> 100644
> ---
> a/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
> +++
> b/java/social-api/src/main/java/org/apache/shindig/social/core/config/SocialApiGuiceModule.java
> @@ -75,8 +75,6 @@ public class SocialApiGuiceModule extends AbstractModule
> {
> for (Class handler : getHandlers()) {
> handlerBinder.addBinding().toInstance(handler);
> }
> -
> -
> bind(Long.class).annotatedWith(Names.named("org.apache.shindig.serviceExpirationDurationMinutes")).toInstance(60L);
> }
>
> /**
>
>
>