Skip to content

Simplify using Pippo with externaly created servers #627

@gkresic

Description

@gkresic

Few observations:

pippo-demo-servlet demonstrates how Pippo could currently be embedded into any servlet container. Provided way works, but doesn't play well with DI concepts. It even, as far as I can see, creates two instances of ServletApplication: one in ServletDemo.java:27 and another one in PippoFilter.java:259

PippoServletContextListener is another way, but it requires user to produce its own server initializer. However, there is no docs on what is needed to configure the server (just registering PippoFilter?) nor default implementation exists (at least not for Jetty).

If user opts to use provided WebServers (JettyServer, TomcatServer and UndertowServer) it is limited to either use internal, Pippo-created server or extend any of those classes, but loose ServiceDiscovery bindings.

Finally, when using external server, Pippo class is not needed at all. If fact, since it represents just a bundling of Application and (internally managed) WebServer, it may as well be renamed to PippoLauncher.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions