Monday 15 April 2013

java - How to use Vaadin SQLContainer when I already have a JDBC connection pool -



java - How to use Vaadin SQLContainer when I already have a JDBC connection pool -

vaadin 7 offers sqlcontainer implementation. book of vaadin says utilize either of implementations of jdbc connection pool. using tomcat jdbc connection pool implementation. having 1 pool draws pool seems bad thing.

to go on using tomcat pool, implemented com.vaadin.data.util.sqlcontainer.connection.jdbcconnectionpool interface. interface requires 3 methods:

reserveconnectioni homecoming connection drawn tomcat pool. releaseconnectioni nothing. tried calling close on connection, closed connection rather returning tomcat pool. apparently sqlcontainer called close 1 time , sec phone call close closes downwards connection. getting runtime errors saying connection not open. destroyi nothing. supposedly method workaround issue postgres (which i'm using), seems irrelevant given using tomcat pool.

➜ implementing interface right approach?

➜ if implementing interface way go, did properly? other issues should address?

my tomcat pool available via jndi, i'm not sure if should using vaadin class j2eeconnectionpool.

you should in fact able utilize j2eeconnectionpool, described in own reply above. have used used j2eeconnectionpool freeformquery know works. unfortunately there apparently bug in vaadin's tablequery implementation caused "connection has been closed" error saw. see: http://dev.vaadin.com/ticket/12370

the ticket proposes code change, in case replaced offending tablequery freeformquery.

java database-connection vaadin connection-pooling vaadin7

No comments:

Post a Comment