[JBoss JIRA] Created: (JBCACHE-1402) Memcached server based on JBoss Cache
by Manik Surtani (JIRA)
Memcached server based on JBoss Cache
-------------------------------------
Key: JBCACHE-1402
URL: https://jira.jboss.org/jira/browse/JBCACHE-1402
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 3.0.0.GA
This is to create a simple server daemon (similar to a TcpCacheServer) that uses memcached's binary and RESTful protocols, which proxy requests to the cache. Simply called CacheServer?
A CacheClient could also be created, which implements Cache and uses the memcached protocol to speak to CacheServer. Consistent hashing could be used to select the server picked, server topology could be piggybacked with responses back to the CacheClient.
This would allow us to:
1. Use CacheClient with memcached backends
2. Use memcached front-ends (Java, Python, Perl, C) to speak to JBoss Cache backends
3. Allow for a heterogenous mix of backends.
In future the TcpCacheServer could simply be replaced with CacheServer and the TcpCacheLoader updated to use the CacheClient.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 9 months
[JBoss JIRA] Created: (JBCACHE-1399) programatic eviction configuration
by Mircea Markus (JIRA)
programatic eviction configuration
----------------------------------
Key: JBCACHE-1399
URL: https://jira.jboss.org/jira/browse/JBCACHE-1399
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.2.0.CR7
Reporter: Mircea Markus
Assignee: Manik Surtani
Fix For: 2.2.0.GA, 3.0.0.GA
if the user specifies an eviction config for a certain region, it is discarded (no warn being logged either) if the config file does not have eviction activated, i.e. it does not specify the eviction configuration statically.
On a second thought, this might be avoided if the user programmaticaly registers default eviction config, at least.
This is unnecessary complexity for the user, though.
On an .xml config file not having specified an eviction attribute, following code should work (also eviction should be enabled):
Region region = admDataCache.getRegion(fqn, true);
ExpirationConfiguration expirationConfiguration = new ExpirationConfiguration();
expirationConfiguration.setTimeToLiveSeconds(2);
region.setEvictionPolicy(expirationConfiguration);
Another issue (not necessarily related to this one, but on the same forum and easy to fix :) ) is that expirationConfiguration.setTimeToLiveSeconds(2); does not work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months
[JBoss JIRA] Created: (JBCACHE-1404) Read locks are not released when isolation level is READ_COMMITED
by Alexey Veklov (JIRA)
Read locks are not released when isolation level is READ_COMMITED
-----------------------------------------------------------------
Key: JBCACHE-1404
URL: https://jira.jboss.org/jira/browse/JBCACHE-1404
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Transactions
Affects Versions: 2.1.1.GA
Reporter: Alexey Veklov
Assignee: Manik Surtani
Read locks are released only on transaction commit/rollback time when isolation level is READ_COMMITED.
Here is TestCase:
import javax.transaction.TransactionManager;
import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.IsolationLevel;
import com.db.fdr.test.TestCase;
public class ReadCommittedLockingTest extends TestCase {
private Cache cache;
private Fqn fqn = Fqn.fromString("/test/fqn");
protected void setUp() throws Exception {
final CacheFactory cf = new DefaultCacheFactory();
final Configuration configuration = new Configuration();
configuration.setCacheMode(Configuration.CacheMode.REPL_SYNC);
configuration.setTransactionManagerLookupClass("org.jboss.cache.transaction.GenericTransactionManagerLookup");
configuration.setIsolationLevel(IsolationLevel.READ_COMMITTED);
cache = cf.createCache(configuration);
cache.create();
cache.start();
}
public void test() throws Exception {
final CacheSPI cacheSPI = (CacheSPI) cache;
final TransactionManager transactionManager = cacheSPI.getTransactionManager();
transactionManager.begin();
cache.put(fqn, "key", "value");
transactionManager.commit();
transactionManager.begin();
cache.get(fqn, "key");
assertEquals(IsolationLevel.READ_COMMITTED, cache.getConfiguration().getIsolationLevel());
final NodeSPI nodeSPI = cacheSPI.peek(fqn, false);
assertFalse("Should not be locked", nodeSPI.getLock().isReadLocked());
transactionManager.commit();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[JBoss JIRA] Created: (JBCACHE-1400) Problem creating service jboss.cache:service=PojoCache
by Deb Lopa (JIRA)
Problem creating service jboss.cache:service=PojoCache
-------------------------------------------------------
Key: JBCACHE-1400
URL: https://jira.jboss.org/jira/browse/JBCACHE-1400
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Cache loaders, JMX
Environment: java 1.5, jboss 4.0.2
Reporter: Deb Lopa
Assignee: Manik Surtani
My application have two xml files replSync-service.xml and pojocache-aop.xml. i kept this two file in root of my ejb jar. The pojocache-service.xml using "org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper" so that jboss automatically register the PojoCache. I have a bean class which use for registration of PojoCache. found this form jboss documentation. I placed all the required jars to jboss/server/default/lib. Then i am creating ear to deployed in jboss. i am facing deployment issue when deploying my EAR.
CODE
---------
public org.jboss.cache.pojo.PojoCache getPojoCache() throws Exception {
MBeanServer server = MBeanServerLocator.locateJBoss();
ObjectName on = new ObjectName("jboss.cache:service=PojoCache");
MBeanInfo mi = server.getMBeanInfo(on);
PojoCache cache = null;
try {
PojoCacheJmxWrapperMBean cacheWrapper =
(PojoCacheJmxWrapperMBean) MBeanServerInvocationHandler.newProxyInstance(server, on,
PojoCacheJmxWrapperMBean.class, false);
cache = cacheWrapper.getPojoCache();
} catch (UndeclaredThrowableException e) {
e.printStackTrace();
}
return cache;
}
and a put method to put the cache.
ERROR - 1
---------------
2008-08-22 17:38:49,706 WARN [org.jboss.system.ServiceController] Problem creating service jboss.cache:service=PojoCache
java.lang.NoClassDefFoundError: org/jboss/util/stream/MarshalledValueInputStream
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.jboss.cache.factories.EmptyConstructorFactory.construct(EmptyConstructorFactory.java:54)
at org.jboss.cache.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:287)
at org.jboss.cache.factories.ComponentRegistry.invokeInjectionMethod(ComponentRegistry.java:248)
ERROR 2
--------------
error in put method of Bean class written by us. Due to company policies i cannot give the error trace.
Due to these above error, PojoCache registration failed.
Whether i am missing any configuration for PojoCache.
we are using "org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper" class for cache. i searched net and some document every where for pojocache "org.jboss.cache.aop.PjoCache" being used.
Please suggest how to configure pojocache for jboss 4.0.2
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months