This handshake you mention includes the client retrieving the database schema and some other metadata from the server. This will typically take long, and is not an issue for most applications.
Your actual problem is that you're not using a proper connection pool that will initiate at application startup and serve existing connections from the pool whenever they are needed.
So if you really want to solve this issue you'd have to implement a connection pool yourself. This requires some Java knowledge to write.
Hi Enzo, depending if the hand-shake is required after some time of inactivity, then you could do a hand-shake call. So you should test this and that should give you the answer :-)
Good luck.