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 2011/08/09 13:55:17 UTC

DO NOT REPLY [Bug 51637] New: Lifecyclebase.start() method should be non-final

https://issues.apache.org/bugzilla/show_bug.cgi?id=51637

             Bug #: 51637
           Summary: Lifecyclebase.start() method should be non-final
           Product: Tomcat 7
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: anilsaldhana@gmail.com
    Classification: Unclassified


If we need to have deeper integration with the web container security, then
there is a need to extend the default Tomcat Authenticators.  This is what we
have done in project PicketLink where we bring SAML based Web Browser SSO to
Tomcat Applications.

As highlighted by our user in
http://community.jboss.org/thread/170430?tstart=0,  there is a JVM byte code
verification error now that the Lifecyclebase.start() method has been made
final.

This affects all valves/authenticators users are going to write. The start()
method is usually overriden such that the valve/authenticator can do
initialization before they are started via super.start().

-- 
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 51637] Lifecyclebase.start() method should be non-final

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51637

--- Comment #2 from Anil Saldhana <an...@gmail.com> 2011-08-09 12:17:34 UTC ---
Basically you are saying we cannot port code that was working in TC55 and TC6. 
Now we need to write a fresh set of authenticator for TC7?

-- 
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 51637] Lifecyclebase.start() method should be non-final

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51637

--- Comment #4 from Anil Saldhana <an...@gmail.com> 2011-08-09 13:23:03 UTC ---
Thanks Mark, for the explanation. We will write a fresh set of authenticators
for TC7 derived code.

-- 
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 51637] Lifecyclebase.start() method should be non-final

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51637

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #1 from Mark Thomas <ma...@apache.org> 2011-08-09 12:10:06 UTC ---
For Tomcat 7, you should be overriding startInternal(), not start().

-- 
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 51637] Lifecyclebase.start() method should be non-final

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51637

--- Comment #3 from Mark Thomas <ma...@apache.org> 2011-08-09 12:46:25 UTC ---
In short, yes.

The longer version is that prior to Tomcat 7 the Lifecycle interface was
loosely defined, largely optional and inconsistently implemented with large
quantities of almost but not quite duplicate code. The code wasn't
unmaintainable but it was a lot harder to maintain than it should have been.
The inconsistencies in things like component start/stop and JMX registration of
components was also causing problems.

As part of the wider code clean-up for Tomcat 7 the Lifecycle interface was
more tightly defined - particularly the permitted state transitions - and made
non-optional for most internal components. Most (all?) of those components all
extend LifecycleMBeanBase which ensures that MBean registration and
de-registration happens at the correct point. It also ensures that components
that extend correctly implement Lifecycle both in terms of the allowed state
transitions and the firing of associated events. A side effect of this is that
custom code that extends these components must override different methods.

API changes are going to happen between major versions. They aren't made for
the sake of it but neither are they avoided. It may be as simple as overriding
a different method but you may find that other changes are required as well. It
depends on exactly what the custom component is doing.

As an aside, initialisation should be happening in init() not start() which
probably means overriding initInternal().

-- 
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