Brendiem / ala-citizenscience

Automatically exported from code.google.com/p/ala-citizenscience
0 stars 1 forks source link

Interceptor taxon lib session manangement has errors, causes log blow out #320

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start server
2. Hit any page
3. Watch logs for exceptions being thrown for every request

What is the expected output? What do you see instead?
No exceptions should be thrown.

---

There are 3 Problems here.

1. The TaxonLibSessionFactory requires the hibernate session to query for 
Preference objects. The TaxonLibSessionFactory is being used after the 
hibernate session has been closed. The fix - Do TaxonLibSession closing before 
hibernate session closing.

2. The RequestContext sometimes has a null TaxonLibSessionFactory which causes 
null pointer exceptions when trying to close the TaxonLibSession. This is 
caused by portal url redirection. See comments for a linked issue. Fix is to 
check for null on TaxonLibSessionFactory and skip TaxonLibSession closing if 
null. This is currently a satisfactory solution.

3. AbstractTaxonLibSessionFactory was storing the current session in a private 
static member. We don't want to share one session across all of our request 
processing threads. Fix is to remove the static member and follow on changes to 
make sure that each thread has its own instance of TaxonLibSessionFactory.

Original issue reported on code.google.com by aaron.lo...@gmail.com on 26 Jul 2012 at 5:47

GoogleCodeExporter commented 9 years ago
See issue 321 for an elaboration on problem #2

Original comment by aaron.lo...@gmail.com on 26 Jul 2012 at 5:55

GoogleCodeExporter commented 9 years ago
These issues are resolved in r382 with the fixes listed above.

issue 321 remains open

Original comment by stephzel...@gmail.com on 26 Jul 2012 at 6:46