users@glassfish.java.net

Re: Communications Exception after wait_timeout expires in MySQL 5

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 19 Jun 2009 11:35:05 -0700

These seems to be simple queries that should easily map to JPQL.

Check also that you have connection validation enabled and set to be a table-based.

HTH,
-marina

glassfish_at_javadesktop.org wrote:
> The queries I'm using look like so:
>
> SELECT RackId from Racks JOIN AccountItems ON RefItemId = ItemId WHERE RefAccountId = ?1 ORDER BY RackId
>
> SELECT AccountId FROM AccountItems JOIN SysNetBlocks ON ItemId=RefItemId WHERE ?1 >= IntNetworkAddr AND IntBroadcast >= ?2;
>
>
> Here's the jdbc resource:
> <jdbc-resource enabled="true" jndi-name="jdbc/TEST_Pool" object-type="user" pool-name="TestPool"/>
>
> The connection pool is attached to my previous post, but here's the property you were looking for:
> <property name="LoginTimeout" value="0"/>
>
> I added all of the many auto-reconnect references because the exception I was getting suggested enabling it. But I thought that gf should be catching the timeout exception and reopening the connection and running the query again.
>
> Regardless it's been several months since I last fought with this, let me take the weekend to run some test cases and get back to you with logs.
>
> Again, thanks to both of you for your help.
> [Message sent by forum member 'loren_' (loren_)]
>
> http://forums.java.net/jive/thread.jspa?messageID=352138
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>