Discussion:
How to close connections from TDI server
(too old to reply)
TDI Developer
2016-02-02 13:59:22 UTC
Permalink
Raw Message
Hi All,

I am looking for some help on TDI(V7.1.1).

Question - Is there any way to close the connections after each operation using TDI connector settings. I have used connector settings "Initialize Options - Initialize and Terminate every time it is used" but still no luck.

Back ground on my environment- I have custom java connector which calls remote ejb. When I add/update user for first time new connections are established and these connections can be used for next 30 minutes. But I want to clean these connections and use new connections every time I call add/update. Unfortunately I have no options to do this from ejb server side. So I trying to fix this issue from TDI.

Thank you in Advance for any help you can provide.
Eddie Hartman
2016-02-03 08:42:42 UTC
Permalink
Raw Message
Post by TDI Developer
Hi All,
I am looking for some help on TDI(V7.1.1).
Question - Is there any way to close the connections after each operation using TDI connector settings. I have used connector settings "Initialize Options - Initialize and Terminate every time it is used" but still no luck.
Back ground on my environment- I have custom java connector which calls remote ejb. When I add/update user for first time new connections are established and these connections can be used for next 30 minutes. But I want to clean these connections and use new connections every time I call add/update. Unfortunately I have no options to do this from ejb server side. So I trying to fix this issue from TDI.
Thank you in Advance for any help you can provide.
The Init & Terminate Every Time option depends on how the Connector is implemented. If you are closing the connection with terminate() and then re-establishing it with initialize() then there is not much more you can do from TDI. You could try calling the methods yourself, for example in the Before Execute Hook:

try {
thisConnector.connector.terminate();
} catch(ex) {
// do nothing - just in case terminating the first time fails
}
thisConnector.connector.initialize(null);
Kanon Yingwanna
2017-02-09 15:57:40 UTC
Permalink
Raw Message
Post by Eddie Hartman
Post by TDI Developer
Hi All,
I am looking for some help on TDI(V7.1.1).
Question - Is there any way to close the connections after each operation using TDI connector settings. I have used connector settings "Initialize Options - Initialize and Terminate every time it is used" but still no luck.
Back ground on my environment- I have custom java connector which calls remote ejb. When I add/update user for first time new connections are established and these connections can be used for next 30 minutes. But I want to clean these connections and use new connections every time I call add/update. Unfortunately I have no options to do this from ejb server side. So I trying to fix this issue from TDI.
Thank you in Advance for any help you can provide.
try {
thisConnector.connector.terminate();
} catch(ex) {
// do nothing - just in case terminating the first time fails
}
thisConnector.connector.initialize(null);
It's working Eddie, Thank you

Loading...