Bug #174 (closed)
Stateful session beans are having connections closed prematurely.
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | blocker | Cc: | jburel, sfrank |
Sprint: | n.a. | ||
Total Remaining Time: | n.a. |
Description
The error "java.sql.SQLException: Connection handle has been closed and is unusable." (which is pretty common on the net) is being thrown while accessing RenderingBean methods. Cause unknown.
Change History (4)
comment:1 Changed 18 years ago by jmoore
- Status changed from new to assigned
comment:2 Changed 18 years ago by jmoore
- Cc sfrank added
- Keywords changed from iteration4 to iteration4,jpa,spring,sessions
- Resolution set to fixed
- Status changed from assigned to closed
Finally fixed by r737. This required an extreme amount of Spring hackery, and should probably be revisited when we're on JPA.
The problem was that session handling was being done at a level lower than the beans, so that sessions were being closed (a good thing) before stateful sessionsbeans were finished (a bad thing).
A corollary problem was the JndiObjectFactoryBean lookup was creating LOTS of SFSB (one per call), which is also A Bad Thing. A home-made solution was worked up, though this should probably be reported to Spring/JIRA (along with AOPAdapter and the OmeroContext.applyBeanValues() method).
comment:3 Changed 18 years ago by jmoore
r738 propagates changes to other beans.
comment:4 Changed 18 years ago by anonymous
r740 temporarily sets SessionHandlerMockHibernateTest to "ignore"
r731 closes. This was a small but significant bug in line 296 of SessionHandler. (compare)
Several are waiting on this, will check in regression tests soon.