[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 for details.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3858106#3858106

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3858106


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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. (It makes use of the 
Iterator of the 'result').

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856821#3856821

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856821


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 transaction.

Access to the keySet outside of a transaction is not garanteed to be threadsafe.

Can you please check out whether this still happens with 
TransactionIsolationLever being set higher than 'NONE'?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856661#3856661

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856661


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 a method of Node is called the 
node is not locked in any way. Locking is being taken care of by the TreeCache 
itself.

So you might ask, 'why are these methods declared as public?' - The only 
reason, that these methods are declared public, is, that you cannot declare 
classes to be 'friends' in java and Node is being used by other (internal) 
packages of JBossCache. (This packaging design might need some rework, or at 
least be somewhat better documented in the javadoc)


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856616#3856616

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856616


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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()'.

If you are not running in a J2EE-container, you might just use the 
DummyTransactionManager that comes with JBossCache.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856620#3856620

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856620


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856399#3856399

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856399


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 instance to TreeCache via 
setTransactionManagerLookup(TransactionManagerLookup 
transactionmanagerlookupinstance), or you specify the className via 
setTransactionManagerLookupClass(String classname)

You may want to look into the sources of 
org.jboss.cache.DummyTransactionManagerLookup to have a working example.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856053#3856053

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856053


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 created. Due to the transaction-isolation-level this newly created 
node is locked in write-mode. After this the TreeCacheListener's 
nodeCreated-method is being called. After return of this method-call the 
put-method continues to execute.

This behaviour might (will) change in the future, since it causes problems when 
a TreeCacheListener tryies to process the callbacks asynchronously.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856055#3856055

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856055


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 the Cacheloaders comming with the JBossCache-source (e.g. look 
how org.jboss.cache.loader.FileCacheLoader implements get(Fqn)).

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856060#3856060

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856060


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 map the primary-keys of your table to different Fqn's 
(respectivly nodes in the tree) and the values from the rows of your table to 
the attributes stored in the node.

This way access to a node will load a single row from the db.

Then you may specify appropriate timeouts for evictionpolicy to evict data from 
rarely accessed rows by evicting the corresponding nodes.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856066#3856066

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856066


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 actually being used 
before it times out by eviction. Reasonable means: long enough to keep the data 
in the cache during a regular user session and short enough to free the memory 
as long the data is not being accessed.

Eviction and cacheloading work together: accessing a node that is not in memory 
triggers the cacheloader to load it e.g. from db. not accessing a node (for a 
specified time) makes eviction 'evict' the node. accessing the previously 
evicted node again triggers the cacheloader. Besides the fact that cacheloading 
from db takes some amount of time this process is transparent to the caller 
which is just accessing nodes.

All you have to do is fine-tune eviction to have the amount of data in memory 
tha you actually need.

But I agree that storing a single value in a Hashtable is quite inefficient 
(mosty in terms of number of objects instantiated). From my point of view 
Tree-structure and node's data storage are separate concerns that should be 
defined in separate interfaces. (Which would allow to store arbitrary data 
directly in a node). Maybe this will be in TreeCache in a later release.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856076#3856076

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3856076


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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.

TimeOutExceptions occour as long the sending member assumes the receiving 
member is still alive so it still sends messages to the receiving member. In 
case the receiving member does not respond within a given timeout, the 
communication-stack (JGroups) assumes the receiving member may still be alive, 
but unresponsive (this state is called 'suspected'). Since in this situation 
JGroups cannot garantee messages will reach all members in the group, it 
notifies the caller by throwing TimeOutException. (see the attribute 
'suspected=true' in the Exceptions message-string). If the 'suspected' member 
does not respond within another timeout-period, JGroups will decide it has died 
and remove it from the group. From this point in time it will no longer try to 
send messages to this host and no more TimeOutExceptions will occour.

If you don't want your calling thread to be notified of such 
replication-errors, use asynchronous replication instead.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3855167#3855167

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855167


---
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 Transaction as long the 
previous lock is not owned by the same Globaltransaction.

Therefore the way your code runs depends on the behaviour of the 
transactionmanager being used since you start the second Transaction from the 
thread that is started within the boundaries of the first Transaction. To be 
independent of TransactionManagerImplementation-specific behaviour try starting 
the 2nd thread first before opening the first transaction.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3854729#3854729

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854729


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3854889#3854889

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854889


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 by the 
previous deployment are no longer accessible from the new EJB-classloader after 
redeployment.

If this is an issue for you, you better go with a startupservlet that stops the 
local cache-instance on undeployment of your EAR.

Or you put the classes in question somewhere in all/lib or system-classpath or 
so they don't get redeployed.

Or you implement a treecachelistener that is notified by some startupservlet 
from destroy() so it can remove all Objects in question before shuting down the 
app.

(I'm still searching for a clean solution of this issue, will be tricky though).

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3854229#3854229

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854229


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


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

2004-10-26 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 
used depends on the transaction-isolation-level.

Every time you put a key-value-pair into a node locking takes place.

Every time you create or remove a node locking also takes place (on the parent node).

The kind of lock being used depends on the transaction-isolation-level. If you specify 
REPEATABLE_READ or SERIALIZABLE, the nodes in question are write-locked for the time 
of your transaction read-access is blocked during this time. If you use a lower 
isolation-level nodes may be accessed from within multiple transactions in paralell 
and the use of transactions does not have a negative performance-impact (as a drawback 
it's not garanteed you will allways retrive the same value during the transaction 
because another thread might have altered the data in the meantime).

Because of this I'd recommend you map your keys to the last entry in the FQNs being 
used if you have to use at least REPEATABLE_READ. If a lower isolation-level is 
sufficient using a single node and putting all data into it like a regular hashtable 
will perform slighly better.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3852663#3852663

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3852663


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 more understanding of how ip-multicast works.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3851781#3851781

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851781


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3851782#3851782

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851782


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 solve this.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850487#3850487

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850487


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 multiple times).

To use a single cache-instance (without using the MBean deploment) you have to write 
your own factory-class implementing a static factory-method that allways returns a 
reference to the same TreeCache-instance. (Or instantiate a single TreeCache-instance 
from some startup-class that binds the TreeCache to JNDI so every session-bean might 
retrive the same instance (in a single VM) from there.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850359#3850359

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850359


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850438#3850438

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850438


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3850439#3850439

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850439


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3850159#3850159

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850159


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 
of a cache small (in memory). A client is supposed to regenerate the node's data 
whenever it receives null from the cache and re-put the data into the cache again. 
(It's the nature of a cache that cached data sometimes is discardet).

You can specify regions that undergo evictions and specify different max-sizes and 
max-idle-times for these. Thus you may have a region that does not evict at all, if 
this is required.

If you want removal to be replicated use 'remove()'

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850114#3850114

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850114


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 hibernate - will be less risk than modifying 
TreeCache.startService() yourself.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3850118#3850118

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850118


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3850137#3850137

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3850137


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3849811#3849811

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849811


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3849223#3849223

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849223


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 = regionManager_.getRegion(fqn.toString()); -- this line!
  | region.setAddedNode(fqn);
  | }
  | 

I wonder how this is supposed to work at all:

in TreeCache.startService() the Cache is populated by calling fetchStateOnStartup() 
before the EvictionPolicy is going to be initialized (by notifyCacheStarted() a few 
lines later...). Despite the fact it's surprising that fqn.equals(ROOT) apparently 
evaluates to true, the LRUPolicy just cannot populate it's regions as long it hasn't 
seen it's config yet...

to workaround the NPE you can set FetchStateOnStartup to false and call 
TreeCache.fetchState() after having called TreeCache.start();



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3848805#3848805

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3848805


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 fqn = new Fqn((Object)list);

I'm not a fried of overloading Constructors or methods while keeping the number of 
arguments constant. It's not compatible with the design of generics (as they are in 
JDK5.0).

We would be better off having a default constructor and a constructor accepting an 
array of elements. To construct a Fqn from a List having an addList(List)-method would 
be better.

Since it's not taking any Object 'as is' right now, it's not a huge benefit to be 
allowed to use Object instead of String. Basically an Fqn is just a hirarchical name. 
It points to a context with bound attributes.

This lead me to the following: It might be better to adhere to standards and make 
TreeCache implement javax.naming.DirContext and Fqn implement javax.naming.Name. This 
way a TreeCache might be bound to a NamingContext in a way that all Contents of the 
TreeCache appear seamlessly within the JNDI. TreeCache could also be used as a 
high-speed distributed Namingservice for JBoss itself.

... just a few ideas I had last night

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3848577#3848577

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3848577


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 specific cacheloaders have the documented limitation to only 
support objects that return a unique value when calling 'toString()' or support some 
plugin-mechanism or use AOP to do the object-to-String mapping that ist required for 
the keys to be used by relational dBs.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3848440#3848440

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3848440


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 possible to the upcomming JDK 5.0 that includes the 
java.util.concurrent classes based on the oswego-library.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3848129#3848129

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3848129


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 break existing code when upgrading from 1.02 
to 1.1.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847825#3847825

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847825


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 just being seen as bad programming practice, but basically not 
acceptable...

I'll review this synchronisation issue in more detail to find solution that hopefully 
does not compromise performance.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847822#3847822

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847822


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 whenever being modified in another thread while being 
iterated.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847721#3847721

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847721


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 lock the NodeMap, which would be 
required to hinder the NodeMap's synchronized method's (which lock the NodeMap, but 
not it's instance-variables) to excecute and modify the concurrenty accessed 
readOwnerList_

IMHO the only way to archive this is to use the synchronized version instead(created 
by java.util.Collection.synchronizedCollection(Collection)).

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847730#3847730

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847730


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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, 
we must never pass references to them. methods like 'LockMap.readerOwners()' are a 
'must not' in respect to concurrency.

I guess all the synchronizing must be carefully reviewed before this may go gold.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847734#3847734

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847734


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 ..)' instead of 
being more specific.

The way it's designed now forces the caller to do so - existing code a la:


  | try {
  |put(...)
  | } catch (LockingException lex) {
  | } catch (TimeoutException tex) {
  | }
  | 

does not work anymore (because the compiler knows there could be more subclasses to 
CacheException being added and thrown without being catched at any later time...)

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847736#3847736

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847736


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


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

2004-09-02 Thread norbert
Does the MarshalledValue solution implie that my POJO will be serialized on put and 
deserialized on get. If that is true, it would seriously degrade the perfomance as 
I cache quite large objects. 

correct. That's why storing references to the actuall object itself 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 to have both:
Store references to object instances and access them later while having the classes 
(that might have changed in the meantime) redeployed will never work.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847002#3847002

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847002


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 themselve are stored in the cache and not 
externalized or serialized versions of them.

I'd expect you would get the same error if you deploy two ejbs accessing the same 
instance of TreeCache from 2 different ears using classes that are both loaded by the 
different classloaders of the 2 applications.

Flushing the local cache on undeployment of the ejb is not a solution, since this 
might lead to totally unexpected behavior (as it makes a difference wheter another 
member in the group is active until the ejb is redeployed which would allow to refetch 
the state.)

As a workaround you may include the classes in the servers classpath, so the classes 
do not have to be reloaded. Maybe this is the only suitable solution as long we agree 
that it's desirable to allow a per-JVM shared cache at all.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3846757#3846757

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846757


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3846763#3846763

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846763


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3846764#3846764

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846764


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 respect to the exceptions being thrown if 
being used as a local Cache or within a group (which should be transparent to the 
programmer).

The expected behavior can be archived by wrapping every call to invokeMethod with this:


  |   try {
  | return (Node)invokeMethod(m);
  |   } catch (NestedRuntimeException e) {
  | Throwable t = ((NestedRuntimeException)e).getNested();
  | if (t instanceof LockingException) throw (LockingException) t;
  | if (t instanceof TimeoutException) throw (TimeoutException) t;
  | if (t instanceof RuntimeException) throw (RuntimeException) t;
  | throw e;
  |   }
  | 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3846782#3846782

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846782


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 get the code from CVS-HEAD (both JGroups and 
JBossCache) running on JDK 1.3.1:

enable the use of ContextInputStream in  org.jboss.Message.getObject() (otherwise you 
get the same 'ClassNotFoundException: boolean'):

public Object getObject() {
if(buf == null) return null;
try {
ByteArrayInputStream in_stream=new ByteArrayInputStream(buf, offset, 
length);
// ObjectInputStream in=new ObjectInputStream(in_stream);
ObjectInputStream in=new ContextObjectInputStream(in_stream);
return in.readObject();
}
catch(Exception ex) {
throw new IllegalArgumentException(ex.toString());
}
}

remove the use of 'Boolean.valueOf(boolean)' (which is a new method in JDK 1.4) in 
org.jgroups.JChannel.getOpt(int) to fix a 'noSuchMethodException' on JDK 1.3.1:

public Object getOpt(int option) {
switch(option) {
case VIEW:
//return Boolean.valueOf(receive_views);
return receive_views ? Boolean.TRUE : Boolean.FALSE;
case BLOCK:
//return Boolean.valueOf(receive_blocks);
return receive_blocks ? Boolean.TRUE : Boolean.FALSE;
case SUSPECT:
//return Boolean.valueOf(receive_suspects);
return receive_suspects ? Boolean.TRUE : Boolean.FALSE;
case GET_STATE_EVENTS:
//return Boolean.valueOf(receive_get_states);
return receive_get_states ? Boolean.TRUE : Boolean.FALSE;
case LOCAL:
//return Boolean.valueOf(receive_local_msgs);
return receive_local_msgs ? Boolean.TRUE : Boolean.FALSE;
default:
if(log.isErrorEnabled()) log.error(option  + 
Channel.option2String(option) +  not known);
return null;
}
}


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3846524#3846524

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846524


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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=bbop=viewtopicp=3846296#3846296

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846296


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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;

/**
 * ObjectInputStream which sets a contact classloader for reading bytes into objects. 
Copied from
 * MarshalledValueInputStream of JBoss
 * @author Bela Ban
 * @version $Id: ContextObjectInputStream.java,v 1.1 2004/07/26 15:26:46 belaban Exp $
 */
public class ContextObjectInputStream extends ObjectInputStream {

/**
 * A class wide cache of proxy classes populated by resolveProxyClass
 */
private static HashMap classCache = new HashMap();

private static final HashMap primClasses = new HashMap(8, 1.0F);
static {
primClasses.put(boolean, boolean.class);
primClasses.put(byte, byte.class);
primClasses.put(char, char.class);
primClasses.put(short, short.class);
primClasses.put(int, int.class);
primClasses.put(long, long.class);
primClasses.put(float, float.class);
primClasses.put(double, double.class);
primClasses.put(void, void.class);
}

/**
 * Creates a new instance of MarshalledValueOutputStream
 */
public ContextObjectInputStream(InputStream is) throws IOException {
super(is);
}

protected Class resolveClass(ObjectStreamClass v)
throws IOException, ClassNotFoundException {
String className = v.getName();
Class resolvedClass = null;
// Check the class cache first if it exists
if (classCache != null) {
synchronized (classCache) {
resolvedClass = (Class) classCache.get(className);
}
}

if (resolvedClass == null) {
ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
try {
resolvedClass = loader.loadClass(className);
} catch (ClassNotFoundException e) {
/* This is a backport von JDK 1.4's 
java.io.ObjectInputstream to support
 * retrieval of primitive classes (e.g. Boolean.TYPE) 
in JDK 1.3.
 * This is required for org.jgroups.blocks.MethodCall 
to support primitive
 * Argument types in JDK1.3:
 */
resolvedClass = (Class) primClasses.get(className);
if (resolvedClass == null) {
/* Use the super.resolveClass() call which 
will resolve array
classes and primitives. We do not use this by 
default as this can
result in caching of stale values across 
redeployments.
*/
resolvedClass = super.resolveClass(v);
}
}
if (classCache != null) {
synchronized (classCache) {
classCache.put(className, resolvedClass);
}
}
}
return resolvedClass;
}
}


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3846108#3846108

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846108


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 latest sources?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3846151#3846151

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846151


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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
---
15:14:33,468 [INFO] org.jboss.cache.TreeCache: viewAccepted(): new members: 
[siapp4c1:59485]
15:14:33,505 [INFO] org.jboss.cache.TreeCache: state could not be retrieved (must be 
first member in group)
15:14:33,505 [INFO] org.jboss.cache.TreeCache: setState(): new cache is null (maybe 
first member in cluster)
Cache: /
 successfully put some entries into the cache 

 now instance 2 is started up on jvm 2 (diffenent machine). Log from instance 1 
shows how instance 2 connects and retrieves state:

15:17:36,868 [INFO] org.jboss.cache.TreeCache: viewAccepted(): new members: 
[siapp4c1:59485, siapp5c1:59614]
15:17:36,952 [INFO] org.jboss.cache.TreeCache: getState(): locking tree
15:17:37,028 [INFO] org.jboss.cache.TreeCache: getState(): returning the current state

... now instance 2 tries to put an entry into the cache. While this happens instance 1 
shows:

java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: boolean
no stack trace available

This is to be found in the logs of instance 2:


15:17:32,488 [INFO] org.jboss.cache.TreeCache: cache mode is REPL_SYNC
---
GMS: address is siapp5:59614
---
15:17:36,929 [INFO] org.jboss.cache.TreeCache: viewAccepted(): new members: 
[siapp4c1:59485, siapp5:59614]
15:17:37,080 [INFO] org.jboss.cache.TreeCache: setState(): setting the new state
15:17:37,126 [INFO] org.jboss.cache.TreeCache: setState(): locking the old tree
15:17:37,181 [INFO] org.jboss.cache.TreeCache: setState(): locking the old tree was 
successful
15:17:37,182 [INFO] org.jboss.cache.TreeCache: setState(): forcing release of all 
locks in old tree
15:17:37,183 [INFO] org.jboss.cache.TreeCache: state was retrieved successfully (in 
252 milliseconds
Cache: /servers
/ipidom06c1.muc
/ipidom03c1.muc
/ipidom04c1.muc
/ipidom05c1.muc
/users
/q174298

... cache state was received successfully and cache content can be read this means 
jgroups-communication seems to be fine.

... as soon instance 2 tries to put an entry into the cache it gets:

15:17:39,625 [ERROR] org.jgroups.blocks.RpcDispatcher: 
exception=java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: 
boolean
java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: boolean
no stack trace available

as a result the entry is not replicated and can only be read from the cache-instance 
where it was put into.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3845737#3845737

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3845737


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 = getCurrentTransaction();
MethodCall m = new MethodCall(put_data_method, new Object[] {
tx, fqn, data, new Boolean(true) --- this boolean seems to be the 
argument that is not suitable for remote method call in JVM 1.3.1
});
invokeMethod(tx, m);
}


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3845747#3845747

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3845747


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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).
Lateron this is sent using org.jgroups.util.Util.objectToByteBuffer and retrieved on 
the other side using org.jgourps.util.Util.objectFromByteBuffer() which make use of 
ObjectOutputStream and ObjectInputStream.

the ObjectInputStream of SUNs JVM 1.3.1 doesn't support these primitive-types since it 
uses a Class.forName() to resolve an Object's Class.

this code-to-reproduce runs well on SUNs JVM 1.4.2, but fails on SUNs JVM 1.3.1:

import java.io.*;

public class ObjectInputOutput {

public static void main(String[] args) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(Boolean.TYPE);
byte[] ba = baos.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(ba);
ObjectInputStream ois = new ObjectInputStream(bais);
System.out.println(ois.readObject());
} catch (Exception e) {
e.printStackTrace(System.out);
}
}
}

java com.bmw.test.ObjectInputOutput

-

java.lang.ClassNotFoundException: boolean
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at com.bmw.test.ObjectInputOutput.main(ObjectInputOutput.java:27)



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3845770#3845770

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3845770


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[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 a per-VM-cache I wrote myself. (Which results 
in a much higher access-rate to the backend database than a distributed cache would 
allow to archive).

Given no mayer bugs will delay implementation I plan to go productive at the end of 
august


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3843132#3843132

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3843132


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development