! Caused by: org.postgresql.util.PSQLException: This connection has been closed.
! at org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2Connection.java:853) ~[hui-populator.jar:0.0.180]
! at org.postgresql.jdbc2.AbstractJdbc2Connection.rollback(AbstractJdbc2Connection.java:870) ~[hui-populator.jar:0.0.180]
! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51]
! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51]
! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]
! at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]
! at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126) ~[hui-populator.jar:0.0.180]
! at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) ~[hui-populator.jar:0.0.180]
! at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80) ~[hui-populator.jar:0.0.180]
! at com.sun.proxy.$Proxy39.rollback(Unknown Source) ~[na:na]
! at org.skife.jdbi.v2.tweak.transactions.LocalTransactionHandler.rollback(LocalTransactionHandler.java:90) ~[hui-populator.jar:0.0.180]
! ... 62 common frames omittedfinal DBI jdbi = factory.build(environment, configuration.getHuiDbDatabase(), "postgres");
final MyDao myDao = jdbi.onDemand(MyDao.class);A and then this dao has a method annotated with @Transactional, which is called multiple times from the business class.
At some point the connection is closed. What should I do to handle that, so that I can keep calling the @Transactional method?
What JDBI version are you using?
This email was sent by a company owned by Financial Times Group Limited ("FT Group"), registered office at Number One Southwark Bridge, London SE1 9HL. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further. It could also contain personal views which are not necessarily those of the FT Group. We may monitor outgoing or incoming emails as permitted by law.
--
You received this message because you are subscribed to the Google Groups "jDBI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdbi+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-jdbi</artifactId>
<version>0.7.1</version>
</dependency>
<dependencyManagement><dependencies><dependency><groupId>org.jdbi</groupId><artifactId>jdbi</artifactId><version>2.70</version></dependency></dependencies></dependencyManagement>
minIdleTime: 1 minute
maxConnectionAge: 1 minute
checkConnectionOnConnect: true
checkConnectionOnReturn: true
checkConnectionOnBorrow: true
logAbandonedConnections: true
logValidationErrors: true
checkConnectionOnConnect: true
checkConnectionOnReturn: true
checkConnectionOnBorrow: true
This email was sent by a company owned by Financial Times Group Limited ("FT Group"), registered office at Number One Southwark Bridge, London SE1 9HL. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further. It could also contain personal views which are not necessarily those of the FT Group. We may monitor outgoing or incoming emails as permitted by law.
This email was sent by a company owned by Financial Times Group Limited ("FT Group"), registered office at Number One Southwark Bridge, London SE1 9HL. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further. It could also contain personal views which are not necessarily those of the FT Group. We may monitor outgoing or incoming emails as permitted by law.
Thanks, that's useful to know.
Mike