firstly ,it's my code ,and setuptopic() and
disconnectAndDestroyAllNotificationReceivers() will be invoked by another Jmx:
MBean .connect() and disconnect() seperately.
in another word ,I will invoke these two methods by Jmx Manage Bean .
| public void setupTopic() throws JMSException, NamingException {
|
|
| iniCtx = new InitialContext();
| Object tmp = iniCtx.lookup("ConnectionFactory");
| String alarmTopicName ="topic/ALARMNOTIFICATIONS";
| String connectStatusTopicName ="topic/OSNOTIFICATIONS";
| TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
| //topic = (Topic) iniCtx.lookup(alarmTopicName);
| topic2 = (Topic) iniCtx.lookup(connectStatusTopicName);
| conn = tcf.createTopicConnection();
| session = conn.createTopicSession(false,
TopicSession.AUTO_ACKNOWLEDGE);
| conn.start();
| connectHealthReceiver();
|
| }
|
| public void disconnectAndDestroyAllNotificationReceivers() {
| try {
| //topicSubscriber.setMessageListener(null);
| session.close();
| conn.stop();
|
| iniCtx = null;
| conn = null;
| session = null;
| topic = null;
| topic2 = null;
| System.gc();
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
then please care the following diagram:
[img]http://vip.sina.com.cn/cgi-bin/album/ualimage.cgi?egp=nq7sGp139DGG99GG3vRGvmCCsszmG9mfs9k&al=0&ph=14&brev=0[/img]
once I disconnect and then connect again.(invoke setupTopic)
the following threads will be added .(of courese ,#n will keep increasing).
but after I disconnect ,all these threads never be released(disappear),
anonymous wrote :
| Thread[UIL2.SocketManager.ReadTask#9 client=192.168.71.73:xxxx](Running)
| Thread[UIL2.SocketManager.ReadTask#10 client=192.168.71.73:xxxx](Running)
| Thread[UIL2.SocketManager.ReadTask#11 client=192.168.71.73:xxxx](Running)
| Thread[UIL2.SocketManager.ReadTask#12 client=192.168.71.73:xxxx](Running)
|
I am worried this will impact on the performance of Jboss.
I want to learn what 's those threads ,
how to get rid of them after I disconnect from Jms.
the following threads will be released by jboss and disappear.
name like
anonymous wrote : [EMAIL PROTECTED])#1]
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936978#3936978
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936978
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user