How would I pass in my new context module?

I've gotten as far as extending S3BlobStoreContextModule,
overriding bucketAcls() to specify a longer expiration, but then what? Do I
just pass in an instance of my context module to ContextBuilder#modules()?

When I tried that, I got this exception:

Caused by: com.google.inject.CreationException: Guice creation errors:

1) A binding to com.google.common.cache.LoadingCache<java.lang.String,
org.jclouds.s3.domain.AccessControlList> was already configured at
opower.transfer.objectstorage.AbstractJcloudsObjectStorageResourceAccessor$LongLivedS3BlobStoreContextModule.bucketAcls().
  at
org.jclouds.s3.blobstore.config.S3BlobStoreContextModule.bucketAcls(S3BlobStoreContextModule.java:73)




*Steve Kingsland*

Senior Software Engineer

* Opower * <http://www.opower.com/>


*We’re hiring! See jobs here <http://www.opower.com/careers> *


On Thu, Aug 14, 2014 at 2:53 PM, Andrew Phillips <[email protected]> wrote:

>  It's currently set to 30 seconds, and I might want to increase this value.
>> It looks like it's hard-code, but I'm not familiar enough with jlcouds
>>
>
> Hmpf. Yes, that's pretty nicely hard-coded. The only immediate way I can
> think of overwriting that is creating your own ContextModule extending from
> the S3 one, overriding that method and then creating a context using your
> module.
>
> You're effectively on the road to creating a custom provider at that
> point, which sounds like a bit of overkill.
>
> I would be interested to hear *why* the value is hard-coded to 30. If
> there seems to be no good reason not to make it configurable, we could
> probably open an issue to try to get that addressed.
>
> ap
>

Reply via email to