Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Commits List »

[hibernate-commits] Hibernate SVN: r20209 - in
 search/trunk/hibernate-search/src/main: docbook/en-US/modules
 and 1 other directories.

hibernate-commits

2010-08-20


Author LoginPost Reply
Author: hardy.ferentschik
Date: 2010-08-20 09:34:56 -0400 (Fri, 20 Aug 2010)
New Revision: 20209

Added:
 search/trunk/hibernate-search/src/main/docbook/en-US/modules/jmx.xml
Modified:
 search/trunk/hibernate-search/src/main/docbook/en-US/master.xml
 search/trunk/hibernate-search/src/main/java/org/hibernate/search/stat/Statistics.java
Log:
HSEARCH-278 added docs

Modified: search/trunk/hibernate-search/src/main/docbook/en-US/master.xml
===================================================================
--- search/trunk/hibernate-search/src/main/docbook/en-US/master.xml  2010-08-20 13:31:48 UTC (rev 20208)
+++ search/trunk/hibernate-search/src/main/docbook/en-US/master.xml  2010-08-20 13:34:56 UTC (rev 20209)
@@(protected) @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id$ -->
<!--
 ~ Hibernate, Relational Persistence for Idiomatic Java
 ~
@@(protected) @@
 <xi:include href="modules/optimize.xml"
         xmlns:xi="http://www.w3.org/2001/XInclude" />

+ <xi:include href="modules/jmx.xml"
+         xmlns:xi="http://www.w3.org/2001/XInclude" />
+
 <xi:include href="modules/lucene-native.xml"
         xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>

Added: search/trunk/hibernate-search/src/main/docbook/en-US/modules/jmx.xml
===================================================================
--- search/trunk/hibernate-search/src/main/docbook/en-US/modules/jmx.xml                  (rev 0)
+++ search/trunk/hibernate-search/src/main/docbook/en-US/modules/jmx.xml  2010-08-20 13:34:56 UTC (rev 20209)
@@(protected) @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="search-jmx">
+ <title>JMX integration</title>
+
+ <para>Hibernate Search offers, similar to Hibernate Core, the ability to
+ manage several aspects of Search via JMX. In order to use this functionality
+ you have to set the <literal>hibernate.search.jmx_enabled</literal> property
+ in your configuration. Setting this property will give you access to the
+ Mbeans <classname>StatisticsInfoMBean</classname>,
+ <classname>IndexControlMBean</classname> and
+ <classname>IndexingProgressMonitorMBean</classname>. Depending on the
+ configuration and state of Search not all beans are available at all times.
+ Lets have a closer look at the different MBeans.</para>
+
+ <section>
+   <title>StatisticsInfoMBean</title>
+
+   <para>This MBean gives you access to information like the total number of
+   indexed entities as well as total and average Lucene query and object
+   loading times. Setting the property
+   <literal>hibernate.search.jmx_enabled</literal> will automatically
+   register the MBean, however query and object loading timings will not be
+   taken unless you also specify
+   <literal>hibernate.search.generate_statistics</literal> in your
+   configuration. The statistics offered by
+   <classname>StatisticsInfoMBean</classname> are also available
+   programmatically via <code>SearchFactory.getStatistics()</code>.</para>
+ </section>
+
+ <section>
+   <title>IndexControlMBean</title>
+
+   <para>This MBean allows to build, optimize and purge the index for a given
+   entity. Indexing occurs via the mass indexing API (see <xref
+   linkend="search-batchindex-massindexer" />). A requirement for this bean
+   to be registered in JMX is, that the Hibernate
+   <classname>SessionFactory</classname> is bound to JNDI via the
+   <literal>hibernate.session_factory_name</literal> property. Refer to the
+   Hibernate Core manual for more information on how to configure JNDI. The
+   <classname>IndexControlMBean</classname> and its API have to be considered
+   experimental.</para>
+ </section>
+
+ <section>
+   <title>IndexingProgressMonitorMBean</title>
+
+   <para>This MBean is an implementation
+   <classname>MassIndexerProgressMonitor</classname> interface. If
+   <literal>hibernate.search.jmx_enabled</literal> is enabled and the mass
+   indexer API is used the indexing progress can be followed via this bean.
+   The bean will only be bound to JMX while indexing is in progress. Once
+   indexing is completed the MBean is not longer available.</para>
+ </section>
+</chapter>

Modified: search/trunk/hibernate-search/src/main/java/org/hibernate/search/stat/Statistics.java
===================================================================
--- search/trunk/hibernate-search/src/main/java/org/hibernate/search/stat/Statistics.java  2010-08-20 13:31:48 UTC (rev 20208)
+++ search/trunk/hibernate-search/src/main/java/org/hibernate/search/stat/Statistics.java  2010-08-20 13:34:56 UTC (rev 20209)
@@(protected) @@
*/
package org.hibernate.search.stat;

-import java.util.List;
import java.util.Map;
import java.util.Set;


_______________________________________________
hibernate-commits mailing list
hibernate-commits@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-commits
©2008 gg3721.com - Jax Systems, LLC, U.S.A.