问题标签 [jboss-cache]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
763 浏览

hibernate - 如何验证集群中 Hibernate 二级缓存的正确操作?

我想知道如何验证 Hibernate 的 L2 缓存是否正确执行。我有一个应用程序在带有 JBoss Cache 的 JBoss 5 实例集群上运行。负载测试将回答性能问题。

但是如何确保与集群相关的问题(如节点之间的缓存失效)正常工作呢?

0 投票
4 回答
6685 浏览

hibernate - JBossCache 作为 JBoss 5 中 Hibernate 的二级缓存

这是我的配置:Hibernate 3.3.1.GA、JBoss 5.1.0.GA、JBoss Cache 3.2.0.GA。

我正在按照此处所述进行休眠配置: http ://www.jboss.org/community/wiki/ClusteredJPAHibernateSecondLevelCachinginJBossAS5

但收到指定属性无效的错误:

所以,我不能使用“cache.region.factory_class”属性,而只能使用“cacheRegionFactoryClass”(在异常中显示)。

我不能使用任何其他属性,如 cache.region.*,因此无法为我的休眠配置二级缓存。

谁能给我一个链接如何使用 JBoss 5.1 配置 JBoss Cache 3.2?我对 JndiSharedJBossCacheRegionFactory 和 JndiMultiplexedJBossCacheRegionFactory 特别感兴趣。

0 投票
2 回答
3560 浏览

java - 帮助 2 个实体管理器配置 TreeCache(Jboss Cache)

我现在遇到了大麻烦。我需要为我的 seam 应用程序配置一个集群缓存,但我遇到了问题,因为我有 2 个实体管理器,一个用于 oracle,另一个用于 mysql。

如果我删除 mysql 持久性单元和实体管理器,一切正常,但是当它处于活动状态时,会显示以下错误:

org.hibernate.HibernateException:无法实例化缓存实现二级缓存未启用使用[hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]

如果只是为 oracle 配置了二级缓存,我不明白为什么我在使用 mysql 时遇到问题。

我的 components.xml:

我的persistance.xml:

我的 Treecache.xml:

我的完整堆栈:

0 投票
1 回答
347 浏览

java - 访问部署在远程 JBoss AS (4.2.2) 上的 JBoss Cache

我已将 JBoss cahce 服务部署到我的 JBoss AS,它在一个完全独立的 VM 中远程运行。我现在正在努力访问部署到 AS 的缓存。有人有什么建议吗?

提前致谢

0 投票
2 回答
1581 浏览

java - 如何避免 JBoss-Cache 区域被驱逐?

我正在尝试为仅在短时间内相关的数据创建一个 jboss-cache。在那之后,应该丢弃数据并释放相应的内存。

缓存是这样组织的:

我的驱逐策略配置如下所示:

这很有效:当/my_region得到超过 100 个孩子时,最近使用最少的孩子被驱逐,这样该区域就会缩小到 100 个孩子。

的问题LRUPolicy在于,当被驱逐的节点有子节点时,它们并没有被完全删除,而是用jboss:internal:uninitialized: null标记。这种行为对于被缓存以避免从持久存储中获取它们的实体是有意义的,但它不适合缓存未持久且永远不会再次访问的实体。

所以,为了删除节点,我创建了一个扩展,LRUPolicy用 remove 覆盖了 evict。

此新策略不会留下joss:internal:uninitialized: null',但会在到达/my_region时删除节点maxNodes。当我放回LRUPolicy后面时,我注意到区域节点本身实际上被驱逐并获得了unitialized标签,但最近使用的 100 个子节点仍然存在。

如何防止该区域本身被驱逐?有没有更好的方法来进行移除而不是驱逐而不将驱逐与过期分开?

我正在使用 jboss-cache 版本 1.3.0.SP4。

0 投票
4 回答
1358 浏览

java - Java distributed objects with locality?

I am evaluating various Java object distribution libraries (Terracotta, JCS, JBoss, Hazelcast ...) for an application server and I'm having trouble understanding their behavior on various axes.

My requirements for distributed objects are not many -- they boil down to one-to-one and one-to-many messaging. There's more, but for the rest we just use JDBC and I assume I can plop a cache in front of this using any of the available libraries.

I would like a system that distributes objects and exhibits locality properties -- in other words, a server that grabs an object tends to hold onto it without excess communication to other nodes. Hazelcast looks simple (and peer-to-peer is nice) but seems to require objects are distributed evenly across all nodes.

I'd like a way to persist objects, preferably transparently. I plan on using EC2, so I have the option of temporary, free, limited local storage (the disk) and permanent, non-free, unlimited storage (S3). It'd be great not to worry about OutOfMemoryErrors.

I like the simplicity and "magic" of Terracotta but it scares the beejeezus out of me. Also in order to truly scale you have to spend $$$$, otherwise you're communicating with a single hub.

I'm cheap and I want something not only free but mature and with a large userbase.

Thanks for any input.

0 投票
2 回答
507 浏览

java - Jboss Cache 作为分布式状态存储库

使用 JBoss Cache 作为分布式状态存储库是个好主意吗?

当您需要保证每次从存储库中读取某些内容时,您可以获得最新版本的内容时,是否可以应用 JBoss Cache?- 无论我们考虑集群中的哪个节点?

0 投票
1 回答
2562 浏览

exception - “编组参数失败” org.jboss.cache.CacheException 是什么意思?

我得到以下异常:

org.jboss.cache.CacheException:java.lang.RuntimeException:编组参数失败

我们为我们的 Web 应用程序使用分布式 JBoss 缓存(在 Tomcat 上)

我有一种强烈的感觉,这是由于配置不好,但不确定。

编辑(更正): 我们使用版本3.0.0.GA的 Jboss 缓存(核心)

0 投票
1 回答
627 浏览

tomcat - JBossCacheService: 将缓存模式更改为 REPL_SYNC 后发生缓存放置错误

我们在 JBoss 4.2 上设置了一个水平集群。会话复制工作正常,直到我们将缓存模式从 REPL_ASYNC 更改为 REPL_SYNC 以解决问题。我们开始看到一些会话故障转移的警告:

如果我们仍想使用 REPL_SYNC,有谁知道为什么会发生这种情况以及如何解决它?任何帮助表示赞赏。谢谢!

0 投票
1 回答
1331 浏览

java - 配置 JBOss 缓存以在 JBoss 服务器 4.2.3.GA 上运行

我们的商业应用程序曾经运行在不同的应用服务器上,后来我们开始调整它以运行在 JBoss 服务器上。问题是该应用程序运行 JBoss 缓存,并且作为与此框架集成的一部分,web-inf\lib 包含以下 jar:
jboss-aop.jar、jbosscache-core.jar、jboss-common.jar、jboss- common-core.jar, jboss-j2ee.jar, jboss-jmx.jar, jboss-logging-spi.jar 这会导致通过应用程序使用 JNDI 出现问题,因为 jboss-common-core.jar 包含导致 JBoss 的命名包JNDI 工作不正确。所以我需要找到一种方法来组织我的 jar,一方面 jboss 缓存将继续工作,另一方面不干扰 JNDI 的工作

也许它包括将部分或所有这些 jar 从 web-inf\lib 移动到 /server/default/lib 寻找熟悉这个主题的人

(此线程的继续: https ://stackoverflow.com/questions/2847375/problem-configure-jboss-to-work-with-jndi3 )