As part of getting up to speed with infinispan, I've been running through the docs and
tutorials. Some thoughts
1)
http://www.jboss.org/infinispan/downloads.html
One thing that is always annoying is having to configure the jboss repo. I suggest adding
this snippet to the above page for people to copy, which can be pasted into either the
pom, or into settings.xml, and is self contained.
<profiles>
<profile>
<id>jboss-public-repository</id>
<activation>
<property>
<name>jboss-public-repository</name>
<value>!false</value>
</property>
</activation>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<
url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<
url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
2)
http://www.jboss.org/infinispan/downloads.html
Suggest adding two code snippet for the dependency too:
a)
<properties>
<infinispan.version>X.Y.Z.Q</infinispan.version>
</properties>
b)
<dependencies>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<version>${infinispan.version}</version>
</dependency>
</dependencies>
3)
http://community.jboss.org/wiki/5minutetutorialonInfinispan
Cache cache = manager.getCache();
I get a warning with this line in Eclipse, as Cache should be a parameterized type.
Doesn't break stuff, but doesn't look good that we advise people to write
incorrect code.
4)
http://community.jboss.org/wiki/5minutetutorialonInfinispan
To make this totally fool proof, might want to indicate how people can run this, e.g. in a
main method on a class. This also really highlights how "lightweight" this stuff
is (no need for a big server etc.)
5)
http://community.jboss.org/wiki/5minutetutorialonInfinispan
For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and
also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion
failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.
6)
http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
This information is really useful, and I would suggest splitting out the groovy bit and
then adding a link from the 5 min tutoiral
7)
http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
Some of the instructions on this page could be clearer if they all built as code blocks.
For example, following the groovy ones, I struggled reading the first paragraph, it would
have been helpful to split this up and provide code snippets to use like:
$> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/
etc.
8)
http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
The location of infinispan-core jars and dependencies has changed from
$INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating
9)
http://community.jboss.org/wiki/Infinispaninteractivetutorial
When doing the below line, I get an error:
And now, create a cache manager indicating the file with the cache definitions.
groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
)
===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
null
oovy:000> manager = new
DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
ERROR java.io.IOException:
null
at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration
(InfinispanConfiguration.java:264)
at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration
(InfinispanConfiguration.java:282)
at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration
(InfinispanConfiguration.java:136)
at org.infinispan.manager.DefaultCacheManager.<init>
(DefaultCacheManager.java:243)
at org.infinispan.manager.DefaultCacheManager.<init>
(DefaultCacheManager.java:229)
at groovysh_evaluate.run (groovysh_evaluate:4)
and I don't know how to get past it, so I stopped this tutorial here.
10)
http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
Could do with some comments explaining what each line is doing, some of the code isn't
self describing
e.g.
what does me entering val defaultCache = manager.getCache[String, String]() actually
achieve?
11)
http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
It might be neat to split up input and output e.g. into different snippets - make it
easier to read
12)
http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
For "Cache with Transaction Management" I was not seeing TX semantics being
obeyed, I saw the size increment as a added key-value pairs
13)
http://community.jboss.org/wiki/SettingupanInfinispanCluster
When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import
JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial
should saw which to import.
14)
http://community.jboss.org/wiki/SettingupanInfinispanCluster
The CacheManager is deprecated, I guess these needs updating to 4.2 API?
15)
http://community.jboss.org/wiki/SettingupanInfinispanCluster
I would suggest adding some instructions about how to do a simple test to see the cluster
working, atm the tutorial seems to end in middle of something. There are hints in the
comment, but nothing concrete