Results 1 to 7 of 7

Thread: Performance

  1. #1
    Join Date
    Feb 2008
    Posts
    3

    Smile Performance

    Hi Foxs,

    I've just decided to move to JMS support provided by Spring from using those cumbersome Java code to get Connection factory, Session, Connection etc.

    The first reason to move on to Spring was, actually, an error of "OutOfMemory" as I've forgotten to close connection after publishing my request to Queue/Topic.

    Now The question is
    1. Does spring handle ConnectionObject better way or How better does it handle? (Have i asked proper question?)

    2. Will it be handle to multiple thread at a time?

    3. Is there any way to keep my TopicConnection/QueueConnection singleton?

    I'm stuck!!! Please, Help me out.

    Regards,
    ABhishek

  2. #2

    Default

    1. Does spring handle ConnectionObject better way or How better does it handle? (Have i asked proper question?)
    Yes, it handles the connection elegantly. Spring JMS support frees you from worrying about the boiler plate code along with optimal performance.

    2. Will it be handle to multiple thread at a time?
    Yes you can specify the number of concurrent consumers while defining the MessageListenerContainer. It is just a matter of setting the property in your spring context file. You need not worry about as spring takes care of that
    3. Is there any way to keep my TopicConnection/QueueConnection singleton?
    Yes, Spring provides an implementation of the ConnectionFactory interface, SingleConnectionFactory, that will
    return the same Connection on all createConnection calls and ignore calls to close.
    Please refer to spring reference document, it has enough information to start with Spring JMS Support
    Regards,
    Imran

  3. #3
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    Because Spring asks the ConnectionFactory for a connection each time, and each connection is asked for a Session each time, you need an JMS implementation which is friendly to that. Take a look at this article
    Bill

  4. #4
    Join Date
    Feb 2008
    Posts
    3

    Default

    First of all, thanks a lot for Reply,

    2. Will it be handle to multiple thread at a time?

    For this question, i would like to know if there are 1000 Threads trying to publish message to the same queue at the same time what would be perfomance effect?
    I'm using ConnectionFactory, not SingleConnectionFactory for requesting connection.
    Pooling is provided by JBoss for me.

  5. #5
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    It shouldn't be a problem, but you should consider running such a test. Its hard to tell what a resource pool will do when faced with such a huge amount of concurrency
    Bill

  6. #6
    Join Date
    Feb 2008
    Posts
    3

    Default

    Hmm.Thanks.

    I'll test it and let you all know the results.

  7. #7

    Default

    Have a look at this post by James (ActiveMQ) about spring jms sender's performance.
    http://www.theserverside.com/discuss...hread_id=33899

    But as suggested by wpoitras you should confirm the actual performance by running such a test.

    Regards,
    Imran

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •