From jbosscache-commits at lists.jboss.org Wed Nov 26 15:39:48 2008
Content-Type: multipart/mixed; boundary="===============0294020633329715956=="
MIME-Version: 1.0
From: jbosscache-commits at lists.jboss.org
To: jbosscache-commits at lists.jboss.org
Subject: [jbosscache-commits] JBoss Cache SVN: r7202 -
core/trunk/src/main/docbook/faq/en.
Date: Wed, 26 Nov 2008 15:39:48 -0500
Message-ID:
--===============0294020633329715956==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: manik.surtani(a)jboss.com
Date: 2008-11-26 15:39:47 -0500 (Wed, 26 Nov 2008)
New Revision: 7202
Modified:
core/trunk/src/main/docbook/faq/en/master.xml
Log:
JBCACHE-1444 ObjectName's validation fails for Jbosscache 3.0 on WAS 6.1 d=
ue to ":" char in name
Modified: core/trunk/src/main/docbook/faq/en/master.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- core/trunk/src/main/docbook/faq/en/master.xml 2008-11-26 20:35:07 UTC (=
rev 7201)
+++ core/trunk/src/main/docbook/faq/en/master.xml 2008-11-26 20:39:47 UTC (=
rev 7202)
@@ -1,800 +1,868 @@
+ "../../../../docbook-support/support/docbook-dtd/docbookx.dtd"
+ >
-
- Frequently Asked Questions about JBoss Cache
-
- Release 3.0.0 Naga
- October 2008
+
+ Frequently Asked Questions about JBoss Cache
+
+ Release 3.0.0 Naga
+ October 2008
=
-
- Manik
- Surtani
- manik AT jboss DOT org
-
+
+ Manik
+ Surtani
+ manik AT jboss DOT org
+
=
-
- Ben
- Wang
- ben DOT wang AT jboss DOT com
-
+
+ Ben
+ Wang
+ ben DOT wang AT jboss DOT com
+
=
-
- Bela
- Ban
- bela AT jboss DOT com
-
+
+ Bela
+ Ban
+ bela AT jboss DOT com
+
=
-
- Scott
- Marlow
- smarlow AT novell DOT com
-
+
+ Scott
+ Marlow
+ smarlow AT novell DOT com
+
=
-
- Galder
- Zamarre=C3=B1o
- galder DOT zamarreno AT jboss DOT com
-
+
+ Galder
+ Zamarre=C3=B1o
+ galder DOT zamarreno AT jboss DOT com
+
=
-
- This is a compilation of the most frequently asked
- questions about JBoss Cache. Please report any bugs,
- inconsistencies, or omissions you find in this FAQ on the
- JBoss Cache Use=
r Forum.
-
-
- This FAQ is divided into specific sections, all pertaining to =
the core JBoss Cache library. POJO Cache has a
- separate FAQ
- document pertaining to POJO Cache specifics.
-
-
+
+ This is a compilation of the most frequently asked
+ questions about JBoss Cache. Please report any bugs,
+ inconsistencies, or omissions you find in this FAQ on the
+ JBoss Cache=
User Forum.
+
+
+ This FAQ is divided into specific sections, all pertaining=
to the core JBoss Cache library. POJO Cache
+ has a
+ separate FAQ
+ document pertaining to POJO Cache specifics.
+
+
=
-
-
- 2005
- 2006
- 2007
- 2008
- JBoss, a division of Red Hat Inc., and all authors as nam=
ed.
-
-
+
+
+ 2005
+ 2006
+ 2007
+ 2008
+ JBoss, a division of Red Hat Inc., and all authors as =
named.
+
+
=
=
-
- General Information
-
+
+ General Information
+
=
-
-
- What is JBoss Cache?
-
+
+
+ What is JBoss Cache?
+
=
-
- JBoss Cache is a replicated and transactional cache. =
It is
- replicated since multiple JBoss Cache instances can be d=
istributed
- (either within the same JVM or across several JVMs wheth=
er they reside on
- the same machine or on different machines on a network) =
and data is
- replicated across the whole group. It is transactional b=
ecause a
- user can configure a
- JTA
- compliant transaction
- manager and make any cache
- interaction transactional, and caches would participate =
in ongoing JTA transactions. Note that the cache can also be run without
- any replication; this is the local mode.
-
+
+ JBoss Cache is a replicated and transactional ca=
che. It is
+ replicated since multiple JBoss Cache instances ca=
n be distributed
+ (either within the same JVM or across several JVMs=
whether they reside on
+ the same machine or on different machines on a net=
work) and data is
+ replicated across the whole group. It is transacti=
onal because a
+ user can configure a
+ J=
TA
+ compliant transaction
+ manager and make any cache
+ interaction transactional, and caches would partic=
ipate in ongoing JTA transactions. Note that
+ the cache can also be run without
+ any replication; this is the local mode.
+
=
- JBoss Cache comes in two flavours: Core and POJO vers=
ions. The core library
- (using the org.jboss.cache.Cache
- interface) is the underlying library that organises data=
in a tree-like structure and handles all locking,
- passivation,
- eviction and replication characteristics of data in the =
cache. The POJO library (using the
- org.jboss.cache.pojo.PojoCache interf=
ace) is built atop the core library and allows introspection
- of objects in the cache providing transparent coherence =
by using JBoss AOP. Note that the POJO edition
- of JBoss Cache
- (often referred to as POJO Cache) comes with a separate =
set of documentation (Users' Guide, FAQ, etc.)
- available on the JBoss Cache =
- document=
ation website.
-
+ JBoss Cache comes in two flavours: Core and POJO=
versions. The core library
+ (using the
+ org.jboss.cache.Cache
+ interface) is the underlying library that organise=
s data in a tree-like structure and handles
+ all locking,
+ passivation,
+ eviction and replication characteristics of data i=
n the cache. The POJO library (using the
+ org.jboss.cache.pojo.PojoCache
+ interface) is built atop the core library and allo=
ws introspection
+ of objects in the cache providing transparent cohe=
rence by using JBoss AOP. Note that the POJO
+ edition
+ of JBoss Cache
+ (often referred to as POJO Cache) comes with a sep=
arate set of documentation (Users' Guide, FAQ,
+ etc.)
+ available on the JBoss Cache
+ do=
cumentation website.
+
=
-
- JBoss Cache is made available in one of four different p=
ackages:
-
-
-
- jbosscache-core
-
- contains the core Cache library for users who do n=
ot wish to use the additional functionality
- offered by POJO Cache.
-
-
-
- jbosscache-pojo
-
- contains the core Cache library as well as POJO Ca=
che extensions and dependencies.
-
-
-
-
-
+
+ JBoss Cache is made available in one of four diffe=
rent packages:
+
+
+
+ jbosscache-core
+
+ contains the core Cache library for users =
who do not wish to use the additional
+ functionality
+ offered by POJO Cache.
+
+
+
+ jbosscache-pojo
+
+ contains the core Cache library as well as=
POJO Cache extensions and dependencies.
+
+
+
+
+
=
-
-
- Who are the JBoss Cache developers?
-
+
+
+ Who are the JBoss Cache developers?
+
=
-
-
- JBoss Cache has an active community of developers and co=
ntributors. The project was founded by Bela
- Ban
- and is currently led by Manik Surtani. Jason Greene is t=
he lead for the POJO Cache subsystem, and other
- contributors both past and present include Ben Wang, Har=
ald Gliebe, Brian Stansberry, Vladimir
- Blagojevic, Mircea Markus, Jimmy Wilson, Galder Zamarre=
=C3=B1o and Elias Ross.
-
-
-
+
+
+ JBoss Cache has an active community of developers =
and contributors. The project was founded by
+ Bela
+ Ban
+ and is currently led by Manik Surtani. Jason Green=
e is the lead for the POJO Cache subsystem,
+ and other
+ contributors both past and present include Ben Wan=
g, Harald Gliebe, Brian Stansberry, Vladimir
+ Blagojevic, Mircea Markus, Jimmy Wilson, Galder Za=
marre=C3=B1o and Elias Ross.
+
+
+
=
-
-
- What about licensing?
-
+
+
+ What about licensing?
+
=
-
- JBoss Cache is licensed under
- LGP=
L, an OSI-approve=
d open source license.
-
-
-
+
+ JBoss Cache is licensed under
+ LGPL, anOSI-approved open source license.
+
+
+
=
-
-
- Where can I download JBoss Cache?
-
+
+
+ Where can I download JBoss Cache?
+
=
-
- The JBoss Cache
- product download page
- has prebuilt binaries as well as source distributions. Y=
ou can also grab snapshots from the JBoss.org subversion
- repository. See
- the JBoss Cache development
- wiki page for details.
-
-
-
+
+ The JBoss Cache
+ product download page
+ has prebuilt binaries as well as source distributi=
ons. You can also grab snapshots from the
+ JBoss.org subversion
+ repository. See
+ the JBoss Cache development
+ wiki page for details.
+
+
+
=
-
-
- How do I build JBoss Cache from sources?
-
+
+
+ How do I build JBoss Cache from sources?
+
=
-
-
- Read the README-Maven.txt file in the source root. Note=
that you will need a JDK >=3D 5.0, and Apache Maven >=3D 2.0.6.
-
-
-
+
+
+ Read the README-Maven.txt file in the source root.=
Note that you will need a JDK >=3D 5.0, and
+ Apache Maven >=3D 2.0.6.
+
+
+
=
-
-
- Which versions of the JDK are supported by JBoss Cach=
e?
-
+
+
+ Which versions of the JDK are supported by JBoss=
Cache?
+
=
-
-
- JBoss Cache is baselined on Java 5 and is tested on Java=
5 and 6 VMs. If, for whatever reason you have
- to use Java 1.4, you could build a retroweaved version o=
f the core cache
- library that is Java 1.4 compatible, using the simple in=
structions on this wiki page
- on building and running JBoss Cache on Java 1.4.
- .
-
-
-
+
+
+ JBoss Cache is baselined on Java 5 and is tested o=
n Java 5 and 6 VMs. If, for whatever reason
+ you have
+ to use Java 1.4, you could build a retroweaved ver=
sion of the core cache
+ library that is Java 1.4 compatible, using the sim=
ple instructions on this wiki page
+ on building and running JBoss Cache
+ on Java 1.4.
+ .
+
+
+
=
-
-
- How do I know the version of JBoss Cache that I am us=
ing?
-
+
+
+ How do I know the version of JBoss Cache that I =
am using?
+
=
-
-
- java -jar jbosscache-core.jar
- will spit out version details.
-
-
-
+
+
+ java -jar jbosscache-core.jar
+ will spit out version details.
+
+
+
=
-
-
- Can I run JBoss Cache outside of JBoss Application
- Server?
-
-
+
+
+ Can I run JBoss Cache outside of JBoss Applicati=
on
+ Server?
+
+
=
-
-
- Absolutely! Even though JBoss Cache comes integrated wit=
h JBoss Application Server,
- it can also be used in any other Java EE server such as =
BEA WebLogic, IBM Websphere or Tomcat. It
- can also run in a standalone Java process, completely ou=
tside of an application server. See the Users' Guide for more
- details.
-
-
-
+
+
+ Absolutely! Even though JBoss Cache comes integrat=
ed with JBoss Application Server,
+ it can also be used in any other Java EE server su=
ch as BEA WebLogic, IBM Websphere or Tomcat.
+ It
+ can also run in a standalone Java process, complet=
ely outside of an application server. See the
+ Users' Guide for more
+ details.
+
+
+
=
-
-
- How can I migrate my application and configuration fr=
om using JBoss Cache 1.x to 2.x?
-
-
- Look at
- this wiki page
- for help.
-
-
-
+
+
+ How can I migrate my application and configurati=
on from using JBoss Cache 1.x to 2.x?
+
+
+ Look at
+ this wiki page
+ for help.
+
+
+
=
-
-
- What about from 2.x to 3.x?
-
-
-
- JBoss Cache 3.x is API compatible with 2.x, although as =
far as possible you should refactor your code
- not to use deprecated methods as these may disappear in =
future releases of JBoss Cache.
-
-
- JBoss Cache 3.x comes with an all new configuration form=
at. Old 2.x configuration files will still
- work, although you will get a warning in the logs about =
this. Again, as far as possible, we recommend
- migrating your configuration file to the new format. Sc=
ripts are provided with the JBoss Cache 3.x
- distribution to migrate configuration files (see config2to3.sh and config2to3.bat).
-
-
- Note that to take advantage of some of the new features =
in JBoss Cache 3.x, you need to be using the
- new configuration format.
- =
-
-
+
+
+ What about from 2.x to 3.x?
+
+
+
+ JBoss Cache 3.x is API compatible with 2.x, althou=
gh as far as possible you should refactor your
+ code
+ not to use deprecated methods as these may disappe=
ar in future releases of JBoss Cache.
+
+
+ JBoss Cache 3.x comes with an all new configuratio=
n format. Old 2.x configuration files will
+ still
+ work, although you will get a warning in the logs =
about this. Again, as far as possible, we
+ recommend
+ migrating your configuration file to the new forma=
t. Scripts are provided with the JBoss Cache
+ 3.x
+ distribution to migrate configuration files (see
+ config2to3.sh
+ andconfig2to3.bat).
+
+
+ Note that to take advantage of some of the new fea=
tures in JBoss Cache 3.x, you need to be using
+ the
+ new configuration format.
+
+
+
=
-
-
- Where can I report bugs or problems?
-
+
+
+ Where can I report bugs or problems?
+
=
-
- Please report any bugs or problems to
- JBoss Cac=
he User Forum.
-
-
-
-
-
+
+ Please report any bugs or problems to
+ JBo=
ss Cache User Forum.
+
+
+
+
+
=
-
- JBoss Cache - Core
+
+ JBoss Cache - Core
=
-
+
=
-
-
- Using JBoss Cache 2 or 3 on JBoss AS 4.x
-
+
+
+ Using JBoss Cache 2 or 3 on JBoss AS 4.x
+
=
-
-
- JBoss AS 4.x ships with JBoss Cache 1.4.x. To make use =
of new features, performance improvements
- and bug fixes in newer releases, you can follow some of =
the steps outlined on this wiki page.
-
-
-
+
+
+ JBoss AS 4.x ships with JBoss Cache 1.4.x. To make=
use of new features, performance improvements
+ and bug fixes in newer releases, you can follow so=
me of the steps outlined onthis wiki page.
+
+
+
=
-
-
- Can I run multiple JBoss Cache instances on the same =
VM?
-
+
+
+ Can I run multiple JBoss Cache instances on the =
same VM?
+
=
-
- Yes. There are some scenarios where you may want to r=
un
- multiple instances of JBoss Cache. For example, you want=
to run
- multiple local cache instances with each instance having=
its own
- configuration (e.g., different cache policy). In this ca=
se, you will
- need multiple xml configuration files.
-
-
-
+
+ Yes. There are some scenarios where you may want=
to run
+ multiple instances of JBoss Cache. For example, yo=
u want to run
+ multiple local cache instances with each instance =
having its own
+ configuration (e.g., different cache policy). In t=
his case, you will
+ need multiple xml configuration files.
+
+
+
=
-
-
- Can JBoss Cache run as a second level cache inside
- Hibernate?
-
-
+
+
+ Can JBoss Cache run as a second level cache insi=
de
+ Hibernate?
+
+
=
-
- Yes. Since Hibernate 3.0 release, you can configure i=
t to use
- JBoss Cache as a second level cache. For details,
- see Hibernate documentation, and also see
- this wiki page.
-
-
- JBoss Cache 3.x with MVCC in particular works very well=
as a Hibernate second level cache.
-
-
-
+
+ Yes. Since Hibernate 3.0 release, you can config=
ure it to use
+ JBoss Cache as a second level cache. For details,
+ see Hibernate documentation, and also see
+ this wiki page.
+
+
+ JBoss Cache 3.x with MVCC in particular works very=
well as a Hibernate second level cache.
+
+
+
=
-
-
- What about using POJO Cache as a Hibernate cache?
-
+
+
+ What about using POJO Cache as a Hibernate cache=
?
+
=
-
- It is not necessary to use POJO Cache for second level
- cache inside Hibernate because Hibernate
- manages fine-grained fields in Java objects. Using POJO =
Cache won't
- provide any advantage, and will be an unnecessary perfor=
mance drawback.
-
-
-
+
+ It is not necessary to use POJO Cache for second=
level
+ cache inside Hibernate because Hibernate
+ manages fine-grained fields in Java objects. Using=
POJO Cache won't
+ provide any advantage, and will be an unnecessary =
performance drawback.
+
+
+
=
-
-
- How can I configure JBoss Cache?
-
+
+
+ How can I configure JBoss Cache?
+
=
-
- You can configure the JBoss Cache through a configura=
tion xml
- file or programmatically using a
- org.jboss.cache.config.Configuration
- object, passed in to the
- org.jboss.cache.CacheFactory
- instance.
-
-
-
+
+ You can configure the JBoss Cache through a conf=
iguration xml
+ file or programmatically using a
+ org.jboss.cache.config.Configuration
+ object, passed in to the
+ org.jboss.cache.CacheFactory
+ instance.
+
+
+
=
-
-
- Can I use a schema or DTD to validate my JBoss Cache =
configuration file?
-
-
+
+
+ Can I use a schema or DTD to validate my JBoss C=
ache configuration file?
+
+
=
-
-
- As of JBoss Cache 3.x, yes. An XSD schema is provided i=
n your jbosscache-core.jar file, and is also
- available online, on http://www.jboss.org/jbosscache/jboss=
cache-config-3.0.xsd.
- You can configure your IDE, text editor or XML authoring=
tool to use this schema to validate your file.
-
-
-
+
+
+ As of JBoss Cache 3.x, yes. An XSD schema is provi=
ded in your jbosscache-core.jar file, and is
+ also
+ available online, on
+ http://www.jboss.org/jbosscache/jbosscache-config-=
3.0.xsd.
+ You can configure your IDE, text editor or XML aut=
horing tool to use this schema to validate
+ your file.
+
+
+
=
-
-
- What is the difference between the different cache mo=
des?
-
-
+
+
+ What is the difference between the different cac=
he modes?
+
+
=
-
- JBossCache has five different cache modes, i.e.,
- LOCAL
- ,
- REPL_SYNC
- ,
- REPL_ASYNC
- ,
- INVALIDATION_SYNC
- and
- INVALIDATION_ASYNC
- . If you want to run JBoss Cache as a
- single instance, then you should set the cache mode to
- LOCAL
- so that it won't attempt to replicate anything.
- If you want to have synchronous replication among differ=
ent
- JBoss Cache instances, you set it to
- REPL_SYNC
- .
- For asynchronous replication, use
- AYSNC_REPL
- . If you do not wish to replicate cached data but simply=
inform other caches in a cluster that data
- under
- specific addresses are now stale and should be evicted f=
rom memory, use
- INVALIDATION_SYNC
- or
- INVALIDTAION_ASYNC
- . Synchronous and asynchronous behavior applies to inval=
idation as well as replication.
-
+
+ JBossCache has five different cache modes, i.e.,
+ LOCAL
+ ,
+ REPL_SYNC
+ ,
+ REPL_ASYNC
+ ,
+ INVALIDATION_SYNC
+ and
+ INVALIDATION_ASYNC
+ . If you want to run JBoss Cache as a
+ single instance, then you should set the cache mod=
e to
+ LOCAL
+ so that it won't attempt to replicate anything.
+ If you want to have synchronous replication among =
different
+ JBoss Cache instances, you set it to
+ REPL_SYNC
+ .
+ For asynchronous replication, use
+ AYSNC_REPL
+ . If you do not wish to replicate cached data but =
simply inform other caches in a cluster that
+ data
+ under
+ specific addresses are now stale and should be evi=
cted from memory, use
+ INVALIDATION_SYNC
+ or
+ INVALIDTAION_ASYNC
+ . Synchronous and asynchronous behavior applies to=
invalidation as well as replication.
+
=
- Note that
- ASYNC_REPL
- and
- INVALIDATION_ASYNC
- are non-blocking. This
- can be useful when you want to have another JBoss Cache =
serving as a
- mirror or backup and you don't want to wait for confirma=
tion that this mirror has received your
- messages.
-
-
-
+ Note that
+ ASYNC_REPL
+ and
+ INVALIDATION_ASYNC
+ are non-blocking. This
+ can be useful when you want to have another JBoss =
Cache serving as a
+ mirror or backup and you don't want to wait for co=
nfirmation that this mirror has received your
+ messages.
+
+
+
=
-
-
- How does JBoss Cache's replication mechanism work?
-
+
+
+ How does JBoss Cache's replication mechanism wor=
k?
+
=
-
- JBoss Cache leverages
- JGroups
- for network communications. A JGroups configuration sec=
tion is present in your JBoss Cache configuration.
-
-
- A user
- can configure the cluster of JBoss Cache instances by sh=
aring the
- same cluster name (
- cluster name
- ). There is also
- an option of whether to populate the cache data upon sta=
rting a new
- instance in the
- ClusterConfig
- attribute.
-
+
+ JBoss Cache leverages
+ JGroups
+ for network communications. A JGroups configuratio=
n section is present in your JBoss Cache
+ configuration.
+
+
+ A user
+ can configure the cluster of JBoss Cache instances=
by sharing the
+ same cluster name (
+ cluster name
+ ). There is also
+ an option of whether to populate the cache data up=
on starting a new
+ instance in the
+ ClusterConfig
+ attribute.
+
=
- Note that once all instances join the same replicatio=
n group,
- every replication change is propagated to all participat=
ing members.
- There is no mechanism for sub-partitioning where some re=
plication
- can be done within only a subset of members, unless you =
use the Buddy Replication features. See the
- Users' Guide for more details on this.
-
-
-
+ Note that once all instances join the same repli=
cation group,
+ every replication change is propagated to all part=
icipating members.
+ There is no mechanism for sub-partitioning where s=
ome replication
+ can be done within only a subset of members, unles=
s you use the Buddy Replication features. See
+ the
+ Users' Guide for more details on this.
+
+
+
=
-
-
- I run a 2 node cluster. If the network dies, do the c=
aches continue to run?
-
+
+
+ I run a 2 node cluster. If the network dies, do =
the caches continue to run?
+
=
-
- Yes, both will continue to run, but depending on your=
replication mode, all transactions or
- operations may not complete. If
- REPL_SYNC
- is used, operations will fail while if
- REPL_ASYNC
- is used they will succeed. Even if they succeed though, =
caches will be out of sync.
-
-
-
+
+ Yes, both will continue to run, but depending on=
your replication mode, all transactions or
+ operations may not complete. If
+ REPL_SYNC
+ is used, operations will fail while if
+ REPL_ASYNC
+ is used they will succeed. Even if they succeed th=
ough, caches will be out of sync.
+
+
+
=
=
-
-
- Can I plug in library X instead of JGroups to handle =
remote calls and group communications?
-
+
+
+ Can I plug in library X instead of JGroups to ha=
ndle remote calls and group communications?
+
+
=
-
- At this stage the answer is no. We do have an abstrac=
tion layer between the
- communication suite and JBoss Cache in the pipelines, an=
d this may appear as a feature at some stage
- in
- the future.
-
-
-
+
+ At this stage the answer is no. We do have an ab=
straction layer between the
+ communication suite and JBoss Cache in the pipelin=
es, and this may appear as a feature at some
+ stage
+ in
+ the future.
+
+
+
=
-
-
- Does the cache need to replicate to every other insta=
nce in the cluster? Isn't this slow if the
- cluster is large?
-
-
+
+
+ Does the cache need to replicate to every other =
instance in the cluster? Isn't this slow if
+ the
+ cluster is large?
+
+
=
-
- Replication need not occur to every node in the clust=
er. This feature -
- called Buddy Replication -
- allows each node to pick one or more 'buddies' in the cl=
uster and only replicate to its buddies. This
- allows a cluster to scale
- very easily with no extra impact on memory or network tr=
affic with each node added.
-
-
- See the Users' Guide for more information on Buddy Repli=
cation, and how it can be used to achieve very
- high
- scalability.
-
-
-
+
+ Replication need not occur to every node in the =
cluster. This feature -
+ called Buddy Replication -
+ allows each node to pick one or more 'buddies' in =
the cluster and only replicate to its buddies.
+ This
+ allows a cluster to scale
+ very easily with no extra impact on memory or netw=
ork traffic with each node added.
+
+
+ See the Users' Guide for more information on Buddy=
Replication, and how it can be used to
+ achieve very
+ high
+ scalability.
+
+
+
=
-
- I'm using Buddy Replication. Do I need to hav=
e some form of session affinity?
- Session affinity relates to returning to the sam=
e cache instance for the same data being used.
- While this is strictly not a requirement for Buddy Replicat=
ion, it is greatly recommended to minimize
- moving state around a cluster.
-
+
+
+ I'm using Buddy Replication. Do I need to have s=
ome form of session affinity?
+
+
+ Session affinity relates to returning to the sam=
e cache instance for the same data being used.
+ While this is strictly not a requirement for Buddy=
Replication, it is greatly recommended to
+ minimize
+ moving state around a cluster.
+
+
+
=
-
-
- If I have the need for different configuration proper=
ties (e.g.,
- CacheMode
- and
- IsolationLevel
- ), do I simply need to create multiple
- org.jboss.cache.Cache
- instances with the appropriate configuration?
-
-
+
+
+ If I have the need for different configuration p=
roperties (e.g.,
+ CacheMode
+ and
+ IsolationLevel
+ ), do I simply need to create multiple
+ org.jboss.cache.Cache
+ instances with the appropriate configuration?
+
+
=
-
- Yes. All the above mentioned properties are per cache
- instance. Therefore you will need separate
- org.jboss.cache.Cache
- instances.
-
-
-
+
+ Yes. All the above mentioned properties are per =
cache
+ instance. Therefore you will need separate
+ org.jboss.cache.Cache
+ instances.
+
+
+
=
-
-
- Isn't this expensive from a networking standpoint, i.=
e., needing to create sockets for each
- org.jboss.cache.Cache
- instance?
-
-
+
+
+ Isn't this expensive from a networking standpoin=
t, i.e., needing to create sockets for each
+ org.jboss.cache.Cache
+ instance?
+
+
=
-
-
- Yes, it can be. For such cases it is recommended that yo=
u configure your cache using the JGroups
- Multiplexer, which allows several caches to share
- a single JGroups channel. Please see the Users' Guide fo=
r details on how to configure the JGroups
- Multiplexer.
-
-
- A faster and more efficient approach is to use a shared =
transport in JGroups. Please see =
- the JGroups docume=
ntation for more details on how to do this.
-
-
-
+
+
+ Yes, it can be. For such cases it is recommended t=
hat you configure your cache using the JGroups
+ Multiplexer, which allows several caches to share
+ a single JGroups channel. Please see the Users' Gu=
ide for details on how to configure the
+ JGroups
+ Multiplexer.
+
+
+ A faster and more efficient approach is to use a s=
hared transport in JGroups. Please see
+ the JGroups =
documentation
+ for more details on how to do this.
+
+
+
=
=
-
-
- Does the
- ClusterName
- configuration element have
- any relation to the JBoss AS cluster
- PartitionName
- ?
-
-
+
+
+ Does the
+ ClusterName
+ configuration element have
+ any relation to the JBoss AS cluster
+ PartitionName
+ ?
+
+
=
-
- Yes. They are both JGroups group names. Besides the n=
otion of
- a channel in JGroups, it also can partition the channel =
into different
- group names.
-
-
-
+
+ Yes. They are both JGroups group names. Besides =
the notion of
+ a channel in JGroups, it also can partition the ch=
annel into different
+ group names.
+
+
+
=
-
-
- When using multiple JGroups based components
- [cluster-service.xml, cache (multiple instances)], what =
is the
- correct/valid way to configure those components to make =
sure my
- multicast addresses don't conflict?
-
-
+
+
+ When using multiple JGroups based components
+ [cluster-service.xml, cache (multiple instances)],=
what is the
+ correct/valid way to configure those components to=
make sure my
+ multicast addresses don't conflict?
+
+
=
-
- There are two parameters to consider: multicast addre=
ss (plus
- port) and the group name. At minimum, you will have to r=
un
- components using a different group name. But whether to =
run them on
- the same channel depends upon whether the communication =
performance
- is critical for you or not. If it is, then it'd be best =
to run them
- on different channels.
-
-
-
+
+ There are two parameters to consider: multicast =
address (plus
+ port) and the group name. At minimum, you will hav=
e to run
+ components using a different group name. But wheth=
er to run them on
+ the same channel depends upon whether the communic=
ation performance
+ is critical for you or not. If it is, then it'd be=
best to run them
+ on different channels.
+
+
+
=
-
-
- Does JBoss Cache support cache persistence
- storage?
-
-
+
+
+ Does JBoss Cache support cache persistence
+ storage?
+
+
=
-
- Yes. JBoss Cache has a cache loader
- interface that supports cache persistence. See below for=
more FAQs on cache loaders.
-
-
-
+
+ Yes. JBoss Cache has a cache loader
+ interface that supports cache persistence. See bel=
ow for more FAQs on cache loaders.
+
+
+
=
-
-
- Does JBoss Cache support cache passivation/ overflow
- to a data store?
-
-
+
+
+ Does JBoss Cache support cache passivation/ over=
flow
+ to a data store?
+
+
=
-
- Yes. JBoss Cache uses the
- cache loader to support cache passivation/ overflow. See
- documentation on how to configure and use this feature.
-
-
-
+
+ Yes. JBoss Cache uses the
+ cache loader to support cache passivation/ overflo=
w. See
+ documentation on how to configure and use this fea=
ture.
+
+
+
=
-
-
- Is JBoss Cache thread safe?
-
+
+
+ Is JBoss Cache thread safe?
+
=
-
- Yes, it is thread safe.
-
-
+
+ Yes, it is thread safe.
+
+
=
-
-
- Does JBoss Cache support XA (2PC) transactions now?=
para>
-
+
+
+ Does JBoss Cache support XA (2PC) transactions n=
ow?
+
=
-
- No, although it is also on our to do list. Our intern=
al
- implementation does use a procedure similar to 2PC to co=
ordinate a
- transactions among different instances, but JBoss Cache =
is not an XA resource.
-
-
-
+
+ No, although it is also on our to do list. Our i=
nternal
+ implementation does use a procedure similar to 2PC=
to coordinate a
+ transactions among different instances, but JBoss =
Cache is not an XA resource.
+
+
+
=
-
-
- Which transaction managers are supported by
- JBoss Cache?
-
-
+
+
+ Which transaction managers are supported by
+ JBoss Cache?
+
+
=
-
- JBoss Cache supports any TransactionManager that is
- JTA
- compliant such as JBoss Transactions.
-
-
- While JBoss Cache does ships with a
- dummy transaction manager
- (org.jboss.cache.transaction.DummyTransactionMa=
nager), we do not
- recommend using this for production. It is not thread s=
afe, and is intended for internal testing only.
-
-
-
+
+ JBoss Cache supports any TransactionManager that=
is
+ J=
TA
+ compliant such asJBoss Transactions.
+
+
+ While JBoss Cache does ships with a
+ dummy transaction manager
+ (org.jboss.cache.transaction.DummyTransac=
tionManager), we do
+ not
+ recommend using this for production. It is not thr=
ead safe, and is intended for internal testing
+ only.
+
+
+
=
-
-
- How do I set up the cache to be transactional?
-
+
+
+ How do I set up the cache to be transactional?=
para>
+
=
-
- You either use the default transaction manager that s=
hips with JBoss AS
- or you have to implement the
- org.jboss.cache.transaction.TransactionManagerL=
ookup
- interface, and return an
- instance of your
- javax.transaction.TransactionManager
- implementation. The
- configuration property
- TransactionManagerLookupClass
- defines the class
- to be used by the cache to fetch a reference to a
- transaction manager. It is trivial to implement this int=
erface to support
- other transaction managers. Once this attribute is speci=
fied, the
- cache will look up the transaction context from this tra=
nsaction
- manager.
-
-
- The org.jboss.cache.transaction.GenericTransact=
ionManagerLookup class that ships
- with JBoss Cache is able to detect and bind to most popu=
lar transaction managers. See the GenericTransactionManagerLookup=
- javadocs for more information.
-
-
-
+
+ You either use the default transaction manager t=
hat ships with JBoss AS
+ or you have to implement the
+ org.jboss.cache.transaction.TransactionMa=
nagerLookup
+ interface, and return an
+ instance of your
+ javax.transaction.TransactionManager
+ implementation. The
+ configuration property
+ TransactionManagerLookupClass
+ defines the class
+ to be used by the cache to fetch a reference to a
+ transaction manager. It is trivial to implement th=
is interface to support
+ other transaction managers. Once this attribute is=
specified, the
+ cache will look up the transaction context from th=
is transaction
+ manager.
+
+
+ The
+ org.jboss.cache.transaction.GenericTransa=
ctionManagerLookup
+ class that ships
+ with JBoss Cache is able to detect and bind to mos=
t popular transaction managers. See the
+ GenericTransactionManagerLookup
+ javadocs for more information.
+
+
+
=
-
-
- How do I control the cache locking level?
-
+
+
+ How do I control the cache locking level?
+
=
-
- JBoss Cache lets you control the cache locking level =
through
- the transaction isolation level. This is configured thro=
ugh the
- attribute
- IsolationLevel
- . The transaction
- isolation levels correspond to database
- isolation levels, namely,
- NONE
- ,
- READ_UNCOMMITTED
- ,
- READ_COMMITTED
- ,
- REPEATABLE_READ
- , and
- SERIALIZABLE
- . Note that these isolation levels are ignored if optimi=
stic locking is used. For details, please
- refer
- to the
- user manual.
-
-
- As of JBoss Cache 3.x, when using the MVCC locking schem=
e, only READ_COMMITTED and
- REPEATABLE_READ are supported. Any o=
ther isolation level provided will either be upgraded
- or downgraded accordingly.
-
-
-
+
+ JBoss Cache lets you control the cache locking l=
evel through
+ the transaction isolation level. This is configure=
d through the
+ attribute
+ IsolationLevel
+ . The transaction
+ isolation levels correspond to database
+ isolation levels, namely,
+ NONE
+ ,
+ READ_UNCOMMITTED
+ ,
+ READ_COMMITTED
+ ,
+ REPEATABLE_READ
+ , and
+ SERIALIZABLE
+ . Note that these isolation levels are ignored if =
optimistic locking is used. For details,
+ please
+ refer
+ to the
+ user manual.
+
+
+ As of JBoss Cache 3.x, when using the MVCC locking=
scheme, only
+ READ_COMMITTED
+ and
+ REPEATABLE_READ
+ are supported. Any other isolation level provided =
will either be upgraded
+ or downgraded accordingly.
+
+
+
=
-
-
- How does JBoss Cache lock data for concurrent access?=
-
+
+
+ How does JBoss Cache lock data for concurrent ac=
cess?
+
=
-
- In JBoss Cache 2.x, by default pessimistic locking is=
used to lock data nodes, based on the isolation level
- configured. We also offer optimistic locking to allow fo=
r greater concurrency
- at
- the cost of slight processing overhead and performance. =
See the documentation for a more detailed
- discussion on concurrency and locking in JBoss Cache.
-
-
- In JBoss Cache 3.x, optimistic and pessimistic locking a=
re deprecated in favour of MVCC (multi-version concurrency
- control), which is far more efficient than either optimi=
stic or pessimistic locking. For a detailed discussion on
- our MVCC implementation, see this blog entry and=
this wiki pag=
e.
-
-
-
+
+ In JBoss Cache 2.x, by default pessimistic locki=
ng is used to lock data nodes, based on the
+ isolation level
+ configured. We also offer optimistic locking to al=
low for greater concurrency
+ at
+ the cost of slight processing overhead and perform=
ance. See the documentation for a more
+ detailed
+ discussion on concurrency and locking in JBoss Cac=
he.
+
+
+ In JBoss Cache 3.x, optimistic and pessimistic loc=
king are deprecated in favour of MVCC
+ (multi-version concurrency
+ control), which is far more efficient than either =
optimistic or pessimistic locking. For a
+ detailed discussion on
+ our MVCC implementation, see
+ this blog entry
+ andthis wiki page.
+
+
+
=
=
-
-
- How do I enable Optimistic Locking or MVCC in JBoss C=
ache?
-
+
+
+ How do I enable Optimistic Locking or MVCC in JB=
oss Cache?
+
=
-
-
- Please see the configuration section of the Users' Guide=
for details.
-
-
-
+
+
+ Please see the configuration section of the Users'=
Guide for details.
+
+
+
=
-
-
- Can I use the cache locking level even without a tran=
saction
- context?
-
-
+
+
+ Can I use the cache locking level even without a=
transaction
+ context?
+
+
=
-
- Yes. JBoss Cache controls the individual node locking=
behavior
- through the isolation level semantics. This means even i=
f you don't
- use a transaction, you can specify the lock level via is=
olation
- level. You can think of the node locking behavior outsid=
e of a
- transaction as if it is under transaction with
- auto_commit
- on.
-
-
-
+
+ Yes. JBoss Cache controls the individual node lo=
cking behavior
+ through the isolation level semantics. This means =
even if you don't
+ use a transaction, you can specify the lock level =
via isolation
+ level. You can think of the node locking behavior =
outside of a
+ transaction as if it is under transaction with
+ auto_commit
+ on.
+
+
+
=
-
-
-
- Does JBoss Cache support SELECT FOR UPDATE semantics?
-
-
+
+
+
+ Does JBoss Cache support
+ SELECT FOR UPDATE
+ semantics?
+
+
=
-
-
- Yes, but this is is only possible if you are running wi=
thin a JTA transaction and
- are using either MVCC or PE=
SSIMISTIC as your node locking scheme.
-
-
- To achieve SELECT FOR UPDATE semanti=
cs, simply do:
-
-
+
+ Yes, but this is is only possible if you are runni=
ng within a JTA transaction
+ and
+ are using either
+ MVCC
+ or
+ PESSIMISTIC
+ as your node locking scheme.
+
+
+ To achieve
+ SELECT FOR UPDATE
+ semantics, simply do:
+
+
-
-
+
+
=
-
-
- With replication (REPL_SYNC/REPL_ASYNC) or invalidati=
on (INVALIDATION_SYNC/INVALIDATION_ASYNC), how
- often does the cache broadcast messages over the network?
-
-
+
+
+ With replication (REPL_SYNC/REPL_ASYNC) or inval=
idation
+ (INVALIDATION_SYNC/INVALIDATION_ASYNC), how
+ often does the cache broadcast messages over the n=
etwork?
+
+
=
-
- If the updates are under transaction, then the broadc=
asts
- happen only when the transaction is about to commit (act=
ually
- during the prepare stage internally). That is, it will b=
e a batch
- update. However, if the operations are not under transac=
tion
- context, then each update will trigger replication. Note=
that this
- has performance implications if network latency is a pro=
blem.
-
-
-
+
+ If the updates are under transaction, then the b=
roadcasts
+ happen only when the transaction is about to commi=
t (actually
+ during the prepare stage internally). That is, it =
will be a batch
+ update. However, if the operations are not under t=
ransaction
+ context, then each update will trigger replication=
. Note that this
+ has performance implications if network latency is=
a problem.
+
+
+
=
-
-
- How can I do a mass removal?
-
+
+
+ How can I do a mass removal?
+
=
-
- If you do a cache.removeNode("/myroot"), it will recursively remove
- all the entries under "/myroot".
-
-
-
+
+ If you do acache.removeNode("/myroot")<=
/literal>, it will recursively remove
+ all the entries under "/myroot".
+
+
+
=
-
-
- Can I monitor and manage the JBoss Cache?
-
+
+
+ Can I monitor and manage the JBoss Cache?
+
=
-
- Yes, using a JMX console such as the one shipped with=
JBoss AS or Java 5's
- jconsole
- utility. See the chapter titled
- Management Information
- in the JBoss Cache Users' Guide for more details.
-
-
-
+
+ Yes, using a JMX console such as the one shipped=
with JBoss AS or Java 5's
+ jconsole
+ utility. See the chapter titled
+ Management Information
+ in the JBoss Cache Users' Guide for more details.
+
+
+
=
-
-
- Can I disable JBoss Cache management attributes?
-
+
+
+
+ JBoss Cache uses a
+ :
+ character in its object name. This causes problems=
with
+ my MBean server. What can I do about it?
+
+
+
+
+ This is something we have seen with some MBean ser=
vers. By default, JBoss Cache uses
+ jboss.cache:service=3DJBossCache
+ as a prefix to all objects it binds in JMX.
+ To work around this, use the
+ -Djbosscache.jmx.prefix
+ JVM parameter to pass in
+ an alternate prefix.
+
+
+
=
-
- Yes, you can. See the section on configuration in the=
JBoss Cache Users' Guide.
-
-
-
+
+
+ Can I disable JBoss Cache management attributes?=
+
=
-
-
- What happened to jboss-serialization.jar?
-
+
+ Yes, you can. See the section on configuration i=
n the JBoss Cache Users' Guide.
+
+
+
=
-
-
- As of JBoss Cache 2.0.0, the dependency on JBoss Seriali=
zation has been dropped since most of the
- benefits of JBoss Serialization are available in updated=
Java 5 VMs. Since JBoss Cache 2.0.0 is
- baselined on Java 5, there was no need to provide these =
benefits separately.
-
-
-
+
+
+ What happened to jboss-serialization.jar?
+
=
-
-
- Does JBoss Cache support partitioning?
-
+
+
+ As of JBoss Cache 2.0.0, the dependency on JBoss S=
erialization has been dropped since most of
+ the
+ benefits of JBoss Serialization are available in u=
pdated Java 5 VMs. Since JBoss Cache 2.0.0 is
+ baselined on Java 5, there was no need to provide =
these benefits separately.
+
+
+
=
-
- Not right now. JBoss Cache does not support partition=
ing that a
- user can configure to have different set of data residin=
g on
- different cache instances while still participating as a=
replication
- group.
-
-
- This is on the roadmap though, so do keep an eye on JBCACHE-60 =
if you are interested.
-
-
-
+
+
+ Does JBoss Cache support partitioning?
+
=
-
-
- Does JBoss Cache handle the concept of application cl=
assloading
- inside, say, a Java EE container?
-
-
+
+ Not right now. JBoss Cache does not support part=
itioning that a
+ user can configure to have different set of data r=
esiding on
+ different cache instances while still participatin=
g as a replication
+ group.
+
+
+ This is on the roadmap though, so do keep an eye on
+ JBCACHE-60
+ if you are interested.
+
+
+
=
-
- Application-specific classloading is used widely insi=
de a Java EE
- container. For example, a web application may require a =
new
- classloader to scope a specific version of the user libr=
ary.
- However, by default JBoss Cache is agnostic to the class=
loader. In
- general, this leads to two kinds of problems:
-
+
+
+ Does JBoss Cache handle the concept of applicati=
on classloading
+ inside, say, a Java EE container?
+
+
=
-
-
- Object instance is stored in cache1 and replica=
ted to
- cache2. As a result, the instance in cache2 is cre=
ated by the
- system classloader. The replication may fail if th=
e system
- classloader on cache2 does not have access to the =
required
- class. Even if replication doesn't fail, a user th=
read in cache2
- may not be able to access the object if the user t=
hread is
- expecting a type defined by the application classl=
oader.
-
-
+
+ Application-specific classloading is used widely=
inside a Java EE
+ container. For example, a web application may requ=
ire a new
+ classloader to scope a specific version of the use=
r library.
+ However, by default JBoss Cache is agnostic to the=
classloader. In
+ general, this leads to two kinds of problems:
+
=
-
- Object instance is created by thread 1 and will=
be
- accessed by thread 2 (with two different classload=
ers).
- JBoss Cache has no notion of the different classlo=
aders involved.
- As a result, you will have a
- ClassCastException
- . This is a standard
- problem in passing an object from one application =
space to
- another; JBoss Cache just adds a level of indirect=
ion in passing
- the object.
-
-
-
+
+
+ Object instance is stored in cache1 and =
replicated to
+ cache2. As a result, the instance in cache=
2 is created by the
+ system classloader. The replication may fa=
il if the system
+ classloader on cache2 does not have access=
to the required
+ class. Even if replication doesn't fail, a=
user thread in cache2
+ may not be able to access the object if th=
e user thread is
+ expecting a type defined by the applicatio=
n classloader.
+
+
=
- To solve the first kind of issue JBoss Cache uses a
- CacheMarshaller
- .
- Basically, this allows application code to register a cl=
assloader
- with a portion of the cache tree for use in handling obj=
ects
- replicated to that portion. See the
- CacheMarshaller
- section of
- the Users' Guide for more details.
-
+
+ Object instance is created by thread 1 a=
nd will be
+ accessed by thread 2 (with two different c=
lassloaders).
+ JBoss Cache has no notion of the different=
classloaders involved.
+ As a result, you will have a
+ ClassCastException
+ . This is a standard
+ problem in passing an object from one appl=
ication space to
+ another; JBoss Cache just adds a level of =
indirection in passing
+ the object.
+
+
+
=
- To solve the second kind of issue, you can use the t=
he UseLazyDeserialization configuration
- option in JBoss Cache, which wraps your objects in a Marshalledvalue wrapper. The MarshalledValue
- serializes and deserializes your object on demand, ensur=
ing the proper thread local context class loader is used each time.
-
-
-
+ To solve the first kind of issue JBoss Cache use=
s a
+ CacheMarshaller
+ .
+ Basically, this allows application code to registe=
r a classloader
+ with a portion of the cache tree for use in handli=
ng objects
+ replicated to that portion. See the
+ CacheMarshaller
+ section of
+ the Users' Guide for more details.
+
=
-
-
- Does JBoss Cache currently support pre-event and post=
-event
- notification?
-
-
+ To solve the second kind of issue, you can use t=
he the
+ UseLazyDeserialization
+ configuration
+ option in JBoss Cache, which wraps your objects in=
a
+ Marshalledvalue
+ wrapper. The
+ MarshalledValue
+ serializes and deserializes your object on demand,=
ensuring the proper thread local context
+ class loader is used each time.
+
+
+
=
-
- Yes. A boolean is passed in to each notification call=
back identifying whether the callback is
- before
- or after the event. See the
- org.jboss.cache.notifications.annotations.Cache=
Listener
- annotation for details.
-
-
-
+
+
+ Does JBoss Cache currently support pre-event and=
post-event
+ notification?
+
+
=
-
-
- How do I implement a custom listener to listen to
- cache events?
-
-
+
+ Yes. A boolean is passed in to each notification=
callback identifying whether the callback is
+ before
+ or after the event. See the
+ org.jboss.cache.notifications.annotations=
.CacheListener
+ annotation for details.
+
+
+
=
-
-
- See the Users' Guide on this subject.
-
-
-
+
+
+ How do I implement a custom listener to listen to
+ cache events?
+
+
=
-
-
- Can I use
- UseRegionBasedMarshalling
- attribute in JBoss Cache in order to get
- around ClassCastExceptions happening when accessing data=
in the cache that has just been redeployed?
-
-
+
+
+ See the Users' Guide on this subject.
+
+
+
=
-
- Yes, you can. Originally, cache Marshalling was desig=
ned as a
- workaround for those replicated caches that upon state t=
ransfer did not have access to the
- classloaders defining the objects in the cache.
-
+
+
+ Can I use
+ UseRegionBasedMarshalling
+ attribute in JBoss Cache in order to get
+ around ClassCastExceptions happening when accessin=
g data in the cache that has just been
+ redeployed?
+
+
=
- On each deployment, JBoss creates a new classloader p=
er the top level deployment artifact, for
- example an EAR. You also have to bear in mind that a cla=
ss in an application server is defined not
- only by the class name but also its classloader. So, ass=
uming that the cache is not deployed as part
- of your deployment, you could deploy an application and =
put instances of classes belonging to this
- deployment inside the cache. If you did a redeployment a=
nd try to do a get operation of the data
- previously put, this would result on a ClassCastExceptio=
n. This is because even though the class names
- are the same, the class definitions are not. The current=
classloader is different to the one when
- the classes were originally put.
-
+
+ Yes, you can. Originally, cache Marshalling was =
designed as a
+ workaround for those replicated caches that upon s=
tate transfer did not have access to the
+ classloaders defining the objects in the cache.
+
=
- By enabling marshalling, you can control the lifecycl=
e of the data in the cache and if on
- undeployment, you deactivate the region and unregister t=
he classloader that you'd have registered on
- deployment, you'd evict the data in the cache locally. T=
hat means that in the next deployment, the
- data won't be in the cache, therefore avoiding the probl=
em. Obviously, using marshalling to get
- around this problem is only recommended when you have so=
me kind of persistence backing where the data
- survives, for example using CacheLoaders, or when JBoss =
Cache is used as a second level cache in a
- persistence framework.
-
+ On each deployment, JBoss creates a new classloa=
der per the top level deployment artifact, for
+ example an EAR. You also have to bear in mind that=
a class in an application server is defined
+ not
+ only by the class name but also its classloader. S=
o, assuming that the cache is not deployed as
+ part
+ of your deployment, you could deploy an applicatio=
n and put instances of classes belonging to
+ this
+ deployment inside the cache. If you did a redeploy=
ment and try to do a get operation of the data
+ previously put, this would result on a ClassCastEx=
ception. This is because even though the class
+ names
+ are the same, the class definitions are not. The c=
urrent classloader is different to the one
+ when
+ the classes were originally put.
+
=
- To implement this feature, please follow the instruct=
ions indicated in the example located
- in the CacheMarshaller section of the Users' Guide. It's=
worth noting that instead of a
- ServletContextListener
- , you could add this code into an
- MBean
- that contained lifecycle methods, such as
- start()
- and
- stop()
- .
- The key would be for this MBean to depend on the target =
cache, so that it can operate as long as the
- cache is up and running.
-
-
-
+ By enabling marshalling, you can control the lif=
ecycle of the data in the cache and if on
+ undeployment, you deactivate the region and unregi=
ster the classloader that you'd have
+ registered on
+ deployment, you'd evict the data in the cache loca=
lly. That means that in the next deployment,
+ the
+ data won't be in the cache, therefore avoiding the=
problem. Obviously, using marshalling to get
+ around this problem is only recommended when you h=
ave some kind of persistence backing where the
+ data
+ survives, for example using CacheLoaders, or when =
JBoss Cache is used as a second level cache in
+ a
+ persistence framework.
+
=
-
-
+ To implement this feature, please follow the ins=
tructions indicated in the example located
+ in the CacheMarshaller section of the Users' Guide=
. It's worth noting that instead of a
+ ServletContextListener
+ , you could add this code into an
+ MBean
+ that contained lifecycle methods, such as
+ start()
+ and
+ stop()
+ .
+ The key would be for this MBean to depend on the t=
arget cache, so that it can operate as long as
+ the
+ cache is up and running.
+
+
+
=
-
- Eviction Policies
-
-
-
- Does JBoss Cache support eviction policies?
-
+
+
=
-
- Yes. JBoss Cache currently supports multiple eviction=
policies such as LRU, MRU, and FIFO.
- Users can also plug in their own eviction policy algorit=
hms. See user
- guide for details.
-
-
-
+
+ Eviction Policies
+
+
+
+ Does JBoss Cache support eviction policies?
+
=
-
-
- Does JBoss Cache's eviction policy operates in
- replication mode?
-
-
+
+ Yes. JBoss Cache currently supports multiple evi=
ction policies such as LRU, MRU, and FIFO.
+ Users can also plug in their own eviction policy a=
lgorithms. See user
+ guide for details.
+
+
+
=
-
- Yes and no. :-)
+
+
+ Does JBoss Cache's eviction policy operates in
+ replication mode?
+
+
=
- The eviction policy only operates in local mode. That=
is, nodes are
- only evicted locally. This may cause the cache contents =
not to be
- synchronized temporarily. But when a user tries to obtai=
n the cached
- contents of an evicted node and finds out that is null (=
e.g.,
- get
- returns null), it should get it from the
- other data source and re-populate the data in the cache.=
During this
- moment, the node content will be propagated and the cach=
e content
- will be in sync.
-
+
+ Yes and no. :-)
=
- However, you still can run eviction policies with cac=
he mode
- set to either
- REPL_SYNC
- or
- REPL_ASYNC
- . Depending on your use case, you can
- set multiple cache instances to have their own eviction =
policy
- (which are applied locally) or just have selected instan=
ces with
- eviction policies activated.
-
+ The eviction policy only operates in local mode.=
That is, nodes are
+ only evicted locally. This may cause the cache con=
tents not to be
+ synchronized temporarily. But when a user tries to=
obtain the cached
+ contents of an evicted node and finds out that is =
null (e.g.,
+ get
+ returns null), it should get it from the
+ other data source and re-populate the data in the =
cache. During this
+ moment, the node content will be propagated and th=
e cache content
+ will be in sync.
+
=
- Also note that, with cache loader option, a locally e=
victed
- node can also be persisted to the backend store and a us=
er can
- retrieve it from the store later on.
-
-
-
+ However, you still can run eviction policies wit=
h cache mode
+ set to either
+ REPL_SYNC
+ or
+ REPL_ASYNC
+ . Depending on your use case, you can
+ set multiple cache instances to have their own evi=
ction policy
+ (which are applied locally) or just have selected =
instances with
+ eviction policies activated.
+
=
-
-
- Does JBoss Cache support
- Region
- ?
-
-
+ Also note that, with cache loader option, a loca=
lly evicted
+ node can also be persisted to the backend store an=
d a user can
+ retrieve it from the store later on.
+
+
+
=
-
- Yes. JBoss Cache has the notion of region where a use=
r can
- configure the eviction policy parameters (e.g.,
- maxNodes
- or
- timeToIdleSeconds
- )
-
+
+
+ Does JBoss Cache support
+ Region
+ ?
+
+
=
- A region in JBoss Cache denotes a portion of tree hie=
rarchy,
- e.g., a fully qualified name (
- org.jboss.cache.Fqn
- ). For example,
- a user can define
- /org/jboss
- and
- /org/foocom
- as two separate regions. But note
- that you can configure the region programmatically now, =
i.e.,
- everything has to be configured through the xml file.
-
-
-
+
+ Yes. JBoss Cache has the notion of region where =
a user can
+ configure the eviction policy parameters (e.g.,
+ maxNodes
+ or
+ timeToIdleSeconds
+ )
+
=
-
-
- I have turned on the eviction policy, why do I still =
get "out
- of memory" (OOM) exception?
-
-
+ A region in JBoss Cache denotes a portion of tre=
e hierarchy,
+ e.g., a fully qualified name (
+ org.jboss.cache.Fqn
+ ). For example,
+ a user can define
+ /org/jboss
+ and
+ /org/foocom
+ as two separate regions. But note
+ that you can configure the region programmatically=
now, i.e.,
+ everything has to be configured through the xml fi=
le.
+
+
+
=
-
- OOM can happen when the speed of cache access exceeds=
the
- speed of eviction policy handling timer. Eviction policy=
handler
- will wake up every
- wakeUpInterval milliseconds (or wakeUpIntervalSeconds seconds, prior to 3.x)
- to process the eviction event queue. So when the queue s=
ize is full, it will create a
- backlog and cause out-of-memory exceptions to happen unl=
ess the eviction timer catches
- up. To address this problem, in addition to increase the=
VM heap
- size, you can also reduce the
- wakeUpInterval
- so the timer thread
- processes the queue more frequently.
-
-
-
-
-
-
- Cache Loaders
-
+
+
+ I have turned on the eviction policy, why do I s=
till get "out
+ of memory" (OOM) exception?
+
+
=
+
+ OOM can happen when the speed of cache access ex=
ceeds the
+ speed of eviction policy handling timer. Eviction =
policy handler
+ will wake up every
+ wakeUpInterval
+ milliseconds (or
+ wakeUpIntervalSeconds
+ seconds, prior to 3.x)
+ to process the eviction event queue. So when the q=
ueue size is full, it will create a
+ backlog and cause out-of-memory exceptions to happ=
en unless the eviction timer catches
+ up. To address this problem, in addition to increa=
se the VM heap
+ size, you can also reduce the
+ wakeUpInterval
+ so the timer thread
+ processes the queue more frequently.
+
+
+
+
+
+
+ Cache Loaders
+
=
-
-
- What is a cache loader?
-
=
-
- A cache loader is the connection of JBoss Cache to a
- (persistent) data store. The cache loader is called by J=
Boss Cache to
- fetch data from a store when that data is not in the cac=
he, and when
- modifications are made to data in the cache the Cache Lo=
ader is
- called to store those modifications back to the store.
-
+
+
+ What is a cache loader?
+
=
- In conjunction with eviction policies, JBoss Cache wi=
th a
- cache loader allows a user to maintain a bounded cache f=
or a large
- backend datastore. Frequently used data is fetched from =
the
- datastore into the cache, and the least used data is evi=
cted, in
- order to provide fast access to frequently accessed data=
. This is
- all configured through XML, and the programmer doesn't h=
ave to take
- care of loading and eviction.
-
+
+ A cache loader is the connection of JBoss Cache =
to a
+ (persistent) data store. The cache loader is calle=
d by JBoss Cache to
+ fetch data from a store when that data is not in t=
he cache, and when
+ modifications are made to data in the cache the Ca=
che Loader is
+ called to store those modifications back to the st=
ore.
+
=
- JBoss Cache currently ships with several cache loader
- implementations, including:
-
+ In conjunction with eviction policies, JBoss Cac=
he with a
+ cache loader allows a user to maintain a bounded c=
ache for a large
+ backend datastore. Frequently used data is fetched=
from the
+ datastore into the cache, and the least used data =
is evicted, in
+ order to provide fast access to frequently accesse=
d data. This is
+ all configured through XML, and the programmer doe=
sn't have to take
+ care of loading and eviction.
+
=
-
-
-
-
- org.jboss.cache.loader.FileCacheLoader=
- : this implementation uses the file
- system to store and retrieve data. JBoss Cache =
nodes are mapped
- to directories, subnodes to subdirectories etc.=
Attributes of
- a node are mapped to a data file
- inside the
- directory.
-
-
+ JBoss Cache currently ships with several cache l=
oader
+ implementations, including:
+
=
-
-
- org.jboss.cache.loader.jdbm.JdbmCacheL=
oader
- : this implementation is based on JDBM,
- an open source file-based transactional persist=
ence engine.
-
-
+
+
+
+
+ org.jboss.cache.loader.FileCa=
cheLoader
+ : this implementation uses the file
+ system to store and retrieve data. JBo=
ss Cache nodes are mapped
+ to directories, subnodes to subdirecto=
ries etc. Attributes of
+ a node are mapped to a data file
+ inside the
+ directory.
+
+
=
-
-
- org.jboss.cache.loader.bdbje.BdbjeCach=
eLoader
- : this implementation is based on the
- Oracle's Berkeley DB Java Edition database, a f=
ast and efficient
- transactional database. It uses a single file f=
or the entire
- store. Note that if you use the Berkeley DB cac=
he loader with
- JBoss Cache and wish to ship your product, you =
will have to acquire a
- commercial license from Oracle.
-
-
+
+
+ org.jboss.cache.loader.jdbm.J=
dbmCacheLoader
+ : this implementation is based on
+ JDBM,
+ an open source file-based transactiona=
l persistence engine.
+
+
=
-
-
- org.jboss.cache.loader.JDBCCacheLoader=
- : this implementation uses the relational datab=
ase as the persistent
- storage.
-
-
+
+
+ org.jboss.cache.loader.bdbje.=
BdbjeCacheLoader
+ : this implementation is based on the
+ Oracle's Berkeley DB Java Edition data=
base, a fast and efficient
+ transactional database. It uses a sing=
le file for the entire
+ store. Note that if you use the Berkel=
ey DB cache loader with
+ JBoss Cache and wish to ship your prod=
uct, you will have to acquire a
+ commercial license from
+ Oracle.
+
+
=
-
- And more. See the chapter on cache loaders i=
n the Users' Guide for more details.
-
-
-
-
-
+
+
+ org.jboss.cache.loader.JDBCCa=
cheLoader
+ : this implementation uses the relatio=
nal database as the persistent
+ storage.
+
+
=
-
-
- Is the FileCacheLoader recommended for production use=
?
-
+
+ And more. See the chapter on cache l=
oaders in the Users' Guide for more details.
+
+
+
+
+
+
=
-
-
- No, it is not. The FileCacheLoader has some severe limit=
ations which restrict its use in a production
- environment, or if used in such an environment, it shoul=
d be used with due care and sufficient
- understanding of these limitations.
-
- Due to the way the FileCacheLoader represen=
ts a tree structure on disk (directories and
- files) traversal is inefficient for deep trees.
-
- Usage on shared filesystems like NFS, Windo=
ws shares, etc. should be avoided as these do
- not implement proper file locking and can cause da=
ta corruption.
-
- Usage with an isolation level of NONE can c=
ause corrupt writes as multiple threads
- attempt to write to the same file.
-
- File systems are inherently not transaction=
al, so when attempting to use your cache in a
- transactional context, failures when writing to th=
e file (which happens during the commit phase)
- cannot be recovered.
-
-
+
+
+ Is the FileCacheLoader recommended for productio=
n use?
+
=
- As a rule of thumb, it is recommended that the FileCache=
Loader not be used in a highly concurrent,
- transactional or stressful environment, and its use is r=
estricted to testing.
-
-
-
+
+
+ No, it is not. The FileCacheLoader has some severe=
limitations which restrict its use in a
+ production
+ environment, or if used in such an environment, it=
should be used with due care and sufficient
+ understanding of these limitations.
+
+ Due to the way the FileCacheLoader r=
epresents a tree structure on disk
+ (directories and
+ files) traversal is inefficient for deep t=
rees.
+
+ Usage on shared filesystems like NFS=
, Windows shares, etc. should be avoided as
+ these do
+ not implement proper file locking and can =
cause data corruption.
+
+ Usage with an isolation level of NON=
E can cause corrupt writes as multiple threads
+ attempt to write to the same file.
+
+ File systems are inherently not tran=
sactional, so when attempting to use your
+ cache in a
+ transactional context, failures when writi=
ng to the file (which happens during the
+ commit phase)
+ cannot be recovered.
+
+
=
-
-
- Can writing to cache loaders be asynchronous?
-
+ As a rule of thumb, it is recommended that the Fil=
eCacheLoader not be used in a highly
+ concurrent,
+ transactional or stressful environment, and its us=
e is restricted to testing.
+
+
+
=
-
- Yes. Set the
- async
- attrobute to true. See the JBoss Cache Users' Guide for =
a more
- detailed discussion. By default though, all cache loader=
writes are
- synchronous and will block.
-
-
-
+
+
+ Can writing to cache loaders be asynchronous?
+
=
-
-
- Can I write my own cache loader ?
-
+
+ Yes. Set the
+ async
+ attrobute to true. See the JBoss Cache Users' Guid=
e for a more
+ detailed discussion. By default though, all cache =
loader writes are
+ synchronous and will block.
+
+
+
=
-
- Yes. A cache loader is a class implementing
- org.jboss.cache.loader.CacheLoader
- or extending
- org.jboss.cache.loader.AbstractCacheLoader
- . It is
- configured via the XML file (see JBoss Cache Users' Guid=
e).
-
-
-
+
+
+ Can I write my own cache loader ?
+
=
-
-
- Does a cache loader have to use a persistent store ?<=
/para>
-
+
+ Yes. A cache loader is a class implementing
+ org.jboss.cache.loader.CacheLoader
+ or extending
+ org.jboss.cache.loader.AbstractCacheLoade=
r
+ . It is
+ configured via the XML file (see JBoss Cache Users=
' Guide).
+
+
+
=
-
- No, a cache loader could for example fetch (and possi=
bly store)
- its data from a webdav-capable webserver. Another exampl=
e is a
- caching proxy server, which fetches contents from the we=
b. Note that
- an implementation of CacheLoader may not implement the '=
store'
- functionality in this case, but just the 'load'
- functionality.
-
-
-
+
+
+ Does a cache loader have to use a persistent sto=
re ?
+
=
-
-
- Do I have to pay to use Oracle's Berkeley DB CacheLoa=
der?
-
+
+ No, a cache loader could for example fetch (and =
possibly store)
+ its data from a webdav-capable webserver. Another =
example is a
+ caching proxy server, which fetches contents from =
the web. Note that
+ an implementation of CacheLoader may not implement=
the 'store'
+ functionality in this case, but just the 'load'
+ functionality.
+
+
+
=
-
- Not if you use it only for personal use. As soon as y=
ou
- distribute your product with BdbjeCacheLoader, you have =
to purchase
- a commercial license from Oracle. See details at
- h=
ttp://www.sleepycat.com/jeforjbosscache
-
- .
-
-
-
+
+
+ Do I have to pay to use Oracle's Berkeley DB Cac=
heLoader?
+
=
-
-
- Are there any tools available to monitor the Berkeley=
DB instance?
-
+
+ Not if you use it only for personal use. As soon=
as you
+ distribute your product with BdbjeCacheLoader, you=
have to purchase
+ a commercial license from Oracle. See details at
+ http://www.sleepycat.com/jeforjbosscache
+
+ .
+
+
+
=
-
-
- Yes. Oracle ships a JMX-based monitoring tool, called
-
- JEMonitor
-
- which can be downloaded from the Oracle website.
-
-
-
+
+
+ Are there any tools available to monitor the Ber=
keley DB instance?
+
=
-
-
- When tuning my Berkeley DB instance, where should I p=
ut my je.properties file?
-
+
+
+ Yes. Oracle ships a JMX-based monitoring tool, cal=
led
+
+ JEMonitor
+
+ which can be downloaded from the Oracle website.
+
+
+
=
-
-
- je.properties
- should reside in your Berkeley DB home directory. This i=
s the directory you pass
- in to the BDBJECacheLoader's
- location
- configuration property.
-
-
-
+
+
+ When tuning my Berkeley DB instance, where shoul=
d I put my je.properties file?
+
=
-
-
- Can I use more than one cache loader?
-
+
+
+ je.properties
+ should reside in your Berkeley DB home directory. =
This is the directory you pass
+ in to the BDBJECacheLoader's
+ location
+ configuration property.
+
+
+
=
-
- Yes. Within the CacheLoaderConfiguration XML
- element (see Users' Guide chapter on cache loaders) you =
can
- describe several cache loaders. The impact is that the c=
ache will
- look at all of the cache loaders in the order they've be=
en
- configured, until it finds a valid, non-null element of =
data. When
- performing writes, all cache loaders are written to (exc=
ept if the
- ignoreModifications element has been set to true for a s=
pecific
- cache loader.
-
-
-
+
+
+ Can I use more than one cache loader?
+
=
-
-
- Can I migrate a JDBCacheLoader or FileCacheLoader bas=
ed cache store containing data formatted with
- JBoss Cache 1.x.x to JBoss Cache 2.0 format?
-
-
+
+ Yes. Within the CacheLoaderConfiguration XML
+ element (see Users' Guide chapter on cache loaders=
) you can
+ describe several cache loaders. The impact is that=
the cache will
+ look at all of the cache loaders in the order they=
've been
+ configured, until it finds a valid, non-null eleme=
nt of data. When
+ performing writes, all cache loaders are written t=
o (except if the
+ ignoreModifications element has been set to true f=
or a specific
+ cache loader.
+
+
+
=
-
- Yes. See "Transforming Cache Loaders" section within =
the "Cache Loaders" section located in the
- JBoss Cache Users' Guide.
-
-
-
+
+
+ Can I migrate a JDBCacheLoader or FileCacheLoade=
r based cache store containing data formatted
+ with
+ JBoss Cache 1.x.x to JBoss Cache 2.0 format?
+
+
=
-
-
-
- Is the TCPDelegatingCacheLoader resilient to TCPCacheSer=
ver restarts?
-
-
+
+ Yes. See "Transforming Cache Loaders" section wi=
thin the "Cache Loaders" section located in
+ the
+ JBoss Cache Users' Guide.
+
+
+
=
-
-
- As of JBoss Cache 2.1.0, the answer is yes. See the User=
s' Guide for details on how to configure and
- tune
- your retries and wait period for reestablishing the TCP =
connection.
-
-
- Prior to that, restarting the TCPCacheServer would also =
mean
- restarting your application that uses the cache.
-
-
-
+
+
+
+ Is the TCPDelegatingCacheLoader resilient to TCPCa=
cheServer restarts?
+
+
=
-
-
-
- Troubleshooting
-
+
+
+ As of JBoss Cache 2.1.0, the answer is yes. See th=
e Users' Guide for details on how to configure
+ and
+ tune
+ your retries and wait period for reestablishing th=
e TCP connection.
+
+
+ Prior to that, restarting the TCPCacheServer would=
also mean
+ restarting your application that uses the cache.
+
+
+
=
-
-
- I am having problems getting JBoss Cache to work, whe=
re can I get information on troubleshooting?
-
-
-
- Troubleshooting section can be found in the following
- wiki link
- .
-
-
-
-
-
+
+
+
+ Troubleshooting
+
+
+
+
+ I am having problems getting JBoss Cache to work=
, where can I get information on
+ troubleshooting?
+
+
+
+ Troubleshooting section can be found in the foll=
owing
+ wiki link
+ .
+
+
+
+
+
--===============0294020633329715956==--