MainOverviewWikiIssuesForumBuildFisheye

Chapter 29. OJB Gps Device Support

29.1. Introduction

Compass OJB support is built on top of Spring ORM support for Apache OJB (Object Relational Broker) and the Compass::Gps support for OJB device. This provides simpler integration with OJB. For a complete and working sample, please see the petclinic sample.

29.2. SpringOjbGpsDevice

SpringOjbGpsDevice is an extension of the OjbGpsDevice and utilizes Spring ojb features. This devices Uses Spring PersistenceBrokerTemplate and OjbFactoryUtils to get the current PersistenceBroker for batch indexing (the index() operation).

You can provide the PersistenceBrokerTemplate, though it is not required since it is created the same way the PersistenceBrokerDaoSupport does.

The device can be used with SpringOjbGpsDeviceInterceptor to provide real-time data mirroring without the need to write any code (described in the next section).

29.3. SpringOjbGpsDeviceInterceptor

SpringOjbGpsDeviceInterceptor Uses Spring's AOP capabilities to attach and remove lifecycle event listeners to the PersistenceBroker (the device acts as the listener). Uses OjbGpsDeviceUtils to perform it on the supplied SpringOjbGpsDevice.

Mainly used as a post interceptor with transaction proxies that manage service layer operations on an OJB enabled DAO layer.