A: 

When trying to connect to glassfish v3 from swing application it is very slow for the first time.

Might be due to the lazy initialization of Application Server services (EJB Container, Connection pool,...).

Takes 4-10 seconds.

What about subsequent calls?

Pascal Thivent
subsequent calls are 30 milliseconds
Dmitry