From do-not-reply at jboss.org Tue Feb 16 10:46:00 2010 Content-Type: multipart/mixed; boundary="===============2042008416175039088==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: exo-jcr-commits at lists.jboss.org Subject: [exo-jcr-commits] exo-jcr SVN: r1838 - in jcr/trunk/docs/reference/en/src/main/docbook: en-us and 1 other directories. Date: Tue, 16 Feb 2010 10:45:59 -0500 Message-ID: <201002161545.o1GFjxYk011222@svn01.web.mwc.hst.phx2.redhat.com> --===============2042008416175039088== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sergiykarpenko Date: 2010-02-16 10:45:59 -0500 (Tue, 16 Feb 2010) New Revision: 1838 Added: jcr/trunk/docs/reference/en/src/main/docbook/en-us/ jcr/trunk/docs/reference/en/src/main/docbook/en-us/master.xml jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/ jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/architecture.= xml jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/configuration= .xml jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/intro.xml jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/lock-manager-= config.xml Removed: jcr/trunk/docs/reference/en/src/main/docbook/master.xml jcr/trunk/docs/reference/en/src/main/docbook/modules/ Log: EXOJCR-490: all docs moved to en-us Added: jcr/trunk/docs/reference/en/src/main/docbook/en-us/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 --- jcr/trunk/docs/reference/en/src/main/docbook/en-us/master.xml = (rev 0) +++ jcr/trunk/docs/reference/en/src/main/docbook/en-us/master.xml 2010-02-1= 6 15:45:59 UTC (rev 1838) @@ -0,0 +1,75 @@ + + + + + + + eXoJCR Reference Manual + + + + Java Content Repository and Extension services + + + 2009, 2010 + + eXoPlatform + + + + + + + + + + + + + + + + + Added: jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/architect= ure.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 --- jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/architecture= .xml (rev 0) +++ jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/architecture= .xml 2010-02-16 15:45:59 UTC (rev 1838) @@ -0,0 +1,14 @@ + + + + + + + JCR + eXoJCR + etc + + + Basic concepts of eXoJCR + Added: jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/configura= tion.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 --- jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/configuratio= n.xml (rev 0) +++ jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/configuratio= n.xml 2010-02-16 15:45:59 UTC (rev 1838) @@ -0,0 +1,20 @@ + + + + + + + + JCR + + eXoJCR + + etc + + + + Configuration of the eXoJCR + + JCR configuration + Added: jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/intro.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 --- jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/intro.xml = (rev 0) +++ jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/intro.xml 20= 10-02-16 15:45:59 UTC (rev 1838) @@ -0,0 +1,18 @@ + + + + + + + + JCR + eXoJCR + etc + developer guide + + + + Introduction + + Added: jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/lock-mana= ger-config.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 --- jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/lock-manager= -config.xml (rev 0) +++ jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/lock-manager= -config.xml 2010-02-16 15:45:59 UTC (rev 1838) @@ -0,0 +1,442 @@ + + +
+ + LockManager configuration + + + + Introduction + + What LockManager does? + + In common words, LockManager stores lock objects, so it can give + Lock object or can release it, etc. + + Also LockManager is responsible for removing Locks that live too + long. This parameter may be configured with "time-out" property. + + JCR provide two base implementation of LockManager: + + + + org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;= + + + + org.exoplatform.services.jcr.impl.core.lock.jbosscache.Cache= ableLockManagerImpl; + + + + In this article we will talk mostly about + CacheableLockManagerImpl. + + You can enable LockManager by adding lock-manager-configuration = to + workspace-configuration. + + For example: + + <workspace name=3D"ws"> + ... + <lock-manager class=3D"org.exoplatform.services.jcr.impl.core.lock.j= bosscache.CacheableLockManagerImpl"> + <properties> + <property name=3D"time-out" value=3D"15m" /> + ... + </properties> + </lock-manager> = + ... +</workspace> + + + + LockManagerImpl + + LockManagerImpl is simple implementation of LockManager, and also + faster than CacheableLockManager. It stores Lock objects in HashMap and + may also persist Locks if LockPersister is configured. LockManagerImpl= do + not support replication in any way. + + See LockManagerImpl + configuration + + + + CacheableLockManagerImpl + + CacheableLockManagerImpl stores Lock object in JBoss-cache, so L= ocks + are replicable and affects on cluster, not only a single node. Also + JBoss-cache has JDBCCacheLoader, so locks will be stored to + database. + + Both implementation supports Expired Locks removing. There is + LockRemover - separate thread, that periodically ask LockManager for L= ocks + that lives to much and must be removed. So, timeout for LockRemover ma= y be + set as follows, default value is 30m. + + <properties> + <property name=3D"time-out" value=3D"10m" /> + ... +</properties> + + Replication requirements are same as for Cache + + + [TODO add link to replication configuration] + + + + Configuration + + Replication requirements are same as for Cache + + Common tips: + + + + clusterName ("jbosscache-cluster-name") must be unique; + + + + cache.jdbc.table.name must be unique per datasource; + + + + cache.jdbc.fqn.type must and cache.jdbc.node.type must be + configured according to used database; + + + + There is few ways how to configure CacheableLockManagerImpl, a= nd + all of them configures JBoss-cache and JDBCCacheLoader. + + See ht= tp://community.jboss.org/wiki/JBossCacheJDBCCacheLoader + + + + Simple JbossCache Configuraion + + First one is - put JbossCache configuraion file path to + CacheableLockManagerImpl + + + This configuration is not so good, as you can think. Becau= se + repository may contain many workspaces, and each workspace must + contain LockManager configuration, and LockManager config may + contain JbossCache config file. So total configuration is growing + up. But it is usefull if we want a single LockManager with speci= al + configuration. + + + Config is: + + <lock-manager class=3D"org.exoplatform.services.j= cr.impl.core.lock.jbosscache.CacheableLockManagerImpl"> + <properties> + <property name=3D"time-out" value=3D"15m" /> + <property name=3D"jbosscache-configuration" value=3D"conf/standalo= ne/cluster/test-jbosscache-lock-config.xml" /> + </properties> +</lock-manager> + + test-jbosscache-lock-config.xml<?xml versio= n=3D"1.0" encoding=3D"UTF-8"?> +<jbosscache xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xml= ns=3D"urn:jboss:jbosscache-core:config:3.2"> + + <locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPare= ntForChildInsertRemove=3D"false" lockAcquisitionTimeout=3D"20000" /> + + <clustering mode=3D"replication" clusterName=3D"JBoss-Cache-Lock-Clust= er_Name"> + <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" nonBlo= cking=3D"true" /> + <jgroupsConfig> + + <TCP bind_addr=3D"127.0.0.1" start_port=3D"9800" loopback=3D"true" r= ecv_buf_size=3D"20000000" send_buf_size=3D"640000" discard_incompatible_pac= kets=3D"true" + max_bundle_size=3D"64000" max_bundle_timeout=3D"30" use_incoming_packe= t_handler=3D"true" enable_bundling=3D"false" use_send_queues=3D"false" sock= _conn_timeout=3D"300" + skip_suspected_members=3D"true" use_concurrent_stack=3D"true" thread_p= ool.enabled=3D"true" thread_pool.min_threads=3D"1" thread_pool.max_threads= =3D"25" + thread_pool.keep_alive_time=3D"5000" thread_pool.queue_enabled=3D"fals= e" thread_pool.queue_max_size=3D"100" thread_pool.rejection_policy=3D"run" + oob_thread_pool.enabled=3D"true" oob_thread_pool.min_threads=3D"1" oob= _thread_pool.max_threads=3D"8" oob_thread_pool.keep_alive_time=3D"5000" + oob_thread_pool.queue_enabled=3D"false" oob_thread_pool.queue_max_size= =3D"100" oob_thread_pool.rejection_policy=3D"run" /> + <MPING timeout=3D"2000" num_initial_members=3D"2" mcast_port=3D"3454= 0" bind_addr=3D"127.0.0.1" mcast_addr=3D"224.0.0.1" /> + + + <MERGE2 max_interval=3D"30000" min_interval=3D"10000" /> + <FD_SOCK /> + <FD max_tries=3D"5" shun=3D"true" timeout=3D"10000" /> + <VERIFY_SUSPECT timeout=3D"1500" /> + <pbcast.NAKACK discard_delivered_msgs=3D"true" gc_lag=3D"0" retransm= it_timeout=3D"300,600,1200,2400,4800" use_mcast_xmit=3D"false" /> + <UNICAST timeout=3D"300,600,1200,2400,3600" /> + <pbcast.STABLE desired_avg_gossip=3D"50000" max_bytes=3D"400000" sta= bility_delay=3D"1000" /> + <pbcast.GMS join_timeout=3D"5000" print_local_addr=3D"true" shun=3D"= false" view_ack_collection_timeout=3D"5000" view_bundling=3D"true" /> + <FRAG2 frag_size=3D"60000" /> + <pbcast.STREAMING_STATE_TRANSFER /> + <pbcast.FLUSH timeout=3D"0" /> + + </jgroupsConfig + + <sync /> + </clustering> + + <loaders passivation=3D"false" shared=3D"true"> + <preload> + <node fqn=3D"/" /> + </preload> + <loader class=3D"org.jboss.cache.loader.JDBCCacheLoader" async=3D"fal= se" fetchPersistentState=3D"false" ignoreModifications=3D"false" purgeOnSta= rtup=3D"false"> + <properties> + cache.jdbc.table.name=3Djcrlocks_ws + cache.jdbc.table.create=3Dtrue + cache.jdbc.table.drop=3Dfalse + cache.jdbc.table.primarykey=3Djcrlocks_ws_pk + cache.jdbc.fqn.column=3Dfqn + cache.jdbc.fqn.type=3DVARCHAR(512) + cache.jdbc.node.column=3Dnode + cache.jdbc.node.type=3D<BLOB> = + cache.jdbc.parent.column=3Dparent + cache.jdbc.datasource=3Djdbcjcr + </properties> + </loader> + + </loaders> + +</jbosscache> + + Configuration requirements: + + + + <clustering mode=3D"replication" + clusterName=3D"JBoss-Cache-Lock-Cluster_Name"> - cluster name= must + be unique; + + + + cache.jdbc.table.name must be unique per + datasource; + + + + cache.jdbc.node.type and + cache.jdbc.fqn.type must be configured according = to + using database. See . + + + + + + Template JBossCache Configuration + + Second one is - use template JBoss-cache configuration for all + LockManagers + + Lock template configuration + + test-jbosscache-lock.xml + + <?xml version=3D"1.0" encoding=3D"UTF-8"?> +<jbosscache xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xml= ns=3D"urn:jboss:jbosscache-core:config:3.1"> + + <locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPa= rentForChildInsertRemove=3D"false" + lockAcquisitionTimeout=3D"20000" /> + + <clustering mode=3D"replication" clusterName=3D"${jbosscache-cluster= -name}"> + <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" /&= gt; + <jgroupsConfig multiplexerStack=3D"jcr.stack" /> + <sync /> + </clustering> + + <loaders passivation=3D"false" shared=3D"true"> + <!-- All the data of the JCR locks needs to be loaded at startup = --> + <preload> + <node fqn=3D"/" /> + </preload> = + <!-- + For another cache-loader class you should use another template with + cache-loader specific parameters + -> + <loader class=3D"org.jboss.cache.loader.JDBCCacheLoader" async=3D= q"false" fetchPersistentState=3D"false" + ignoreModifications=3D"false" purgeOnStartup=3D"false"> + <properties> + cache.jdbc.table.name=3D${jbosscache-cl-cache.jdbc.table.name} + cache.jdbc.table.create=3D${jbosscache-cl-cache.jdbc.table.cre= ate} + cache.jdbc.table.drop=3D${jbosscache-cl-cache.jdbc.table.drop} + cache.jdbc.table.primarykey=3D${jbosscache-cl-cache.jdbc.table= .primarykey} + cache.jdbc.fqn.column=3D${jbosscache-cl-cache.jdbc.fqn.column} + cache.jdbc.fqn.type=3D${jbosscache-cl-cache.jdbc.fqn.type} + cache.jdbc.node.column=3D${jbosscache-cl-cache.jdbc.node.colum= n} + cache.jdbc.node.type=3D${jbosscache-cl-cache.jdbc.node.type} + cache.jdbc.parent.column=3D${jbosscache-cl-cache.jdbc.parent.c= olumn} + cache.jdbc.datasource=3D${jbosscache-cl-cache.jdbc.datasource} + </properties> + </loader> + </loaders> +</jbosscache> + + As you see, all configurable paramaters filled by templates and + will be replaced by LockManagers conf parameters: + + <lock-manager class=3D"org.exoplatform.services.j= cr.impl.core.lock.jbosscache.CacheableLockManagerImpl"> + <properties> + <property name=3D"time-out" value=3D"15m" /> + <property name=3D"jbosscache-configuration" value=3D"test-jbossca= che-lock.xml" /> + <property name=3D"jgroups-configuration" value=3D"udp-mux.xml" /&= gt; + <property name=3D"jgroups-multiplexer-stack" value=3D"true" /> + <property name=3D"jbosscache-cluster-name" value=3D"JCR-cluster-l= ocks-ws" /> + <property name=3D"jbosscache-cl-cache.jdbc.table.name" value=3D"j= crlocks_ws" /> + <property name=3D"jbosscache-cl-cache.jdbc.table.create" value=3D= "true" /> + <property name=3D"jbosscache-cl-cache.jdbc.table.drop" value=3D"f= alse" /> + <property name=3D"jbosscache-cl-cache.jdbc.table.primarykey" valu= e=3D"jcrlocks_ws_pk" /> + <property name=3D"jbosscache-cl-cache.jdbc.fqn.column" value=3D"f= qn" /> + <property name=3D"jbosscache-cl-cache.jdbc.fqn.type" value=3D"AUT= O"/> + <property name=3D"jbosscache-cl-cache.jdbc.node.column" value=3D"= node" /> + <property name=3D"jbosscache-cl-cache.jdbc.node.type" value=3D"AU= TO"/> + <property name=3D"jbosscache-cl-cache.jdbc.parent.column" value= =3D"parent" /> + <property name=3D"jbosscache-cl-cache.jdbc.datasource" value=3D"j= dbcjcr" /> + </properties> +</lock-manager> + + Configuration requirements: + + jbosscache-cl-cache.jdbc.fqn.column and + jbosscache-cl-cache.jdbc.node.type is nothing e= lse + as cache.jdbc.fqn.type and cache.jdbc.node.type in JBoss-Cache + configuration. You can set those data types according to datab= ase + type (See ) or set it as + AUTO (or do not set at all) and data type will by detected + automaticaly. + + + + as you see, jgroups-configuration moved to separate conf= ig + file - udp-mux.xml; In our case udp-mux.xml is common JGroup + config for all components (QueryHandler, cache, LockManager). = But + we, still, can create own config. + + + + our-udp-mux.xml<protocol_stacks> + <stack name=3D"jcr.stack"> + <config> + <UDP mcast_addr=3D"228.10.10.10" mcast_port=3D"45588" tos=3D"8= " ucast_recv_buf_size=3D"20000000" + ucast_send_buf_size=3D"640000" mcast_recv_buf_size=3D"25000000= " mcast_send_buf_size=3D"640000" loopback=3D"false" + discard_incompatible_packets=3D"true" max_bundle_size=3D"64000= " max_bundle_timeout=3D"30" + use_incoming_packet_handler=3D"true" ip_ttl=3D"2" enable_bundl= ing=3D"true" enable_diagnostics=3D"true" + thread_naming_pattern=3D"cl" use_concurrent_stack=3D"true" thr= ead_pool.enabled=3D"true" thread_pool.min_threads=3D"2" + thread_pool.max_threads=3D"8" thread_pool.keep_alive_time=3D"5= 000" thread_pool.queue_enabled=3D"true" + thread_pool.queue_max_size=3D"1000" thread_pool.rejection_poli= cy=3D"discard" oob_thread_pool.enabled=3D"true" + oob_thread_pool.min_threads=3D"1" oob_thread_pool.max_threads= =3D"8" oob_thread_pool.keep_alive_time=3D"5000" + oob_thread_pool.queue_enabled=3D"false" oob_thread_pool.queue_= max_size=3D"100" oob_thread_pool.rejection_policy=3D"Run" /> + + <PING timeout=3D"2000" num_initial_members=3D"3" /> + <MERGE2 max_interval=3D"30000" min_interval=3D"10000" /> + <FD_SOCK /> + <FD timeout=3D"10000" max_tries=3D"5" shun=3D"true" /> + <VERIFY_SUSPECT timeout=3D"1500" /> + <BARRIER /> + <pbcast.NAKACK use_stats_for_retransmission=3D"false" exponent= ial_backoff=3D"150" use_mcast_xmit=3D"true" + gc_lag=3D"0" retransmit_timeout=3D"50,300,600,1200" discard_de= livered_msgs=3D"true" /> + <UNICAST timeout=3D"300,600,1200" /> + <pbcast.STABLE stability_delay=3D"1000" desired_avg_gossip=3D"= 50000" max_bytes=3D"1000000" /> + <VIEW_SYNC avg_send_interval=3D"60000" /> + <pbcast.GMS print_local_addr=3D"true" join_timeout=3D"3000" sh= un=3D"false" view_bundling=3D"true" /> + <FC max_credits=3D"500000" min_threshold=3D"0.20" /> + <FRAG2 frag_size=3D"60000" /> + <!--pbcast.STREAMING_STATE_TRANSFER /--> + <pbcast.STATE_TRANSFER /> + <!-- pbcast.FLUSH /--> + </config> + </stack> +</protocol_stacks> + + + + Data Types in Different Databases</tit= le> + + <table> + <title>Fqn type and node type in different databases + + + + + DataBase name + + Node data type + + FQN data type + + + + + + default + + BLOB + + VARCHAR(512) + + + + HSSQL + + OBJECT + + VARCHAR(512) + + + + MySQL + + LONGBLOB + + VARCHAR(512) + + + + ORACLE + + BLOB + + VARCHAR2(512) + + + + PostgreSQL + + bytea + + VARCHAR(512) + + + + MSSQL + + VARBINARY(MAX) + + VARCHAR(512) + + + + DB2 + + BLOB + + VARCHAR(512) + + + + Sybase + + IMAGE + + VARCHAR(512) + + + + Ingres + + long byte + + VARCHAR(512) + + + + + + +
Deleted: jcr/trunk/docs/reference/en/src/main/docbook/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 --- jcr/trunk/docs/reference/en/src/main/docbook/master.xml 2010-02-16 15:3= 7:59 UTC (rev 1837) +++ jcr/trunk/docs/reference/en/src/main/docbook/master.xml 2010-02-16 15:4= 5:59 UTC (rev 1838) @@ -1,75 +0,0 @@ - - - - - - - eXoJCR Reference Manual - - - - Java Content Repository and Extension services - - - 2009, 2010 - - eXoPlatform - - - - - - - - - - - - - - - - - --===============2042008416175039088==--