Slow startup for Java Web Start Application

I use Netbeans IDE to develop a Java Web Start application that will run from the Internet, and then use EclipseLink JPA to access a remote MySQL database. I am using the Swing Application Framework to manage the life cycle for my application.

When I launch the application from Netbeans, it takes about 7 seconds to download my application, but when I use the Netbeans IDE to create the Web Start distribution (with JAR and JNLP files), it takes about 60 seconds to start. In addition, the “Application Validation” window / "loading the application" seems to run every time the application starts, even if its copy is already cached.

From the point of view of users, first my splash screen opens from 1 to 2 seconds, then the "application check" / "application download" window for 5-20 seconds, and then nothing good for 40 seconds before launching the applications.

The application code is written in such a way that it must prove itself before the JPA starts loading the persistence block (so I doubt the problem), but I thought I mentioned it just in case.


Update: createEntityManagerFactory Slow With Web Start Method

Studying this further, I found that the createEntityManagerFactory method, which is required for EclipseLink to connect to MySQL, takes about 5 seconds to execute when starting the application from Netbeans or when logging in remotely, my server launches JNLP there, but when I launch the application via the Internet The same line takes 35 seconds (very delayed start). Interestingly, this time it gets even worse, as the speed of my Internet connection is getting worse. Below is a copy of the JNLP file that I am using.

Does anyone know what might cause such a delay?

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

  MyApp My application provider Description of my MyApp application                                                   

+3
source share
2

, . . Eclipselink Toplink. . 1 2 5 . eclipselink.

, .

+6

, Java ALL logging. , Java WebStart ( , WebStart).

, DNS- . , .

+1

Source: https://habr.com/ru/post/1743382/


All Articles