IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Java Boker instances and poolsize

  • 1.  Java Boker instances and poolsize

    Posted Fri January 28, 2011 07:24 PM

    Hi,
    i´m confused about how the brokerID parameter “poolsize” works.

    Suppose I have a Java Web Application that makes calls to Natural programs throught EntireX Broker.

    To do this, we have a pool of java broker objects. We instantiate the corresponding RPCService (came from an IDL) and set a broker object that we teke from the pool.

    It´s usefull or make sense that we create broker instances whith the poolsize parameter in the brokerId ??

    Wich is the effect if we instatiate those borker object whith differents values of poolsize parameters ?

    Thanks for your comments
    MArtin


    #Mainframe-Integration
    #EntireX
    #webMethods


  • 2.  RE: Java Boker instances and poolsize

    Posted Wed February 02, 2011 02:32 PM

    Hey !! nobody is using java with entireX ???
    Please I need to make an application and I must know this issues…
    thanks !!!


    #EntireX
    #Mainframe-Integration
    #webMethods


  • 3.  RE: Java Boker instances and poolsize

    Posted Wed February 02, 2011 05:14 PM

    The recommendation is not use different poolsize parameters for the same Broker. This would have the result that you create multiple socket pools and this is somehow counter-productive.

    Practice has shown that the default of 32 sockets works well in most cases for client applications. If the size of your pool of Broker objects is greater then 32 you might consider to increase the pool size.

    Hope this helps.


    #Mainframe-Integration
    #EntireX
    #webMethods


  • 4.  RE: Java Boker instances and poolsize

    Posted Wed February 02, 2011 05:54 PM

    thanks Rolf !!!

    by same Broker in your recomendation you mind Broker EntireX Server or the java Broker Object?

    Supposse I want to have more then 32 socket… this setting is made in every Java Broker instance ? (in every call to natural programs)
    Or this settings is only for that Java Broker Object ? In this case every Java Broker instance have it´s own pool of sockets ?

    I really apreciate your oppinion.
    Thanks


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 5.  RE: Java Boker instances and poolsize

    Posted Thu February 03, 2011 09:40 AM

    Martin,

    the setting is actually per broker ID as specified in the constructor of the Broker class.

    So:
    new Broker(“host:1234?poolsize=10”,…);
    new Broker(“host:1234?poolsize=20”,…);
    would create 2 independent socket pools.

    In your scenario you should always use the same poolsize parameter in the constructor of the Broker class:
    new Broker(“host:1234?poolsize=64”,…);
    Then you get one socket pool with a maximum of 64 sockets.

    BTW if you set the tracelevel to 1 (e.g. via Broker.setTrace()) then you will see socket pool related messages in the trace.


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 6.  RE: Java Boker instances and poolsize

    Posted Fri February 04, 2011 12:39 PM

    Rolf, very clear your explanation.

    Just for complete my knowledge of the whole process…

    If I use the same poolsize parameter in every Broker java instance, suppose 10… this means that I will only have 10 success calls to Natural programs (10 new instance of java Broker objects - one per call) at the same time ?

    And in the other hand, how do you see to have differents socket´s pool by differents web applications ? Is this a good aproach or only affect the performance of the Broker Server ?

    Thanks
    Martin


    #webMethods
    #Mainframe-Integration
    #EntireX


  • 7.  RE: Java Boker instances and poolsize

    Posted Fri February 04, 2011 01:40 PM

    Whenever the EntireX Java runtime has to call Broker (via TCP/IP or SSL) it will first retrieve an unused socket from the pool, then it will send the data to the Broker using this socket and once the reply from the Broker arrives it will return the socket to the pool.

    In case there are no sockets in the pool (and this is the initial state) a new socket instance will be created - as long as the number of created sockets do not exceed the pool size.

    What happens if the maximum number of sockets are in use ? In this case, the runtime waits for a free socket to become available. If the wait time expires, the runtime will throw back an 0013 0333 error to the caller (“All sockets in socket pool for {0} are in use (size: {1} sockets)”).

    The default wait time is 10 seconds, it can be changed via the system property “entirex.timeout”.

    This might happen, but depending on how long one call lasts and how many calls in parallel you do all calls might be successful !


    #EntireX
    #Mainframe-Integration
    #webMethods


  • 8.  RE: Java Boker instances and poolsize

    Posted Fri February 04, 2011 07:26 PM

    Rolf, correct me if I am wrong, but the calls must be paralell for use the socket pool, because they if they are not paralell, the will be serialized o not ??
    So for every call we have to instantiate a java Borker object to make it parallell… or there is another way ?

    thanks


    #Mainframe-Integration
    #webMethods
    #EntireX


  • 9.  RE: Java Boker instances and poolsize

    Posted Mon February 07, 2011 02:38 PM

    Because multiple calls going throught the same java Broker Object are serializad… or not ?
    I read this in somewhere… and if this is true… how came to play the pool of sokets ??

    thanks!!


    #webMethods
    #EntireX
    #Mainframe-Integration


  • 10.  RE: Java Boker instances and poolsize

    Posted Wed February 09, 2011 12:17 PM

    All calls are using the socket pool.

    Serialization occurs only if the same instance of a Broker object is used at the same time in multiple threads.


    #webMethods
    #EntireX
    #Mainframe-Integration


  • 11.  RE: Java Boker instances and poolsize

    Posted Thu February 10, 2011 06:12 PM

    so, pool size came to play when multiple calls are doing with the same insatance of the java broker object ?


    #EntireX
    #webMethods
    #Mainframe-Integration