You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/09/08 01:21:02 UTC
DO NOT REPLY [Bug 47796] New: StandardContext's annotationProcessor
field gets cached between webapp start/stop cycles
https://issues.apache.org/bugzilla/show_bug.cgi?id=47796
Summary: StandardContext's annotationProcessor field gets
cached between webapp start/stop cycles
Product: Tomcat 6
Version: 6.0.20
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: 20090908@csokker.hu
--- Comment #0 from mrbrush <20...@csokker.hu> 2009-09-07 16:21:00 PDT ---
Created an attachment (id=24222)
Patch file contatining the proposed fix
When a webapp is stopped in tomcat, the annotationProcessor field does not get
nullified. When the webapp is started again, the start() method of the
StandardContext class checks whether the annotationProcessor field is null, and
only builds a new one if so. This means that the annotationProcessor gets
reused between application start/stop cycles (not tomcat restart cycles).
Things that are dependent on the annotationProcessor (like injection, etc) may
be broken because of this.
One specific example is when using OpenEJB tomcat integration. The
annotationProcesor itself holds a reference to a javax.naming.Context, which is
cached between context start/stop cycles. This causes that after a stop/start
cycle of a context, the annotationProcessor tries to inject the EJB reference
proxies made at the first start of the context, which was made against
different instances of the to-be-injected fields' classes. This results that
the EJB injection is not working.
Other types of injections may be broken too.
Attached patch file containing the fix. Tested, works.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 47796] StandardContext's annotationProcessor field
gets cached between webapp start/stop cycles
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47796
mrbrush <20...@csokker.hu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |20090908@csokker.hu
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 47796] StandardContext's annotationProcessor field
gets cached between webapp start/stop cycles
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47796
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Mark Thomas <ma...@apache.org> 2009-10-03 18:56:51 BST ---
This has been applied to 6.0.x and will be included in 6.0.21 onwards.
Again, many thanks for the patch.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 47796] StandardContext's annotationProcessor field
gets cached between webapp start/stop cycles
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47796
--- Comment #1 from Mark Thomas <ma...@apache.org> 2009-09-12 17:21:34 BST ---
Thanks for the patch. It has been proposed for 6.0.x.
Not that there is no need for a similar patch in trunk, the instanceManager is
already set to null on stop.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 47796] StandardContext's annotationProcessor field
gets cached between webapp start/stop cycles
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47796
Uwe Günther <uw...@cscc.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|uwe@cscc.de |
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 47796] StandardContext's annotationProcessor field
gets cached between webapp start/stop cycles
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47796
Uwe Günther <uw...@cscc.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |uwe@cscc.de
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org