Skip to main content

Slow Startup for Java Web Start

1 reply [Last post]
igillespie
Offline
Joined: 2009-10-04

I'm using the Netbeans IDE to develop a Java Web Start application that will launch from the web and then use the EclipseLink JPA to access a remote MySQL database. I'm using the Swing Application Framework to manage life cycle for my app.

When I launch the application from Netbeans it takes about 7 second for my application to load, but when I use the Netbeans IDE to create a Web Start distribution package (with the JAR and JNLP files) it takes about 60 seconds to launch. Also, the "verifying application"/"downloading application" progressbar window seems to run every time I launch the app even though a copy of it has already been cached.

From the users point of view, one first sees my splash screen for 1 to 2 seconds, then the "verifying application"/"downloading application" progressbar window for 5 to 20 seconds and then nothing for a good 40 seconds before the application launches.

The app code is written such that it should show itself BEFORE the JPA starts loading the persistence unit (so I doubt that's the problem), but I thought I'd mention it just in case.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
igillespie
Offline
Joined: 2009-10-04

As I wrote above, I'm developing a Java Web Start application that will launch from the web and then use the EclipseLink JPA to access a remote MySQL server. I'm using Vista on the client-side, Windows Server 2003 on the server-side and Netbeans as my development environment.

The method createEntityManagerFactory--which is necessary for EclipseLink to connect to MySQL--takes about 5 seconds to execute when I run the applicaiton from Netbeans or when I remotely log in to my server to launch the JNLP there, but when I run the application via the web the same line takes 35 seconds (hugely delaying startup). Interestingly, this time gets even worse as my internet connection speed gets worse. Below is a copy of the JNLP file I'm using.

Does anyone have any idea what may be causing this delay?

>
>
>
> MyApp
> My App Vendor
>
> My App Description
> MyApp
>
>
>

>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>

>
>