title: Diagnosing an EclipseLink connection delay?
body: <p>I am using a GlassFish 3.1.2 server and my web application uses EclipseLink 3.1.2 as a JPA provider.  GlassFish is running locally, the MySQL server is remote.</p>
  
  <p>The problem is that when I start my server the server hangs for a long time, with the following line as the last thing in the log.</p>
  
  <pre><code>[#|2012-03-26T14:37:31.765-0700|INFO|glassfish3.1.2|org.eclipse.persistence.session.file:/Users/alan/NetBeansProjects/MyApp/target/MyApp/WEB-INF/classes/_com.myapp|_ThreadID=10;_ThreadName=Thread-3;|EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461|#]
  </code></pre>
  
  <p>After waiting here for 2-3 minutes, it will typically continue and then act as everything is normal.  My web-app works with the data base the way I would expect.</p>
  
  <p>If NetBeans tries to start the server it will most often time-out, thinking that the start failed.  If I start the domain with the <strong>asadmin</strong> command, it takes the same amount of time but it succeeds.</p>
  
  <p>I have an identical system at home that connects to the same MySQL server that does not do this.</p>
  
  <p>So how do I tell EclipseLink to tell me more about what it is waiting for?</p>
  
  <p>UPDATE:</p>
  
  <p>Here is my persistence.xml file -- nothing remarkable.   Are there EclipseLink-specific commands that could be used to help?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
  &lt;persistence-unit name="com.myapp" transaction-type="JTA"&gt;
      &lt;jta-data-source&gt;jdbc/MyApp&lt;/jta-data-source&gt;
      &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;
  &lt;/persistence-unit&gt;
  </code></pre>
  
  <p></p>