[JBoss Cache: Core Edition] - Re: putForExternalRead doesn't solve our problem
by manik.surtani@jboss.com
"jshowalter" wrote :
| We realize this is by design and documented as such, but the design puzzles us. The put should succeed if the node is there but the key for the data being put is missing, and should succeed if the node and key are there but the value in the node for that key is null.
|
The cache was designed to use a Node as a unit of atomicity and as such all loads, stores, locks, evicts, etc are all based on a node and not the contents of a node. Nodes should only contain "related" data such that the above operations can happen on the node as a whole.
"jshowalter" wrote :
| Is our problem due to storing multiple items per node by key? If so, we could change to storing each item in a separate node. That seemed expensive (a lot of maps), but maybe that's how this is supposed to work?
|
Yes. This is the way Hibernate does it, storing a single entity per Node (and using a dummy static "key"). Regarding the cost of this, this was addressed in JBCACHE-1082 which optimises nodes for single elements (using an internal SingletonMap where possible), so you need not worry about the performance impact too much.
"jshowalter" wrote :
| If so, we have a followup question--currently when we invalidate data locally (to force a cache miss and cache fill on the next access to that data), we just clear the data in a node, but leave the node in place. Are we supposed to invalidate by deleting the node itself? If so, how does *that* work when multiple threads are trying to access the same node? Won't readers back up behind a write lock, thereby re-introducing the very problem we were trying to solve with PFER in the first place? (Puts due to cache misses on reads timing out because of contention for write locks.)
Yes, you should remove the node. Regarding locks, there is a cache option - lockParentForInsertRemove - which is off by default. With this option being switched off, you don't have the problem of WL contention but you do introduce the possibility of phantom reads (but this is allowed in R_R semantics anyway).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220857#4220857
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220857
17 years
[Beginners Corner] - Re: Jboss 5.0.1-GA Startup problem - Is there a way to solve
by patricklee
oh, thanks jaikiran for the Run All info.
Ya, I know all those Debug / Exception may not affect the AS to run as normal, just that I wonder is there a way to run it in a pretty clean way.
Or is it every one out there running the Jboss 5.x version and having those annoying no harm "problem" and tends to ignore it?
I want something like what jaikiran suggest, run the "all" server config, to have the Corba enabled (so no more "CorbaORB is not registered Exception").
It it quite obvious that an existing record with the same constraint is exist, just that I dont know where to fix it. (That's why for e.g. I need some solution to avoid the attempt to INSERT a duplicate record, perhaps change of sql query or Java code to make a check before Insert)
| 2009-03-25 16:20:20,608 DEBUG [org.jboss.jms.server.plugin.JDBCJMSUserManager] (main) Failed to exec
| ute INSERT INTO JBM_ROLE (ROLE_ID, USER_ID) VALUES ('subscriber','john')
| java.sql.SQLException: Violation of unique constraint SYS_PK_49: duplicate value(s) for column(s) $$
|
| at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
| at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
| at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
| at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:249)
| at org.jboss.jms.server.plugin.JDBCJMSUserManager.insertUserRoleData(JDBCJMSUserManager.java:198)
| at org.jboss.jms.server.plugin.JDBCJMSUserManager.start(JDBCJMSUserManager.java:100)
| at org.jboss.jms.server.plugin.JDBCJMSUserManagerService.startService(JDBCJMSUserManagerService.jav
| a:78)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220848#4220848
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220848
17 years
[EJB 3.0] - Re: Can't get @Service to work
by chtimi2
Well you're right it would certainly be better not to waste resources moving around messages that will never be used, if i had a way to deactivate the MDB/unplug it from the topic. Is it possible?
My use case is a bit special because the destination this MDB used to listen to was a queue, which was fine since the message had to be consumed on only one node of the cluster.
But meanwhile it has appeared that a queue won't do since some new unit test MDPs also listen to this destination. Of course if it's a queue the message can only be consumed once so the test isn't notified and fails. But if it's a standard topic, the MDB will use it on all nodes which isn't right either.
So my idea was to use a topic and activate/deactivate the MDB.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220846#4220846
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220846
17 years