[Pljava-dev] RMI from a trigger

From: JBurtenshaw at cooperstandard(dot)com (Burtenshaw, John J(dot))
To:
Subject: [Pljava-dev] RMI from a trigger
Date: 2006-08-08 17:13:06
Message-ID: 75F39425D1954A4380D5C9E1D630CDC903C30CB1@C2A007.stratford.auto.cooperintra.ctb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Not sure if this is an appropriate question for this list but here it goes:

I have written a java based trigger for the postgresql-8.1 database using
pljava. Part of the trigger logic is to use RMI to contact a registered
process and notify it that a new record has been inserted into the database.
For the most part this works well but occasionally the trigger hangs when
it is attempting to contact the registry using the 'Naming.lookup()' method.
I have some debug code that shows that it specifically hangs at this point:

sun.rmi.transport.tcp.TCPEndpoint main: opening socket to [127.0.0.1:1099]

I.E. when attempting a socket connection with the rmiregistry. Normally the
registry returns right away with a server suggested IP/port but
occasionally it can take more than three minutes for a responce! I have
even tried to write my own RMISocketFactory that implements a timeout
feature which does not work (I may not have done this correctly though).

Does anyone have any ideas as to why the rmiregistry would fail to respond?
I notice that prior to it's responce there are several other successfull
communications with the registry which means it is still actively listening
to the port.

Any suggestions would be welcome.

Regards,
John Burtenshaw

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060808/4934c048/attachment.html>

Browse pljava-dev by date

  From Date Subject
Next Message Eric Faulhaber 2006-08-08 23:39:35 [Pljava-dev] CREATE FUNCTION docs inconsistent with implementation
Previous Message Maxim 2006-08-08 13:51:09 [Pljava-dev] Custom java objects