Dashboard > Penrose > ... > Penrose 0.9.8 Cache > Penrose 0.9.8 Persistent Cache
Penrose 0.9.8 Persistent Cache
Added by Endi S. Dewata, last edited by Jim Yang on Jan 26, 2006  (view change)
Labels: 
(None)


Introduction

Persistent cache uses an LDAP server and a database server to store Penrose directory tree entries.

With persistent cache, you can continue to use your favorite LDAP server while utilizing Penrose to provide synchronization services to the mapped data sources. All bind, search, and compare operations will be handled by your LDAP server. All update operations (add, modify, delete, modrdn) will be redirected to Penrose using referrals. When Penrose receives those operations, it will update both the LDAP server and the data sources.

Setup an LDAP Server

You should be able to use any LDAP server for persistent cache. The following LDAP servers have been tested:

Add a JNDI connection configuration in PENROSE_SERVER_HOME/conf/connections.xml pointing to this server.

Setup a Database Server

You should be able to use any database server for persistent cache. Prepare an empty database for persistent cache.

Add a JDBC connection configuration in PENROSE_SERVER_HOME/conf/connections.xml pointing to this server.

Enable Persistent Cache

Edit PENROSE_SERVER_HOME/conf/server.xml, modify the entry cache configuration as follows:

<server>

  <entry-cache>

    <cache-class>org.safehaus.penrose.cache.PersistentEntryCache</cache-class>

    <parameter>
        <param-name>jdbcConnection</param-name>
        <param-value>...</param-value>
    </parameter>

    <parameter>
        <param-name>jndiConnection</param-name>
        <param-value>...</param-value>
    </parameter>

  </entry-cache>

</server>

The jdbcConnection and jndiConnection should point to the name of the respective JDBC and JNDI connections you created earlier.

Create a JNDI Connection

Create a JNDI connection to the LDAP server as the replica manager.

Create a JDBC Connection

Create a JDBC connection to the database server.

Cache Initialization

First you will need to create tree nodes and the database tables. Go to PENROSE_SERVER_HOME/bin then execute:

cache.bat create

Then you need to load the initial data:

cache.bat load

This could take a while depending on the size of your data. Make your mapped data source are not being updated during this time.

After it's done, verify that your LDAP server contains the full data of your virtual directory.

Start Penrose Server

Start Penrose Server as usual.

Cache Clean-Up

If you need to empty the tree nodes and the database tables:

cache.bat clean

If you no longer need to use the persistent cache you can drop the tree nodes and database tables:

cache.bat drop
OpenLDAP (Penrose)
Sun ONE Directory (Penrose)

Site running on a free Atlassian Confluence Open Source Project License granted to Safehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators