To Close or not to Close the Trigger's Connection.
Tmo_hsqldb_q <[email protected]>
| Newsgroups | gmane.comp.java.hsqldb.user |
|---|---|
| Message-ID | <[email protected]> |
I have the following Trigger, it's associated Procedure, and it's associated
Java code:
CREATE TRIGGER SOURCE_EVENT_TRIG AFTER INSERT ON SOURCE_EVENT
referencing NEW ROW AS newrow
FOR EACH ROW WHEN (newrow.messageid IS NOT NULL)
CALL sourceEventUpdate(newrow.MessageID);
CREATE PROCEDURE sourceEventUpdate(messageID char(36))
MODIFIES SQL DATA
LANGUAGE JAVA
EXTERNAL NAME
'CLASSPATH:com.bgcp.mule.mrc.SourceEventTrigger.sourceEventUpdate'
public static void sourceEventUpdate(Connection triggerConn,String
messageID)
{
...
...
//Should the code be calling close on the connection after it finished using
it?
//triggerConn.close()
}
The Java method sourceEventUpdate gets passed to it a Trigger Connection by
the internal HSQLDB code. Should the java code be calling close on the
connection after it is finished using it, or should it do nothing and let
the internal HSQLDB code manage it? This table currently gets inserted into
a lot. about 9000 inserts in a minute.
thanks,
Tony
--
View this message in context: http://hsqldb.10974.n7.nabble.com/To-Close-or-not-to-Close-the-Trigger-s-Connection-tp3933.html
Sent from the HSQLDB - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk