tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommy Pham <tommy...@gmail.com>
Subject Re: Tomcat embedded
Date Thu, 20 Jun 2019 09:14:40 GMT
Hi Mark,

Thanks for the feedback.

On Mon, Jun 17, 2019 at 4:19 AM Mark Thomas <markt@apache.org> wrote:

> On 17/06/2019 01:04, Tommy Pham wrote:
> > Hello everyone,
> >
> > 1) Is there an official documentation for embedding TC process?  My
> search
> > shows various how-to on other sites.
> >    a)  If not, I guess I could request to be added to the wiki to
> > contribute one.  Since I don't quite know all the details of TC, is
> there a
> > review process to ensure clarity and complete coverage of embedding
> process?
>
> The Javadoc is probably the best place to start:
> http://tomcat.apache.org/tomcat-9.0-doc/api/index.html
>
>
I have started browsing through the API and have concluded shortly
thereafter that, to me, the best way to implement it is similar to my
current use of ServletContainerInitializer.  Just need another class with
some adjustments and the app could run with Tomcat embedded.  I was hoping
to read something more akin to the official guide:

http://tomcat.apache.org/tomcat-9.0-doc/index.html


> There is a lot more information that could be presented there. Patches
> welcome.
>
> A Tomcat committer will review any patch before applying it.
>
> > 2) (probably better to ask the dev list?) I noticed there are some
> > differences in the official binary distribution vs development
> environment:
> >    a)  Official has annotations-api.jar while development has according
> to
> > gradle:
> >
> > default - Configuration for default artifacts.
> > +--- org.apache.tomcat.embed:tomcat-embed-core:9.0.+ -> 9.0.21
> > |    \--- org.apache.tomcat:tomcat-annotations-api:9.0.21
> >
> > while the jar file names are different, the classes' name and the jar's
> > manifest within appear to the same.  I think this is trivial.
>
> Whenever you wonder why a line of code is they way it is, running git
> blame on the file is usually informative.In this case it will lead you to:
>
> https://github.com/apache/tomcat/commit/1386eaac4d07b6bbae69b3981fe1f873a56b7cae
>
>
> >    b)  ecj version differences:  the official binary uses ecj-4.10.jar
> > while the development, per gradle, uses ecj-3.16:
>
> It is the same version. The difference is due to where the JARs are
> obtained from. The Tomcat build script gets it from The Eclipse IDE 4.10
> downloads - hence the version used. The pom.xml go directly to Maven
> Central which uses the internal version number 3.16. If you look in the
> manifests you'll see the internal version info is the same.
>
> Mark
>
>
Thank you for the clarification regarding the version differences.

Thanks again,
Tommy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message