Can anyone help me with jms call in c language!
-
Hi,Every one: I just use jms lib to send message to jboss server. And I useing C to do this work. But I doubt there is memory leak when call jms api. I have a test with create one instance of Message and set the message with new text context when sending the message. After send 20000 messages,the memory requirement increase 2000K +. I don't know where I am wrong. So,please anyone can send me a sample with call JMS lib in C language. (include create context,connection ,send message and destroy all instance) Thank you very much! Don't look at me in that way!
-
Hi,Every one: I just use jms lib to send message to jboss server. And I useing C to do this work. But I doubt there is memory leak when call jms api. I have a test with create one instance of Message and set the message with new text context when sending the message. After send 20000 messages,the memory requirement increase 2000K +. I don't know where I am wrong. So,please anyone can send me a sample with call JMS lib in C language. (include create context,connection ,send message and destroy all instance) Thank you very much! Don't look at me in that way!
JMS, such as Java Message Service (message queues) ?
TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VisualCalc 3.0] -
JMS, such as Java Message Service (message queues) ?
TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VisualCalc 3.0]yes! But I need only topic! Don't look at me in that way!
-
Hi,Every one: I just use jms lib to send message to jboss server. And I useing C to do this work. But I doubt there is memory leak when call jms api. I have a test with create one instance of Message and set the message with new text context when sending the message. After send 20000 messages,the memory requirement increase 2000K +. I don't know where I am wrong. So,please anyone can send me a sample with call JMS lib in C language. (include create context,connection ,send message and destroy all instance) Thank you very much! Don't look at me in that way!
white jungle wrote:
After send 20000 messages,the memory requirement increase 2000K +.
How are you verifying this?
"Take only what you need and leave the land as you found it." - Native American Proverb
-
white jungle wrote:
After send 20000 messages,the memory requirement increase 2000K +.
How are you verifying this?
"Take only what you need and leave the land as you found it." - Native American Proverb
According to Performence moitor ,I can find it! Don't look at me in that way!
-
According to Performence moitor ,I can find it! Don't look at me in that way!
Are you sure that number is not just a "high-water mark?" In other words, like Task Manager, it must just be address space footprint of your module.
"Take only what you need and leave the land as you found it." - Native American Proverb
-
Are you sure that number is not just a "high-water mark?" In other words, like Task Manager, it must just be address space footprint of your module.
"Take only what you need and leave the land as you found it." - Native American Proverb
I have soled this problem now! I am sure that the number is not the peek value. I use the jms c lib in a multithread program,and whenever I create a text message,the lib will create the context for the message, so memory leaked. And now,I use a work thread to send the message and everything looks fine except re-connect to server.If I re-connect to server due to network issue,it looks leak some memory. Don't look at me in that way!
-
I have soled this problem now! I am sure that the number is not the peek value. I use the jms c lib in a multithread program,and whenever I create a text message,the lib will create the context for the message, so memory leaked. And now,I use a work thread to send the message and everything looks fine except re-connect to server.If I re-connect to server due to network issue,it looks leak some memory. Don't look at me in that way!
white jungle wrote:
I have soled this problem now...If I re-connect to server due to network issue,it looks leak some memory.
It sounds like the problem has simply changed location.
"Take only what you need and leave the land as you found it." - Native American Proverb
-
white jungle wrote:
I have soled this problem now...If I re-connect to server due to network issue,it looks leak some memory.
It sounds like the problem has simply changed location.
"Take only what you need and leave the land as you found it." - Native American Proverb
Yes!I think . I am testing the program now. Now,it had sent 140000+ messages and memory increased 428K. I want to keep the program running for 4 or 5 days. each days it will send 144000 pieces of messages. And each mesasge has 800 bytes content. Hope it has a peek memory useage! ^_^ Don't look at me in that way!
-
Yes!I think . I am testing the program now. Now,it had sent 140000+ messages and memory increased 428K. I want to keep the program running for 4 or 5 days. each days it will send 144000 pieces of messages. And each mesasge has 800 bytes content. Hope it has a peek memory useage! ^_^ Don't look at me in that way!
Are you allocating memory someplace that is not being deallocated?
"Take only what you need and leave the land as you found it." - Native American Proverb
-
Are you allocating memory someplace that is not being deallocated?
"Take only what you need and leave the land as you found it." - Native American Proverb
I use the lib in a simple way as follow: When the application run,I will start a new thread which will be end while application die! In the new thread I will check if there is any message in the message stack.If so,send it using JMS lib.or else,just wait a short while. The stack manager was written using STL. And I haven't allocate any memory explicity in my application. Do you have any idea! Today!I checked the running status of the application . I find that there are only 524K memory increasement while sending 570000 messages.Maybe it's a good news.^_^ Don't look at me in that way!