bump
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130606#4130606
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130606
___
jboss-user mailing list
jboss-user@lists.jboss.org
anonymous wrote : How can I get the all the objects for given Node?
See Node.getData()
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121164#4121164
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121164
Well, if String and the primitives are supported, I think it's enough. If more
complex types are really needed, the application code could serialize them to
strings before constructing a Fqn.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121163#4121163
Repl
anonymous wrote : In your case though, perhaps a good approach may be for both
caches to attempt to write the change, and if one cache fails to write, assume
that this is because the other has completed the write and hence it would not
be necessary?
That seems like a terrible approach, because
Hm, the forum system ate my reply, I'll try to write it again.
In my case, with both locking schemes, both nodes usually fail at the same time
(but not always).
I don't necessarily want a specific type of locks (e.g. distributed),
especially if they're "extremely non-scalable". Indeed, this situa
Hi, I decided to come back to this problem and find a better solution than the
random sleeps and retries.
We tried using optimistic locking, but it doesn't seem to help at all.
Here's a test program, using 2 replicated cache instances and writing to the
same node:
| package CacheRepl;
|
Hi, is there a good way to get the number of children of a node? (in JBC 2.0)
So far I only found getChildrenNames().size() but I don't think it's very
efficient.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112158#4112158
Reply to the post :
http://www.jb
Just custom code. If you want to use JDBCCacheLoader's table structure, then
you can extract the code from JDBCCacheLoader for working with the db, and call
it directly. Otherwise, just write your own. I use iBATIS.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic
You can do that by using no cache loader at all. To preload values, just
manually get them from the DB and put them in the cache.
To persist changes, use a cache listener.
At least that's what I did :)
Adrian
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=410
Hi, I think you're wrong about point 1. I wrote a simple test:
package aditsu;
|
| import java.io.IOException;
| import java.util.HashMap;
| import java.util.Map;
|
| import org.apache.log4j.BasicConfigurator;
| import org.jboss.cache.Cache;
| i
Salut, mersi pt. raspuns :)
(Hi, thanks for your answer)
1. This is good news, I'll look at the JDBCCacheLoader code
For the writes, I already have a custom implementation.
2. This was not answered properly, but from what you say it looks like at least
2.2 is not currently possible.
3. I'm usin
Hi, I previously had a lot of issues with cache loaders, so I decided not to
use them *at all*, in favor of manual preloading, listeners for persisting
changes, and cache replication with memory state transfer.
This has worked pretty well, however we're running into problems when trying to
ensur
Well, the millisecond precision is probably not good enough, and if several
machines are involved then it would require very precise time synchronization.
On the other hand, if the queue is kept in a node, then won't every add/remove
operation lock the whole node (thus the whole queue)?
Adrian
Just do all those things within a transaction. Locks should be acquired
automatically.
Adrian
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104482#4104482
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104482
___
Hi, is it possible to implement a FIFO queue in the cache, so that multiple
threads (or apps) can add and remove elements in order, without conflicting?
As I understand it, each node has a (Concurrent)HashMap of child nodes and a
HashMap of data. HashMap is not particularly known for keeping the
Yes, the initial transfer. Sorry I wasn't very clear.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104210#4104210
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104210
___
j
Hi, I'm using JBC 2.0.0.GA (core)
I set up 2 caches with REPL_SYNC and memory state fetching, and I added a
listener to the 2nd cache before starting it.
It looks like when fetching the memory state, the cache only fires NODE_CREATED
notifications, which contain no data. However, when I put a new
Hi, how well does JBC replication scale?
How many replicated servers are people running successfully? Are there any
issues that appear as the number increases?
I'm mainly concerned about synchronous replication, with multicasting, but I'm
interested to hear about any kinds of setups.
View the or
Well, what's wrong with DummyTransactionManagerLookup anyway? Why is it "not
recommended for production use"?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092823#4092823
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=
Hi, I'm finally coming back to this problem, and I'd like to use a local cache
(B) to keep things simple. So far I found 2 ways to do that:
1. What you said - a TcpCacheLoader in B pointing at C, and (I guess) no
replication for B
2. B and C synchronously replicated in the same cluster, with no i
I'm not sure if this is still relevant now, but here's my opinion anyway:
I generally agree with genman; at the very least, I think the cache should
accept String and Integer elements.
Ideally, it should also support Long, Double, Date and enums.
View the original post :
http://www.jboss.com/ind
Great!
Shouldn't this be a sticky announcement?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073290#4073290
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073290
___
jboss-u
http://labs.jboss.com/jbosscache/docs
Scroll to the bottom for the javadocs
Adrian
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070500#4070500
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070500
___
About distributed TM, I know almost nothing about that, and have no idea where
to start.
With the local cache ("B"), if a node is locked for writing in B, will it be
also locked for writing in C, at the same time?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&
"aditsu" wrote : is ConcurrentHashSet faster
I meant CopyOnWriteArraySet
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069879#4069879
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=postin
Thanks, it runs a tiny little bit faster now :p
It jumped from about 350 to 1500 transactions/s (!)
About the locks, is ConcurrentHashSet faster than a plain synchronized HashSet,
when there are a lot of adds & removes?
View the original post :
http://www.jboss.com/index.html?module=bb&op=v
I noticed that UnversionedNode.getData() is taking a lot of time in my app.
Then I saw that it actually creates a new HashMap, calls getKeys, then gets the
value for each key separately and puts it in the map.
Every single cache.get(fqn, k) separately fires the whole chain of
interceptors... tra
"[EMAIL PROTECTED]" wrote :
| I don't bother protecting/synchronizing the maps [...] as I assume that any
locking happens on a higher level
|
Oh, I see. So it should work with the raw HashMap's then, since the locks take
care of the synchronization.
"[EMAIL PROTECTED]" wrote :
| Perfor
Hm.. I'm not sure how it's related, but it sounds very good.
I updated again from CVS; it seems to work now and doesn't do MapCopy anymore.
The performance is still not really great, but it may not be JBC's fault. I'll
keep profiling.
Thanks for the good work!
View the original post :
http://
Thanks, I updated from CVS and the first thing I found is a NPE:
java.lang.NullPointerException
at
java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:846)
at
java.util.concurrent.ConcurrentHashMap.putAll(ConcurrentHashMap.java:888)
at
org.jboss.cache.Unve
So.. is this problem going to be solved?
Just in case you were waiting, I confirm that I'm using READ_COMMITTED
Adrian
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068442#4068442
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode
Yes I found that this can happen. My solution is to have each side time out
quickly, wait a random (and short) amount of time, and try again.
I don't know if there is a "proper" solution.
Adrian
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068441#4068441
R
"[EMAIL PROTECTED]" wrote : what isolation level are you using?
I think it was READ_COMMITTED (I can't see the code right now)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066378#4066378
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posti
Hm, Notifier.copy now thinks the data is unsafe (it's not a MapCopy instance
anymore) so it makes a new copy. If I prevent that from happening, the
ConcurrentModificationException goes away.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066132#4066132
Reply
"aditsu" wrote : This is not really related to the original message
Hm.. or is it? I've just noticed the MapCopy in the trace
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066123#4066123
Reply to the post :
http://www.jboss.com/
"[EMAIL PROTECTED]" wrote : http://jira.jboss.com/jira/browse/JBCACHE-1148
|
Awesome!
I decided to get JBossCache from CVS and try it. I haven't checked the
performance, but I still got the concurrency problems:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterat
Besides that, I also got a bunch of ConcurrentModificationException's while
doing a multi-threaded benchmark just now:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
at java.util.HashMap$EntryIterator.next(HashMap.java:883)
I was going to post something along the same lines as FredrikJ, so I'm glad to
see this thread.
Could we perhaps have an adapter (abstract listener class) with annotated
callback methods, that we can extend for defining listeners with compile-time
checking?
Also, are the listener callbacks cur
Hi, I've just found a similar problem in CacheImpl: various methods (such as
_put) call getDataDirect() on a node, which again does a MapCopy, and slows
down the code a lot. This is with 2.0.0.CR3. Can you please check?
Thanks
Adrian
View the original post :
http://www.jboss.com/index.html?mod
Thanks for the updates and sorry for messing up the jira issue
"[EMAIL PROTECTED]" wrote :
| This is not entirely correct since even when you first put a node in the
cache, it does need to (try and) load it from the cache loader in case it is
not really a new node but one that was evicted.
Let's say I have a machine running a jboss cache (C) and another one running an
application (A). A conencts to C through some kind of custom API. How can I
make it so that A can call multiple API methods within a single transaction in
C?
E.g. this could be a scenario:
- A starts a transaction
-
It looks like the solution to all my problems is *not* to use a cacheloader at
all. I was preloading all the data anyway (in a custom and optimized way) so I
don't need to load further data, and for storing changes I found that I can use
a simple cache listener (the JBC2 CacheListener does a won
I wrote some code that used JBC 1.4.1.SP3, then later I converted it to use JBC
2.0.0.CR2, and I noticed that at least a part of it is running MUCH slower.
Like, an order of magnitude slower.
That part of the code is putting a lot of data in the cache. I ran it with a
profiler and a debugger, a
I also found that CacheLoaderInterceptor.loadChildren() actually calls
setDataLoaded(false) explicitly on every single child node, ignoring the fact
that data was already in memory.
It looks like JBC is trying every possible way to make sure that I can never
optimize data preloading, and it load
I mean getChildrenNames is declared to return a Set of String.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058997#4058997
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058997
I'm using JBC 2.0.0.CR2; the docs for Fqn say that a Fqn "is a list of names
(typically Strings but can be any Object)". However, in CacheLoader,
getChildrenNames is declared to return a Set. Besides being inconsistent, this
leads to a weird situation where a node's children (with Integer "names
In order to call replaceAll, I need to have a Node first. And when I try to get
a node, the cache calls the cacheloader to load the data. This is exactly what
I want to avoid.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058574#4058574
Reply to the post :
Well, I have the same problem with jboss-cache-2.0.0.CR2: I put a node in the
cache, but when I try to get it later, it tries to load it from the cacheloader
because dataLoaded (in UnversionedNode) is false. How can I solve this?
View the original post :
http://www.jboss.com/index.html?module=b
> Don't use the Node object directly in JBC 1.x.
Ok, I guess I can use getChildrenNames(), but how can I get the data map of a
node?
Anyway, I'm already looking at JBC 2, and I found a lot of nice improvements...
maybe we'll switch to that. I'll adapt my code to it and see how it behaves.
View
> You say this data is "already in memory", how do you know?
Because I first put it myself in the cache. The data map already present in the
cache node (I checked with peek) has all the information I need, plus the
jboss:internal:uninitialized key which I don't need. When the cache finds that
k
Hi, I'm using jboss-cache 1.4.1.SP3; I'd like to understand when and especially
why some nodes are marked as uninitialized.
When the app starts, I insert some data into the cache (using put(Fqn, Map)),
but it looks like the maps get added an extra key
("jboss:internal:uninitialized") which lead
Oops, I ran eclipse from the command line and I can see the full stack trace in
the console now. It's from my code, I'll find a way to fix it.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055879#4055879
Reply to the post :
http://www.jboss.com/index.html?m
Thanks for the reply. I downloaded the version with dependencies, and I'm still
getting NPE with no stack trace. I'd like to clarify that I'm doing "import new
local configuration", and adding some "registered jars" that it may need.
Why is there no stack trace? How can I possibly tell what's the
I installed JBossIDE-JBossCacheIDE-nodeps-2.0.0.Beta2 but I can't seem to do
anything with it. I tried setting up a local cache with my own configuration,
but it failed with an NPE (and NO stack trace), and the remote cache config
seems to require JNDI, but I'm not using anything like that (it's
Hi, I'm using jboss cache 1.4.1.SP3 and implementing a custom cache loader
(that uses a database). How can I tell when a new node is inserted and when an
existing node is updated? Right now the only way I found is to query the
database for the node's record. I need this information in order to d
I'm using Jboss Cache 1.4.1 SP3 (TreeCache). Is there a way to lock a node
explicitly?
I want to have a process that contains the cache, and other processes connect
to it and perform operations. One desired operation would be "get and lock",
and another one would be "update and release".
I saw
Hi, thank you for your reply and for developing this great project.
I see that the "TreeCache" name is being deprecated in favor of "JBoss Cache".
I'm happy to hear that all those features are supported, however I was hoping
for a bit more guidance. I had already read the user guide, but it's not
Hi, I'm looking for a caching solution that can do these things:
- it should work in a cluster, with a single database used for persistent
storage
- initially, the caches will preload a specific set of data (different for each
cache)
- whenever an object is requested from a cache, if it is not al
58 matches
Mail list logo