[Mulgara-dev] Configuring RMI interrupts

Alex Hall alexhall at revelytix.com
Tue Feb 2 00:14:48 UTC 2010


Paul et al,

I'm getting ready to integrate the Interruptible RMI library with
Mulgara, as discussed a couple of weeks ago. There are two behaviors
that I would like to configure:

1. In the RMI server, in order to process RMI interrupts, we need to use
the custom Interruptible RMI socket factory when exporting the Session.
I would like to enable or disable this feature using a new
"RMIInterrupt" element in the Mulgara XML config file, so a typical
configuration might look like:

<MulgaraConfig>
   <RMIPort>1099</RMIPort>
   <RMIInterrupt>true</RMIInterrupt>
   ...
</MulgaraConfig>

It would be nice to combine these RMI-related properties under a single
element, but that would break backwards-compatibility with old files and
I'm not willing to do that for a minor release. Also, note that the
custom socket factory will only be used when exporting Session objects;
other RMI operations will not be interruptible.

2. In the ConnectionFactory, if a client connects to a remote Session
then all operations on that Session need to be executed in a proxy
thread created by the custom Interruptible RMI thread factory in order
to enable RMI interrupts. I would like to make this behavior
configurable as well, but since the ConnectionFactory may be located in
client code we can't be guaranteed access to an XML config file. The
only safe way I can think of to configure this is via a Java system
property (I would propose "mulgara.rmi.interrupt") but I'm open to other
suggestions. Of course, since the ConnectionFactory is accessed
programmatically then we can always add methods to override this via code.

So, I guess the first question is, do you agree that these behaviors
should be configurable? If so, then are these acceptable means of
configuring them? Finally, what should be the default behavior if none
is configured?

Regards,
Alex




More information about the Mulgara-dev mailing list