-
1. Re: How to close client conduit to JMS broker
ubhole Feb 17, 2009 5:31 AM (in response to hartmut)Can you please be specific on the FUSE SF version you are using?
-
2. Re: How to close client conduit to JMS broker
hartmut Feb 20, 2009 4:07 AM (in response to ubhole)Yes of course. I know that something has changed somewhere between 2.0.6 and 2.0.9.
But the problem is that we use both versions: 2.0.6.1-fuse and 2.0.9.2-fuse.
/Hartmut
-
3. Re: How to close client conduit to JMS broker
socallag Feb 20, 2009 6:36 AM (in response to hartmut)Hi Hartmut,
I'd like to try and reproduce your problem, do you have a small testcase or can provide me with some more specific info (code) on what you are doing that would help me to achieve this.
thanks,
Seán.
-
4. Re: How to close client conduit to JMS broker
hartmut Feb 20, 2009 10:07 AM (in response to socallag)Our code looks like this (for 2.0.9.1-fuse) when we try to shutdown a JMSConduit's connection to the JMS broker (ActiveMQ).
But if i do this and i check the connections the activeMQ shows in the jConsole i can see that there still is a connection active (at least in activeMQ).
And also this code isn't very nice (because of the cast to internals of CXF) and it does not work like this in 2.0.6-fuse version
Client client = ClientProxy.getClient(myPort);
JMSConduit conduit = (JMSConduit) client.getConduit();
conduit.close();
JMSConfiguration jmsConfig = conduit.getJmsConfig();
SingleConnectionFactory cf = (SingleConnectionFactory)jmsConfig.getConnectionFactory();
cf.destroy();
-
5. Re: How to close client conduit to JMS broker
ubhole Feb 20, 2009 11:57 AM (in response to hartmut)hartmut wrote:
And also this code isn't very nice (because of the cast to internals of CXF) and it does not work like this in 2.0.6-fuse version
Client client = ClientProxy.getClient(myPort);
JMSConduit conduit = (JMSConduit) client.getConduit();
conduit.close();
JMSConfiguration jmsConfig = conduit.getJmsConfig();
SingleConnectionFactory cf = (SingleConnectionFactory)jmsConfig.getConnectionFactory();
cf.destroy();
I had a quick look at the code and don't see any other way to do this. Also the method getConnectionFactory() is meant for Tests only. One possible reason why you should not shutdown ConnectionFactory is establising a connection is comparitively costly. So should cache connection as much as possible. It will add a significant overhead. Is there any particular reason or bug you are trying to workaround which requires this behaviour.
This surely won't work in 2.0.6-fuse because it was based on old JMS transport which wasn't using Spring JMS template and ConnectionFactory wasn't exposed via configuration.
-
6. Re: How to close client conduit to JMS broker
hartmut Feb 23, 2009 2:24 AM (in response to ubhole)In our CXF-based solution we have a system that is devided into something like different domains. Each domain supports the same kind of web-Services (about 10 domains each providing about 20 web-services).
Now our clients (many of them) uses these web-services via JMS for a specific domain. But sometimes the clients have to switch from one domain to another.
So we want to shutdown all Client-connections to JMS and reopen new ones (different JMS-queues are used for every domain).
The cost establishing new connections are not so important for us. We are more concerned about the big number of connections the clients make to the JMS-Broker, which results in a lot of socket-connections and many threads in the JMS-Broker. So we want to shutdwon the no longer needed connections (without of course shuting down the clients themself).
For me that looks like a missing feature. Or are we the only ones who want to do something like that?