[JBoss-dev] [JBossCache] - Re: TreeCache does not set the AUTO_RECONNECT property on th

2004-12-09 Thread norbert
you can pass all Properties to configure the JChannel via TreeCache.setClusterProperties(String). This is exactly the String that is passed to the Constructor of JChannel and allows to set whatever attributes you like for any protocoll on the JGroups stack you define. See JGroups-documentation

[JBoss-dev] [JBossCache] - Re: Use of getChildrenNames

2004-11-30 Thread norbert
Bela wrote: anonymous wrote : Set children=new TreeSet(result), no need for a clone(). this must happen within the same transaction as getChildrennames(). If not using transactional locking there's still a chance that the Constructor of TreeSet will throw ConncurrentModificationException too. (I

[JBoss-dev] [JBossCache] - Re: Use of getChildrenNames

2004-11-29 Thread norbert
I just tracked this in the code - there seems to be no bug in this area. Threadsafe access to the keyset is garanteed by a ReadLock on the Node. The Concurrentmodificationexception should only be thrown, if 'getChildrenNames()' and the iteration over the keySet are not done within the same tran

[JBoss-dev] [JBossCache] - Re: Use of getChildrenNames

2004-11-29 Thread norbert
You are absolutely right - I did not read your posting carefully enaugh. Node's 'getChildren()' is known to be not threadsafe, while TreeCache's 'getChildrenNames(Fqn)' is intendet to be used by clients. The ConcurrentModificationException is a bug. I'll fix this in cvs-head later today, so it

[JBoss-dev] [JBossCache] - Re: JBossCache Bug in get(someNode, key)?

2004-11-28 Thread norbert
jiwils wrote: anonymous wrote : Since I am not using transactions... I guess you should use transactions. Without transactions the TransactionIsolationLevel is not imposed, there's no Node locking and as a result the content of a Node might just be modified in the moment you are calling 'get()'

[JBoss-dev] [JBossCache] - Re: Use of getChildrenNames

2004-11-28 Thread norbert
Although the methods of 'Node' are declared as public, this class is (currently) not intendet to be used directly by TreeCache-clients. The only way to access TreeCache in a threadsafe manner is through TreeCache's methods (put(), get() etc...) The methods of Node are not threadsafe. Whenever

[JBoss-dev] [JBossCache] - Re: JBossCache Bug in get(someNode, key)?

2004-11-25 Thread norbert
Try this with synchronous replication to see whether there are any 'CacheException' when 'put' ist called right before retriving 'null'. (Asynchronous Replication will catch these Exceptions internally since they do not occur synchronous to the corresponding method-call). View the original pos

[JBoss-dev] [JBossCache] - Re: Possible newbie question but still a problem

2004-11-23 Thread norbert
So what? - Having 500k Nodes in a flat hirachy implies having 500k Entries in the Root nodes 'children' HashMap. Not a big deal in terms of node-hirarchy. Given you specify a reasonable evictiontimeout, you would not even have to store 70% of 500k entries, but only the percentage that is actuall

[JBoss-dev] [JBossCache] - Re: Possible newbie question but still a problem

2004-11-23 Thread norbert
It's absolutely unefficient to store a whole table in a single node - Transactional locking, eviction and Cacheloading work on Node-level, not key/value-pair level. As a result every 'put(Fqn,key,value)' would lock your entire data if the Fqn being used is a constant. You are better of if you m

[JBoss-dev] [JBossCache] - Re: Possible newbie question but still a problem

2004-11-23 Thread norbert
You are right, as of JBossCache 1.1 get(Fqn,Key) is actually only being called by the JUnit-testcases. In respect to TreeCache itself it's (yet) redundant. Instead of returning null your CacheLoader should return a prefilled Map of Key-Value-pairs when get(Fqn) is being called Have a look into

[JBoss-dev] [JBossCache] - Re: TreeCacheListener

2004-11-23 Thread norbert
The callbacks of TreeCacheListener run synchronous with the underlying method that causes the event. Locks generated by this underlying call are still held while the callback-method is being executed. e.g. there's a put(...) being executed. During the execution of the put a Node is being creat

[JBoss-dev] [JBossCache] - Re: multiple treecaches - TransactionManagers

2004-11-23 Thread norbert
There's an Interface TransactionManagerLookup that you may implement. Your TransactionManagerLookup-class simply returns the TransactionManager of your choice. Than you let TreeCache use this transactionmanagerlookup-class to make use of the assigned transactionmanager by either passing an inst

[JBoss-dev] [JBossCache] - Re: lock.TimeoutException crash the replicate-sync cluster

2004-11-15 Thread norbert
The Exception you get ist expected behavior of synchronous replication. With synchronous replication the caller will be notified of all communication-errors that occour during replication. This is intendet behaviour, your calling thread is notified so it can apply arbitrary actions. TimeOutExce

[JBoss-dev] [JBossCache] - Re: SERIALIZABLE Bug? Read of null, put, another thread rea

2004-11-11 Thread norbert
You are right, that is how it's currently implemented. The read operation will not create nodes not existing when there's no Cacheloader defined. Thus without any previous 'put' there's not even the root-node to lock. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtop

[JBoss-dev] [JBossCache] - Re: SERIALIZABLE Bug? Read of null, put, another thread rea

2004-11-11 Thread norbert
actually isolationlevel SERIALIZABLE should result in what you expect to happen since it makes use of EDU.oswego.cs.dl.util.concurrent.FIFOSemaphore wrapped into an Identitylock as implementation of Sync. Thus read-locks are treated the same as write-locks and will block until the end of Transac

[JBoss-dev] [JBossCache] - Re: JBossCache inside EJB

2004-11-07 Thread norbert
If you use JBossCache as MBean-Service and put Objects into it that have been loaded by the EJB-classloader from the ejb-jar, than you'l get a ClassNotFoundException as soon you try to access the previously stored objects after redeployment of your ejb-jar. This is because classes being loaded b

[JBoss-dev] [JBossCache] - Re: Who can tell me how to use jboss cache to store records

2004-10-25 Thread norbert
You are free in your decision how to map your 'keys' to the tree-structure that TreeCache provides. You may also decide not to use the Tree-structure and store all Records as Key-value-pairs in a single Node. Keep in mind that locking is taking place on node-level. And the kind of lock being us

[JBoss-dev] [JBossCache] - Re: How to configure JBossCache to commnicate between two no

2004-10-18 Thread norbert
given multicast is working on the machnice sample xml-files replSyncService.xml or replAsyncService.xml will work out-of-the box without modification. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3851782#3851782 Reply to the post : http://www.jboss.org/inde

[JBoss-dev] [JBossCache] - Re: How to configure JBossCache to commnicate between two no

2004-10-18 Thread norbert
mcast_addr has to be the same on both machines. Additionally the NIC has to setup that multicast works (the route to 224.0.0.0 netmask 240.0.0.0 has to be bound to the NIC and not the local loopback only so the ip-packages actually leave the machine). Just search Google for 'multicast ip' to get

[JBoss-dev] [JBossCache] - Re: RegionManager.checkConflict() may need to add /

2004-10-06 Thread norbert
Ben, I'm using generic Objects in Fqn's in the DistributedState-Implementation I'm currently working on. If I stay on this path this will not just be rarely used case I know it's not easy implement configuration for eviction-policies that support this or cache-loaders, but I'm shure we can s

[JBoss-dev] [JBossCache] - Re: Building JBossCache from source

2004-10-05 Thread norbert
u may want to check this out: http://www.jboss.org/developers/guides/quickstart View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3850439#3850439 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3850439

[JBoss-dev] [JBossCache] - Re: RegionManager.checkConflict() may need to add /

2004-10-05 Thread norbert
it would be better design if Region.getFqn() returns an Fqn not a String so we could use Fqn.isChildOf(Fqn) instead of String.startsWith() BtW: Fqn are not just concatenated Strings - In the longrun we have to find a way to configure Regions for eviction based on reall (Object-based) Fqn's.

[JBoss-dev] [JBossCache] - Re: A Not Seen Use Case

2004-10-05 Thread norbert
If you are _not_ deploying the cache as MBean but instantiate it from your own code (using the constructor and PropertyConfigurator) each instance will connect to the same Group sharing the same data, but will not be the same cache instance. (As a consequence the data would reside in memory mult

[JBoss-dev] [JBossCache] - Re: How to verify cluster traffic

2004-10-02 Thread norbert
...so it's RTFFAQ instead of RTFM :-) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3850159#3850159 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3850159 --- This S

[JBoss-dev] [JBossCache] - Re: How to verify cluster traffic

2004-10-01 Thread norbert
Write an instance of org.jboss.cache.TreeCacheListener that logs what you want View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3850137#3850137 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3850137 --

[JBoss-dev] [JBossCache] - Re: JBoss Distribute Cache's error?

2004-10-01 Thread norbert
I've seen in you other post, you use TreeCache from within hibernate, so as long the bug in TreeCache is not fixed, you propably will not be able to use my workaround :-( (that is: set FetchStateOnStartup to 'false' and call 'fetchState()' after 'start()') maybe you change these few lines in hib

[JBoss-dev] [JBossCache] - Re: How to verify cluster traffic

2004-10-01 Thread norbert
hmm in former times people just wouldt have posted a single word: RTFM But to be fair - besides the code, there is not very much good documentation about TreeCache out there. (So why don't read the code?) ok: eviction is supposed to happen locally. It's the mechanism being used to keep the size

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: JBossCache/Clustering - open tasks

2004-09-28 Thread norbert
I just sent you a first Draft of DistributedState based on TreeCache by email. Have fun :-) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849811#3849811 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849811

[JBoss-dev] [Clusters on JBoss (Clusters/JBoss)] - Re: Subpartition in jboss clustering

2004-09-23 Thread norbert
I'm allready working on this topic - Given it going to be incorporated in JBoss, it should be there before the end of this year. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849223#3849223 Reply to the post : http://www.jboss.org/index.html?module=bb&op=po

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fast iterations on large numbers of cache objects

2004-09-21 Thread norbert
If not being evicted, all your objects will reside in memory. What takes the time is the way you gonna access them. Looking up a thousand Names first and then looking up a thousand Objects by name is pretty much the slowest way at all to do this. This is like a paperboy that just delivers one p

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: JBoss Distribute Cache's error?

2004-09-20 Thread norbert
the NPE is due to regionManager being null in LRUPolicy.nodeAdded(Fqn): | public void nodeAdded(Fqn fqn) | { | if(fqn.equals(ROOT)) | return; | if(log_.isDebugEnabled()) | log_.debug("nodeAdded(): fqn- " + fqn); | Region region

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fqn

2004-09-17 Thread norbert
I did some brainstorming about this. I'm not satisfied with the design of Fqn as it is. While components of the Fqn may be Object, if one wants to be a List be the component of an Fqn he would have to cast the List to Object to call the intendet constructor (which is not at all intuitive): Fqn

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fqn

2004-09-16 Thread norbert
Although I'm not using FQNs with elements other than String right now I think reducing this to String-only makes the concept of FQN significantly less powerfull. Constrains for keys in FQNs should be more or less equivalent to keys in Maps (e.g. must implement 'equals()') I'd rather see that sp

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: ConcurrentModificationException in log.debug() statement

2004-09-14 Thread norbert
I'd suggest to make use of the oswego concurrent library instead of using simple synchronisation. e.g. use EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap instead of HashMap this will both: - enshure we use the 'best-of-breed' solution for concurrent access - be as close as possib

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: ConcurrentModificationException in log.debug() statement

2004-09-10 Thread norbert
my company (10 empl., several hundred instances of J2EE-application-servers) is planning to use JBoss application-server in production starting 2005. I'll be technically responsible for this. >From an enterprise customers standpoint anything that is known to fail 'every now and >then' is not

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: exception design

2004-09-10 Thread norbert
I know about this - It's a decision whether to stay downwards compatible or change an API for reasons of better design that helps to stay downwards-compatible later... Any way - if we keep it this way (and there are good reasons for this) we must put in the release-notes that this change might b

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: ConcurrentModificationException in log.debug() statement

2004-09-10 Thread norbert
bela: the price is that a business-transaction might fail just because loglevel is set to 'INFO' I don't think this is a real good idea. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847821#3847821 Reply to the post : http://www.jboss.org/index.html?m

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: exception design

2004-09-09 Thread norbert
I agree. It's a good idea to make LockingException und TimeoutException subclasses of a CachingException, but it would be better if the method's signatures explicitly list the exceptions that actually may be thrown. The caller would still be free to just use a 'catch (CacheException ..)' instea

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: ConcurrentModificationException in log.debug() statement

2004-09-09 Thread norbert
btw: this is not just an issue of debugging - other methods like the various 'printInfo()' (even in TreeCache()) eventually throwsConcurrentModificationException when being called while the cache is in use. If we want to keep the underlying Collections unsynchronized for performance-reasons, w

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: ConcurrentModificationException in log.debug() statement

2004-09-09 Thread norbert
e.g. in NodeMap it dosn't help that the method readerOwners() is synchronized, but the Collection (readOwnerList_) being returned by it being unsynchronized. It wouldn't even help to make the IdentityLock.toString()-method synchronized, since the JVM's lock on the IdentityLock instance does not

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: ConcurrentModificationException in log.debug() statement

2004-09-09 Thread norbert
I've notices these kind of exceptions in many areas of jboss-cache's 'toString()' methods... It's because all the Collections being used (e.g. ArrayList for readOwnerList in LockMap.java, HashMap for data in Node.java ... ) are all unsynchronized and throw ConcurrentModificationException whenev

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Redeployment issues

2004-09-02 Thread norbert
self is choosen for the local cache. >Norbert: As a workaround you may include the >classes in the servers classpath, so >the classes do >not have to be reloaded. >That would mean that the those classes cannot be >hotdeployed at all! also correct. As you might see there is no way

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: exception design

2004-08-31 Thread norbert
just noticed that all methods in TreeCache that make use of invokeMethod are designed to throw LockingException and TimeOutException but actually will allways throw NestedRuntimeException which is the only Exception being thrown by invokeMethod(). as a result TreeCache behaves differently in res

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: JBossCache 1.1 released

2004-08-31 Thread norbert
using the files from JBossCache-1.1.zip (11.100.417 Bytes) that is currenly on sourceforge View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846764#3846764 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846764 -

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: JBossCache 1.1 released

2004-08-31 Thread norbert
getting java.lang.UnsupportedClassVersionError: org/jboss/system/ServiceMBeanSupport (Unsupported major.minor version 48.0) when trying to instantiate TreeCache on JDK 1.3.1... View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846763#3846763 Reply to the post

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Redeployment issues

2004-08-31 Thread norbert
this is due to the fact that objects in the cache that is residing in the same JVM as the ejb are accessed by reference without any check whether the previous loaded classes of these objects are accessible to the current ejb's classloader anymore. This isn't easy to solve as long the objects the

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fails on Java 1.3.1

2004-08-28 Thread norbert
thank you for the hint (must have been blind), but you must admit that it really sucks when you start from scratch by downloading everything from JBoss-CVS and all module-names are different from the directory-names that are refereced in the build.xml's... I had to change a few more lines to ge

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fails on Java 1.3.1

2004-08-26 Thread norbert
I can't find TreeCacheMBean, TreeCacheViewMBean TreeCacheAOPMBean in CVS. I guess they are without version-control placed on your harddisk. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846296#3846296 Reply to the post : http://www.jboss.org/index.html?modu

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fails on Java 1.3.1

2004-08-25 Thread norbert
of course I checked this in separate code. Currenty I have a little trouble what version / branch of jboss-cache to checkout from cvs to get it compiled against jgroups 2.2.6 What do you recommend? jboss-cache 1.02 seems not to be tagged separately Check out from CVS-head and work on the la

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fails on Java 1.3.1

2004-08-25 Thread norbert
I suggest using jgroups 2.2.6 and change org.jgroups.util.ContextObjectInputStream as it is implemented in JDK1.4: package org.jgroups.util; import java.io.IOException; import java.io.ObjectStreamClass; import java.io.InputStream; import java.io.ObjectInputStream; import java.util.HashMap; /**

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fails on Java 1.3.1

2004-08-20 Thread norbert
Ok, found it. It's caused by the design of org.jgroups.blocks.MethodCall. MethodCall is used to call a remote method and for this it provides an an serialized (externalized) Version of the method's signature. primitive Types are externalized using their primitive Class (e.g. Boolean.TYPE). Later

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fails on Java 1.3.1

2004-08-20 Thread norbert
just digged a bit into the code, it seems that org.javagroups.blocks.MethodCall.invoke() generates the IllegalArgumentException because of the Boolean being passed in TreeCache.put(): public void put(Fqn fqn, Map data) throws Exception { GlobalTransaction tx = getCurrentT

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: Fails on Java 1.3.1

2004-08-20 Thread norbert
I'm getting the same problem with JBossCache 1.0.2 on JDK 1.3. Here is what I get from the log: first instance 1 is started in JVM 1 >15:14:29,148 [INFO] org.jboss.cache.TreeCache: cache mode is REPL_SYNC >--- >GMS: address is siapp4c1:59485 >-

[JBoss-dev] [Caches on JBoss (Caches/JBoss)] - Re: JBossCache in production

2004-07-23 Thread norbert
I'm going to use JBossCache as a distributed cache in an set of J2EE-applications for 8 registered Users / 2 per Day to share per-user-sessiondata across different JSP/EJB-applications which reside on different BEA-6.1-Clusters. The applications are allready productive and currenty using