JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
June 03, 2023, 09:39:42 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: JPPF running with tomcat, creates new connection with every request  (Read 1303 times)

piyushgrover87

  • JPPF Padawan
  • *
  • Posts: 13

I am using jppf inside tomcat application and every time there's a request, jppf client creates new connection with the driver (running locally and in local-node-enabled mode). But the connection creation for every single request takes a good amount of time(~500ms). Do I need to create a jppf client connection pool at the time of tomcat server startup and keep the connections open until tomcat stops.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site

Hello,

Yes, you need to keep the conenctions open and reuse them for each request.
I am guessing that you are creating a JPPFClient instance for each request, is this correct?
If yes, then you will need to change your design a little bit and ensure that all requests use the same instance, which you can implement as a singleton or any other pattern that allows you to use always this instance.

I hope this clarifies.

Sincerely,
-Laurent
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads