Container Refresh Too Slow

Hi,

Am using a vaadin table with a JPA container object as the data source. Along with the table, am providing a button that invokes container.refresh. When container.refresh is invoked, it takes long time for the table to reload. In the console I see the same query being created multiple times.

For ex -

[EL Finest]
: 2014-04-30 10:07:23.947–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(name=“readObject” referenceClass=CityInfo sql=“SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)”)
[EL Finest]
: 2014-04-30 10:07:23.948–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Register the existing object com.hdfc.lssadmin.domain.model.CityInfo@e550bff
[EL Finest]
: 2014-04-30 10:07:23.95–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(referenceClass=CityInfo )
[EL Finest]
: 2014-04-30 10:07:23.953–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection acquired from connection pool [default]
.
[EL Fine]
: 2014-04-30 10:07:23.954–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)
bind => [Chennai]

[EL Finest]
: 2014-04-30 10:07:23.991–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection released to connection pool [default]
.
[EL Finest]
: 2014-04-30 10:07:23.992–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Revert the object’s attributes com.hdfc.lssadmin.domain.model.CityInfo@718699b2
[EL Finest]
: 2014-04-30 10:07:23.999–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Unregister the object com.hdfc.lssadmin.domain.model.CityInfo@718699b2
[EL Finest]
: 2014-04-30 10:07:24.001–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReportQuery(referenceClass=CityInfo )
[EL Finest]
: 2014-04-30 10:07:24.002–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection acquired from connection pool [default]
.
[EL Fine]
: 2014-04-30 10:07:24.002–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–SELECT COUNT(CITYNAME) FROM CITY_INFO
[EL Finest]
: 2014-04-30 10:07:24.036–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection released to connection pool [default]
.
[EL Finest]
: 2014-04-30 10:07:24.036–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReportQuery(referenceClass=CityInfo )
[EL Finest]
: 2014-04-30 10:07:24.037–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection acquired from connection pool [default]
.
[EL Fine]
: 2014-04-30 10:07:24.037–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–SELECT * FROM (SELECT /*+ FIRST_ROWS / a., ROWNUM rnum FROM (SELECT CITYNAME AS a1 FROM CITY_INFO ORDER BY CITYNAME ASC) a WHERE ROWNUM <= ?) WHERE rnum > ?
bind => [150, 0]

[EL Finest]
: 2014-04-30 10:07:24.076–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection released to connection pool [default]
.
[EL Finest]
: 2014-04-30 10:07:24.077–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(name=“readObject” referenceClass=CityInfo sql=“SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)”)
[EL Finest]
: 2014-04-30 10:07:24.077–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Register the existing object com.hdfc.lssadmin.domain.model.CityInfo@e550bff
[EL Finest]
: 2014-04-30 10:07:24.077–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Unregister the object com.hdfc.lssadmin.domain.model.CityInfo@3e8077dd
[EL Finest]
: 2014-04-30 10:07:24.078–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(name=“readObject” referenceClass=CityInfo sql=“SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)”)
[EL Finest]
: 2014-04-30 10:07:24.078–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Register the existing object com.hdfc.lssadmin.domain.model.CityInfo@e550bff
[EL Finest]
: 2014-04-30 10:07:24.079–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(referenceClass=CityInfo )
[EL Finest]
: 2014-04-30 10:07:24.079–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection acquired from connection pool [default]
.
[EL Fine]
: 2014-04-30 10:07:24.079–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)
bind => [Chennai]

[EL Finest]
: 2014-04-30 10:07:24.117–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection released to connection pool [default]
.
[EL Finest]
: 2014-04-30 10:07:24.118–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Revert the object’s attributes com.hdfc.lssadmin.domain.model.CityInfo@434d49ba
[EL Finest]
: 2014-04-30 10:07:24.119–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Unregister the object com.hdfc.lssadmin.domain.model.CityInfo@434d49ba
[EL Finest]
: 2014-04-30 10:07:24.12–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(name=“readObject” referenceClass=CityInfo sql=“SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)”)
[EL Finest]
: 2014-04-30 10:07:24.12–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Register the existing object com.hdfc.lssadmin.domain.model.CityInfo@e550bff
[EL Finest]
: 2014-04-30 10:07:24.121–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(referenceClass=CityInfo )
[EL Finest]
: 2014-04-30 10:07:24.122–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection acquired from connection pool [default]
.
[EL Fine]
: 2014-04-30 10:07:24.122–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)
bind => [Chennai]

[EL Finest]
: 2014-04-30 10:07:24.16–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection released to connection pool [default]
.
[EL Finest]
: 2014-04-30 10:07:24.161–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Revert the object’s attributes com.hdfc.lssadmin.domain.model.CityInfo@72374db
[EL Finest]
: 2014-04-30 10:07:24.162–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Unregister the object com.hdfc.lssadmin.domain.model.CityInfo@72374db
[EL Finest]
: 2014-04-30 10:07:24.163–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(name=“readObject” referenceClass=CityInfo sql=“SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)”)
[EL Finest]
: 2014-04-30 10:07:24.164–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Register the existing object com.hdfc.lssadmin.domain.model.CityInfo@e550bff
[EL Finest]
: 2014-04-30 10:07:24.166–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(referenceClass=CityInfo )
[EL Finest]
: 2014-04-30 10:07:24.167–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection acquired from connection pool [default]
.
[EL Fine]
: 2014-04-30 10:07:24.167–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)
bind => [Chennai]

[EL Finest]
: 2014-04-30 10:07:24.208–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection released to connection pool [default]
.
[EL Finest]
: 2014-04-30 10:07:24.209–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Revert the object’s attributes com.hdfc.lssadmin.domain.model.CityInfo@156899b2
[EL Finest]
: 2014-04-30 10:07:24.21–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Unregister the object com.hdfc.lssadmin.domain.model.CityInfo@156899b2
[EL Finest]
: 2014-04-30 10:07:24.212–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(name=“readObject” referenceClass=CityInfo sql=“SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)”)
[EL Finest]
: 2014-04-30 10:07:24.213–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Register the existing object com.hdfc.lssadmin.domain.model.CityInfo@e550bff
[EL Finest]
: 2014-04-30 10:07:24.214–UnitOfWork(878929499)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Execute query ReadObjectQuery(referenceClass=CityInfo )
[EL Finest]
: 2014-04-30 10:07:24.215–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–Connection acquired from connection pool [default]
.
[EL Fine]
: 2014-04-30 10:07:24.216–ServerSession(176533679)–Connection(357691534)–Thread(Thread[http-bio-8080-exec-2,5,main]
)–SELECT CITYNAME, BRANCHNAME, CIRCLE, STDCODE FROM CITY_INFO WHERE (CITYNAME = ?)
bind => [Chennai]

Is this a framework issue? Please guide.