Preloading java classes/libraries at jar startup?

后端 未结 3 830
刺人心
刺人心 2020-11-29 12:09

A time-out occurs during the first RPC call to a server yet subsequest requests succeed. The server times-out on the response because upon first call it loads the libraries

3条回答
  •  遥遥无期
    2020-11-29 13:09

    One thing you might want to try is writing a simple client inside of the Java server itself. This client does nothing but call some method in the server when it starts up, forcing the classes to be loaded. After this little client gets a result (or callback), then it puts the server into an "accessible by the outside world" state.

提交回复
热议问题