Author |
Message
|
billybong |
Posted: Fri May 11, 2007 9:23 am Post subject: Connection pooling in a Java compute node to output socket |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
Hi all!
I've been looking into the issue regarding custom output nodes implemented as a JCN and would be grateful to have some advices regarding pooling.
If a multiple flow threads uses a resource, say i.e. a socket or an FTP client, is there any way to create a simple pool of objects that are usable for all JCN's? From what I know its only possible to store connections between flow invocations of the same thread, not between flows, not even if they are the same flow.
Does anyone have some advice on how to create a common pool for every JCN using the same class when they are deployed to the same execution group? _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 11, 2007 9:24 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That would be a Singleton.
Preferrably created by a class in a jar file in shared-classes, to ensure success when loading the class. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
billybong |
Posted: Fri May 11, 2007 10:08 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
Works like a charm. Thanks for your always quick answers Jeff. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 11, 2007 10:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The IA91 support pack is an excellent example (with source!) of many advanced Java tricks in a Broker environment. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
billybong |
Posted: Fri May 11, 2007 10:20 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
Ooh, a real goldmine on caching state data in there... Exactly what I need, thanks again! _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
|