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 2013/07/26 17:37:46 UTC

[Bug 55312] New: No SCI scan in embedded Tomcat

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

            Bug ID: 55312
           Summary: No SCI scan in embedded Tomcat
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: david_syer@hotmail.com

I like the fact that SCI scanning is off by default in a Tomcat embedded
instance, but I'd lik eto be able to switch it on. It might even be possible
already, but the API is non-obvious.  Maybe a method in Tomcat or associated
friendly helper?

Would also be nice in Tomcat 7.

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


[Bug 55312] No SCI scan in embedded Tomcat

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

Dave Syer <da...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

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


[Bug 55312] No SCI scan in embedded Tomcat

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

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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


[Bug 55312] No SCI scan in embedded Tomcat

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

Bug 55312 depends on bug 55287, which changed state.

Bug 55287 Summary: ServletContainerInitializer in parent classloader may not be found
https://issues.apache.org/bugzilla/show_bug.cgi?id=55287

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

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


[Bug 55312] No SCI scan in embedded Tomcat

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

--- Comment #5 from Mark Thomas <ma...@apache.org> ---
(In reply to Dave Syer from comment #1)
> I played around with the Tomcat embedded server a bit more and found that it
> actually is relatively easy (if obscure) to switch on SCI:
> 
> 		ContextConfig contextConfig = new ContextConfig();
> 		context.addLifecycleListener(contextConfig);

Aside:

This is as expected if you are using addContext() vs addWebapp(). I have
updated the Javadocs for the Tomcat class to try an make that clearer. I'm sure
there is scope for further improvement to the docs. Patches welcome.

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


[Bug 55312] No SCI scan in embedded Tomcat

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

Jeremy Boynes <jb...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Jeremy Boynes <jb...@apache.org> ---
I committed the change to decouple SCI loading in
http://svn.apache.org/r1507870

This should allow you to perform SCI detection separately from full
ContextConfig. Does that help for your application?

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


[Bug 55312] No SCI scan in embedded Tomcat

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

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

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

--- Comment #7 from Mark Thomas <ma...@apache.org> ---
This has been fixed in trunk. All class path entries are now scanned for
matches to @HandlesTypes.

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


[Bug 55312] No SCI scan in embedded Tomcat

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

Jeremy Boynes <jb...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |55287

--- Comment #2 from Jeremy Boynes <jb...@apache.org> ---
I'm working on a fix for 55287 and as part of that I have separated the SCI
discovery from ContextConfig. That would allow an embedder to perform their own
scan for SCIs based on just the ServletContext obtained from the Context they
are initializing.

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


[Bug 55312] No SCI scan in embedded Tomcat

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
Changing back to a bug as all classes should be scanned unless excluded via
JARs to skip.

We should also check that classes deployed to CATALIBA_[BASE/|HOME]lib are
scanned for matches to @HandlesTypes

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


[Bug 55312] No SCI scan in embedded Tomcat

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

--- Comment #4 from Dave Syer <da...@hotmail.com> ---
It helps a bit. But it's actually the scan for HandlesTypes references that I
need  to modify (populating the initializerClassMap in ContextConfig) - the
SCIs are all discovered correctly, but their handlers are not unless they are
in /WEB-INF/classes or /WEB-INF/lib/*.jar.

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


[Bug 55312] No SCI scan in embedded Tomcat

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

--- Comment #1 from Dave Syer <da...@hotmail.com> ---
I played around with the Tomcat embedded server a bit more and found that it
actually is relatively easy (if obscure) to switch on SCI:

        ContextConfig contextConfig = new ContextConfig();
        context.addLifecycleListener(contextConfig);

The biggest problem is that the classpath scanner only scans certain well-known
locations (/WEB-INF/lib/*.jar, /WEB-INF/classes I am guessing) so it doesn't
pick up anything else by default that happens to be on the classpath but in a
different location (e.g. if you launch with java -jar, or from inside an IDE).
I think that's a bigger problem than the obscure API for setting it up. There
are some mentions in comments about /WEB-INF/classes being bound to multiple
locations to help Eclipse tooling, so there is some precedence for the required
generalization, but again no obvious API for adding bindings.

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