|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
tcp connection pool from java compute node |
« View previous topic :: View next topic » |
Author |
Message
|
MikeOliverAZ |
Posted: Wed Oct 30, 2013 9:57 pm Post subject: tcp connection pool from java compute node |
|
|
 Apprentice
Joined: 10 Jul 2013 Posts: 47
|
I want to use couchbase to store java objects for fast access and reuse in a java compute node.
The couchbase client opens one connection to the server and is thread safe, but they don't have any connection pooling.
It works great until the open file limit is exceeded if I don't do a client.shutdown(), but if I put in the client.shutdown() before ending the java compute node I don't get the too many files open exception but my performance goes way down.
One suggestion was to put the client in a singleton class, so there is only ever one client since it is thread safe, but they are running in a java application daemon...not sure if that will work in broker JCN.
Will it?
MO
 |
|
Back to top |
|
 |
Esa |
Posted: Wed Oct 30, 2013 11:20 pm Post subject: Re: tcp connection pool from java compute node |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
MikeOliverAZ wrote: |
One suggestion was to put the client in a singleton class, so there is only ever one client since it is thread safe, but they are running in a java application daemon...not sure if that will work in broker JCN.
Will it?
|
Very likely. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 31, 2013 1:26 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You could put your own pool of connections into a singleton. |
|
Back to top |
|
 |
MikeOliverAZ |
Posted: Sun Nov 03, 2013 7:57 pm Post subject: Yes that seems to work |
|
|
 Apprentice
Joined: 10 Jul 2013 Posts: 47
|
Volume testing to be sure, but the singleton pattern for the client seems to work.
MO |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|