Skip to main content

Developing MEP Connectors - Part 1

Posted by spericas on July 30, 2008 at 7:27 AM PDT

Developing an application using the Sun Java Mobile Enterprise Platform (MEP) requires writing two components: a sync client application that runs on the mobile device and an enterprise connector that enables the MEP gateway to access the back-end system where the data is located. In this blog entry, Ryan has already provided an intro on the architecture and features of the client SDK, so in this blog entry I'll introduce the Enterprise Connector Business Object (ECBO) API which is part of the server SDK and can be used to write enterprise connectors.

An enterprise connector is an extension to the MEP gateway that enables data synchronization with a specific data source. A data source could be an EIS system, an RDBMS, a file system, etc. It is similar in nature to a J2EE connector in that it provides access to a (possibly) proprietary system, but it does so using a high-level business object abstraction. Business objects are the entities being synchronized. They are serialized into data records which can be carried in SyncML packets and are used by the MEP gateway to detect changes.

The following diagram shows the architecture of an enterprise connector in MEP:


ecbo1.jpg

Internally, every enterprise connector is viewed by the MEP gateway as a JCR-based repository with a specific node structure, well-defined node names, etc. As seen in the diagram above, it is possible to write a connector directly on top of JCR, but this is an arduous task and not recommended given how much easier it is to write one using the ECBO API. A typical enterprise connector also relies on other APIs such as JCA, to access J2EE connectors that know how to retrieve data from an EIS, or JDBC, to access RDBMS systems, for example.

The ECBO API provides two essential abstractions: BusinessObject and BusinessObjectProvider. Due to the nature of the synchronization process, every enterprise connector must provide the ability to CRUD (create, retrieve, update and delete) business objects. In addition to providing the data model for the entities being synchronized, the BusinessObject abstraction also provides support for CUD, i.e. each object provides the ability to create, update and delete itself. The R operation, or retrieve, is implemented by the BusinessObjectProvider.

Stay tuned for the next installment when we drill down into the details of the business object and business object provider abstractions. In the meantime, don't forget that you can download MEP from here and try it out!

Related Topics >>