-
1. Re: Configuring Modeshape 3 to use Infinispan + Amazon S3
rhauch Jul 26, 2012 4:16 PM (in response to mabruno)- Is it possible to configure everything inside standalone-modeshape.xml?
Yes, that is exactly where you configure the ModeShape repositories and Infinispan caches. The "standalone-modeshape.xml" file is one example of a configuration file for the standalone mode of AS7. You can have several, and even create your own configuration files and specify them when you start AS7.
As for the Infinispan / S3 configuration, I don't have anything handy. But check out the XSDs in the "docs/schema" directory of your AS7 installation; there should be one for each subsystem, including 3 versions of the Infinispan subsystem (use the latest version). It basically should entail defining "store" element (rather than a "file-store") with the various properties for the S3 cache loader.
Hope that helps!
-
2. Re: Configuring Modeshape 3 to use Infinispan + Amazon S3
wsze Aug 5, 2012 8:19 AM (in response to rhauch)Can you tell me which cache loader to use for S3? I thought org.infinispan.loaders.cloud.CloudCacheStore would be the correct one since it implemented org.infinispan.loaders.CacheLoader, but I'm getting the following on starting up jboss using standalone-modeshape.xml error:
Pool -- 32) JBAS014612: Operation ("add") failed - address: ([
("subsystem" => "infinispan"),
("cache-container" => "modeshape"),
("local-cache" => "xxx")
]): java.lang.IllegalArgumentException: org.infinispan.loaders.cloud.CloudCacheStore is not a valid cache store
at org.jboss.as.clustering.infinispan.subsystem.CacheAdd.buildCacheStore(CacheAdd.java:545)
at org.jboss.as.clustering.infinispan.subsystem.CacheAdd.processModelNode(CacheAdd.java:426)
at org.jboss.as.clustering.infinispan.subsystem.CacheAdd.performRuntime(CacheAdd.java:165)
at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:50) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
-
3. Re: Configuring Modeshape 3 to use Infinispan + Amazon S3
rhauch Aug 6, 2012 10:07 AM (in response to wsze)The CloudCacheStore is indeed the one to use, but it's hard to tell what went wrong without a listing of the Infinispan and ModeShape sections of the XML file. Can you post them?
-
4. Re: Configuring Modeshape 3 to use Infinispan + Amazon S3
wsze Aug 13, 2012 5:12 PM (in response to rhauch)Sorry for the delay. I added my configuration to the standalone-modeshape.xml from modeshape-3.0.0.Beta2-jbossas-7-dist:
<server xmlns="urn:jboss:domain:1.2">
<extensions>
:
</extensions>
<management>
:
</management>
<profile>
:
<subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
:
<local-cache name="xxx">
<store class="org.infinispan.loaders.cloud.CloudCacheStore" preload="true" purge="false">
<property name="identity">{s3_accessKeyId}</property>
<property name="password">{s3_secretAccessKey}</property>
<property name="bucketPrefix">{s3_bucket}</property>
<property name="requestTimeout">20000</property>
<property name="cloudService">s3</property>
<property name="secure">true</property>
<property name="compress">true</property>
</store>
</local-cache>
</profile>
<interfaces>
:
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
:
</socket-binding-group>
</server>
Thanks
-
5. Re: Configuring Modeshape 3 to use Infinispan + Amazon S3
hchiorean Aug 13, 2012 4:09 AM (in response to wsze)Looking at what's packaged inside of AS 7.1.1, it seems to me that it doesn't come with the CloudCacheStore support at all (as far as the contents of the ISPN modules go).
There is this issue https://issues.jboss.org/browse/AS7-1827 with the resolution "Deffered" and a fix version of 7.1.0.CR1 - not sure what this means
-
6. Re: Configuring Modeshape 3 to use Infinispan + Amazon S3
wsze Aug 13, 2012 5:16 PM (in response to hchiorean)Thanks for the info. I tried adding the missing jar by:
1. Adding "<module name="org.infinispan.cachestore.cloud"/>" to /modules/org/jboss/as/clustering/infinispan/main/module.xml inside "<dependencies>"
2. Copied infinispan-cachestore-cloud-5.1.5.CR1.jar to /modules/org/infinispan/cachestore/cloud/main
So on starting AS7, I can see this is now being loaded in the boot.log:
16:51:25,956 DEBUG [org.jboss.modules] Module org.infinispan.cachestore.cloud:main defined by local module loader @1f78040 (roots: /Users/{user}/jboss-as-7.1.1.Final/modules)
But I'm getting the same error. I'm not sure if I did this correctly. It was just a shot in the dark.
One strange thing I found was if I changed the class to something that didn't exist (example: org.infinispan.loaders.cloud.CloudCacheStoreXXX) I still get the same error. I assumed it should return a Class Not Found Exception.
Any help would be greatly appreciated.
Thanks
-
7. Re: Configuring Modeshape 3 to use Infinispan + Amazon S3
hchiorean Aug 14, 2012 3:04 AM (in response to wsze)I think the first step is making sure ISPN cloud configuration is correctly set-up in AS 7.1.1. Maybe a question (with what you just described previously) here https://community.jboss.org/en/jbossas7/dev would help.