Subject Re: [Firebird-Java] Events
Author Jim Starkey
dhay@... wrote:

>
> Hi Roman,
>
> We might be willing to add it, if you would be willing to guide us!
>
> Can you give a brief overview of where we'd start? Presumably we'd call
> the isc_wait_for_event() in the API using JNI. Do you have helper methods
> to be able to do this that we could use?
>
The low level call is isc_que_events, which registers a callback address
and argument with the local event manager. Isc_wait_for_event is a
synchronous layering on isc_que_event.

Before you decide how to procede, you need to think a bit about how you
want your events delivered. If you want everything event client to
start it's down listener thread, the isc_event_wait is probably the way
to do. If you want to handle single listener thread for all clients,
then isc_que_events is the way to go. My guess is that having each
event client start a listener thread is the way to go.

You will probably want to have a Java layer to construct and deconstruct
event blocks and make very thin JNI calls. You will want to put a
certain amount of intelligence in that layer to simplify the handling of
multiple events.

--

Jim Starkey
Netfrastructure, Inc.
978 526-1376