Introduction

Welcome to PL-J, a Java Stored Procedure Server for PostgreSQL RDBMS!

PL-J aims to provide a modular and flexible solution for your RDBMS logic, supporting triggers and user defined functions written in java.

PL-J runs on PostgreSQL version 8.0 and 7.4, with some work, the architecture is portable to other relational databases.

Component interfaces

PL-J is built from reusable/replacable components. We have our implementations and the default deployment descriptor, but you can write yours if you want.

C - channel

The module that knows how to talk to the stored procedure server.

C - configuration

There is a need for a configuration api on the C side for channel implementation specific settings (how to communicate or even connect to the java side).

C - Call information extractor

Specifies the syntax of the call description.

Java - channel

The java side channel is responsible for sending and receiving messages from the RDBMS.

Java - type mapper

The typemapper is a component that maps raw data into java objects. You may use it for custom datatypes too, so you don`t have to worry about SQLData in your stored procedures.

Java - executor

Executor components execute object oriented calls.

Components implementations

The following components are implemented:

PostgreSQL call handler

The PostgreSQL call handler is the entry point of a stored procedure or function from the PostgreSQL ORDBMS. It contains the main logic of how messages are handled in a PostgreSQL system.

C - FEBE channel

The FE/BE channel is built from the PostgreSQL groups frontend/backend protocol. It contains a modified version of libpq.

C - table based configuration implementation

The default (and now the only) implementation of the C side configuration api. It uses a table called 'sqlj.plj_config' to read configuration settings.

Java - PostgreSQL type mapper

Maps PostgreSQL raw data into java objects.

This component is very important if you want to add custom datatypes, or use non standard types such as inet.

Java - Java executor

The executor tho execute java UDFs and triggers.

The default executor is java of course. This component depends on more services. With the default classloader implementation, the executor will load and store classes in an RDBMS table.

BSF - Script executor

PL-J contains a experimental executor component based on the Bean Scripting Framework, which is the defacto standard interface of the scripting applications.

PL-J BSF integration will be tested on groovy and jython.