Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C261C200BAD for ; Tue, 25 Oct 2016 08:28:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C0F91160AF3; Tue, 25 Oct 2016 06:28:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B8D33160AE6 for ; Tue, 25 Oct 2016 08:28:07 +0200 (CEST) Received: (qmail 89354 invoked by uid 500); 25 Oct 2016 06:28:06 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 89345 invoked by uid 99); 25 Oct 2016 06:28:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 06:28:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 73323C00A6 for ; Tue, 25 Oct 2016 06:28:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id C7yFn-z4mBZ5 for ; Tue, 25 Oct 2016 06:28:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 7C0895F570 for ; Tue, 25 Oct 2016 06:28:03 +0000 (UTC) Received: (qmail 64373 invoked by uid 99); 25 Oct 2016 06:20:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 06:20:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BF160E02E4; Tue, 25 Oct 2016 06:20:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: sbawaskar@apache.org To: commits@geode.incubator.apache.org Date: Tue, 25 Oct 2016 06:20:32 -0000 Message-Id: <32a5b1c97817443497d3b8fc71a95313@git.apache.org> In-Reply-To: <72eff08b2f4d45f38b89f2a9d2e67e60@git.apache.org> References: <72eff08b2f4d45f38b89f2a9d2e67e60@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [26/50] [abbrv] incubator-geode git commit: GEODE-1968 - set aside Hibernate Cache docs until feature is mainstreamed. archived-at: Tue, 25 Oct 2016 06:28:08 -0000 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd8927cb/geode-docs/tools_modules/hibernate_cache/installing_gemfire_and_module.html.md.erb ---------------------------------------------------------------------- diff --git a/geode-docs/tools_modules/hibernate_cache/installing_gemfire_and_module.html.md.erb b/geode-docs/tools_modules/hibernate_cache/installing_gemfire_and_module.html.md.erb deleted file mode 100644 index a3bc6b9..0000000 --- a/geode-docs/tools_modules/hibernate_cache/installing_gemfire_and_module.html.md.erb +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Installing the Hibernate Cache Module ---- - - - -The Hibernate module is included in the Apache Geode installation package. - -1. If you have not done so, download and install [Hibernate](http://www.hibernate.org/). Apache Geode supports Hibernate 3.3 and later (up to version 3.6.10) for use with the Hibernate Cache module. Apache Geode does not currently support Hibernate 4.x for use with the Hibernate Cache module. -2. The Hibernate module is included in the Apache Geode installation package. You can find the module in the `/tools/Modules` directory, in a zip file that includes the version and the string `Hibernate`. `` is the location where you installed Geode. -3. Make sure that `/lib/geode-dependencies.jar` is part of the CLASSPATH when you run Hibernate. Alternatively, you can place the `geode-dependencies.jar` in a location that is accessible to your Hibernate application. - - http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd8927cb/geode-docs/tools_modules/hibernate_cache/setting_up_the_module.html.md.erb ---------------------------------------------------------------------- diff --git a/geode-docs/tools_modules/hibernate_cache/setting_up_the_module.html.md.erb b/geode-docs/tools_modules/hibernate_cache/setting_up_the_module.html.md.erb deleted file mode 100644 index 8d00c34..0000000 --- a/geode-docs/tools_modules/hibernate_cache/setting_up_the_module.html.md.erb +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Setting Up the Geode Hibernate Cache Module ---- - - - -Edit the `hibernate.cfg.xml` file to use the Hibernate Cache module. - -1. **Turn on L2 Cache** - - In the `hibernate.cfg.xml` file, turn on the L2 cache and identify the Geode locator(s): - - ``` pre - true - host1[port1],host2[port2] - ``` - - Change `host1` and `host2 ` to the hostnames (or IP addresses) for each of the locators; `port1` and `port2 `are the ports for each of the locators. - -2. **Set Region Factory or Cache Provider** - - Associate the region factory class with GemFireRegionFactory: - - ``` pre - - org.apache.geode.modules.hibernate.GemFireRegionFactory - - ``` - -3. **Determine Cache Usage Mode** - - Determine the cache usage mode for the entities in each region. There are four types of usage modes: - - | Mode | Description | - |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| - | `read-only` | This mode is used when you do not plan on modifying the data already stored in your persistent storage. | - | `read-write` | This mode is used when you plan to both read from and write to your data. | - | `nonstrict-read-write` | This mode is a special read/write mode that has faster write performance; however, only use this mode if no more than one client will update content at a time. | - | `transactional` | This mode allows for transaction-based data access. | - -4. **Set Cache Usage Mode** - - The usage mode can either be set using the hibernate-mapping file or through Java annotations. - - To set the mode with the hibernate-mapping file, refer to this example: - - ``` pre - - - - - ... - - - - ``` - - In this example, `PACKAGE` is the name of the entity package, `ENTITY_NAME` is the name of your entity, and `USAGE_MODE` is the chosen usage mode from the table given above. Refer to the [Hibernate documentation](http://hibernate.org/docs) for further information. - - To set the mode using annotations, your class definition should look something like this example which specifies the `read-only` usage mode: - - ``` pre - import org.hibernate.annotations.Cache; - import org.hibernate.annotations.CacheConcurrencyStrategy; - - @Entity - @Cacheable - @Cache( - region = 'REGION_NAME', - usage = CacheConcurrencyStrategy.READ_ONLY - ) - - public class MyClass implements Serializable { ... } - ``` - -5. **Start a Locator** - - ``` pre - $ gfsh start locator –-name=locator1 - ``` - -6. **Start Hibernate** - - You are now ready to build, deploy, and run your Hibernate application, which will also launch Geode. See the [Hibernate website documentation](http://hibernate.org/docs) for further information about performing these actions. - -7. **Verify that Geode Started Successfully** - - Similar to Hibernate, Geode uses Simple Logging Facade for Java (SLF4J) to log messages. Upon successful startup, Geode will log the following message: - - ``` pre - 2010-11-15 INFO [org.apache.geode.modules.hibernate.GemFireRegionFactory] - - - ``` - - SLF4J can send this and other Geode log messages to several logging frameworks. Refer to the [SLF4J](http://www.slf4j.org/) website for additional information. - - http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd8927cb/geode-docs/tools_modules/hibernate_cache/using_hibernate_with_http_session.html.md.erb ---------------------------------------------------------------------- diff --git a/geode-docs/tools_modules/hibernate_cache/using_hibernate_with_http_session.html.md.erb b/geode-docs/tools_modules/hibernate_cache/using_hibernate_with_http_session.html.md.erb deleted file mode 100644 index d6a3719..0000000 --- a/geode-docs/tools_modules/hibernate_cache/using_hibernate_with_http_session.html.md.erb +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Using Hibernate Cache Module with HTTP Session Management Module ---- - - - -This section describes how to set up the Hibernate Cache module if you are also using the HTTP Session Management module. - -If you have already configured your tc Server or Tomcat application server to use the HTTP Session Management Module, follow these steps to configure Hibernate module for your application: - -1. Install and configure the Hibernate Cache Module as described in [Installing the Hibernate Cache Module](installing_gemfire_and_module.html#installing_gemfire_and_module) and [Setting Up the Geode Hibernate Cache Module](setting_up_the_module.html#settup_up_the_module). -2. Make sure that your Hibernate application is using the same Geode topology as your application server. -3. Include gemfire-modules-<version>.jar in your application .war file. This is typically done by putting the .jar file under the `WEB-INF/lib` directory. - **Note:** - Even though both modules include a gemfire-modules-<version>.jar file in their distribution, you only need to put one gemfire-modules-<version>.jar file in your .war file. It does not matter which one you use. You can even be using different versions of the HTTP Session Management and Hibernate Cache modules. - -4. Make sure that gemfire.jar is not included in your application .war file. -5. Deploy your application .war file. -6. These configuration steps will work with the default gemfire properties configurations that ship with the Geode modules. If you have added or modified Gemfire properties for the HTTP Session Management Module (for example, as described in[Changing the Default Geode Configuration in the Tomcat Module](../http_session_mgmt/tomcat_changing_gf_default_cfg.html#tomcat_changing_gf_default_cfg) or [Changing the Default Geode Configuration in the tc Server Module](../http_session_mgmt/tc_changing_gf_default_cfg.html#tc_changing_gf_default_cfg)), then you must make the same changes for the Hibernate Cache module. See [Changing Default Configuration of the Hibernate Cache Module](changing_gemfire_default_cfg.html#changing_gemfire_default_cfg) for instructions on how to modify the default Hibernate Cache configuration. - -**Note:** -Using the Hibernate Cache Module with the HTTP Session Management Module creates a single Geode cache in your application server. This cache will be shared by all applications deployed on the application server. Therefore, if two applications use the same entity objects (specified by fully qualified class names) or are configured to use the same cache region, all instances of these entities will end up in the single Geode cache region. If this is not the desired behavior, then include gemfire.jar in the application war file. A Geode cache will be created in the application's class loader. - -