I was expecting a reply :(
Anyway.. I found this link http://mastertheboss.com/jboss-application-server/432-develop-a-clustered-application-with-infinispan-data-grid.html?start=1 and now trying to implement the same (using injection). But I am getting this error at the end (with out any stack trace). I am using jboss 7.0.2 bunddled with liferay 6.1 EE.
ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "Operation handler failed to complete"}}
Here is my cache container placed under <Subsystem> of standalone.xml
<cache-container name="cluster" default-cache="dist">
<alias>cluster </alias>
<transport lock-timeout="60000"/>
<distributed-cache owners="3" mode="ASYNC" name="dist" batching="true">
<file-store/>
</distributed-cache>
</cache-container>
I have a Oracle datasource
<datasource jndi-name="java:jboss/datasources/LiferayPool_test" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:oracle:thin:@<myaddress>:XE
</connection-url>
<driver>
oracle
</driver>
<transaction-isolation>
TRANSACTION_READ_COMMITTED
</transaction-isolation>
<pool>
<prefill>
true
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
username
</user-name>
<password>
password
</password>
</security>
</datasource>
This is how I am invoking the cache
@Resource(lookup="java:jboss/infinispan/container/cluster")
private CacheContainer container;
Secondaly, I also tried without using injection, as expalined in comments of this link ( https://docs.jboss.org/author/display/ISPN/Getting+Started+Guide+-+JBoss+AS+7 ), like this
InitialContext ic = new InitialContext();
CacheContainer cc = (CacheContainer) ic.lookup("java:jboss/infinispan/container/cluster");
Cache<String, Object> cache = cc.getCache();
But in this case I got this error:
ERROR [stderr] (MSC service thread 1-4) java.lang.IllegalStateException
ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47)
ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.naming.service.BinderService.getValue(BinderService.java:116)
ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.naming.service.BinderService.getValue(BinderService.java:43)
ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1216)
Could experts please guide what I am doing wrong. I am new to liferay and jboss 7. Thanks for the help !