Coder Social home page Coder Social logo

thorntail-poc's Introduction

Build Status License Maven Central Join the chat at freenode:thorntail

Thorntail: Rightsize your JavaEE Applications

Issues for v2/master are being tracked using the Red Hat issue tracking system (JIRA). Issues for v4 are being tracked in GitHub Issues. Bug reports and feature requests are greatly appreciated.

Thorntail Core

Thorntail provides a mechanism for building applications as uber jars, with just enough of the WildFly application server wrapped around it to support each application's use-case.

Note: Thorntail requires Maven 3.2.5 or higher for building your application.

Note: Thorntail requires JDK 8 or higher for building your application or for building Thorntail itself.

Project Configuration

In a normal WAR-based maven pom.xml, simply add the following

<plugin>
  <groupId>io.thorntail</groupId>
  <artifactId>thorntail-maven-plugin</artifactId>
  <version>${version.thorntail}</version>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>package</goal>
      </goals>
    </execution>
  </executions>
</plugin>

This will take the .war file normally created by your build, and wrap it in the wildfly-swarm mechanisms.

If you normally produce myapp-1.0.war, in your target/ directory will then also be present a myapp-1.0-thorntail.jar.

In order to specify the portions of the WildFly AS your application needs, your pom.xml should specify some of the following dependencies within the io.thorntail Maven group-id:

  • bean-validation
  • cdi
  • ee
  • io
  • jaxrs
  • logging
  • naming
  • request-controller
  • security
  • transactions
  • undertow
  • and many more!

How To Build Thorntail Itself

Thorntail attempts to be a well-behaved Maven project. To install to your local repository for usage:

mvn clean install

If you're running short on time:

mvn clean install -DskipTests

Documentation

For a more complete set of documentation, go to the Thorntail Guide.

Community

  • We hang out in #thorntail on irc.freenode.net.

thorntail-poc's People

Contributors

antoinesd avatar bobmcwhirter avatar ericwittmann avatar gastaldi avatar gobasmis avatar gunnarmorling avatar jesuino avatar johnaohara avatar kenfinnigan avatar kg6zvp avatar ladicek avatar matzew avatar michalszynkiewicz avatar mkouba avatar pavolloffay avatar sanne avatar sberyozkin avatar starksm64 avatar thesteve0 avatar vorburger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thorntail-poc's Issues

Multiple EntityManagerFactory instances per PersistenceUnit are created

Observed:
In the current JPA module implementation, multiple EntityManagerFactory instances are created. (This is not a bug in Hibernate, but in the CDI service provider)

As stated in the JPA spec: "Only one EntityManagerFactory is permitted to be created for each
deployed persistence unit configuration."

I will create a test and submit a PR for this.

Support Hibernate OGM

Since Thorntail is targeting microservices, which often are run in the cloud, I believe that Thorntail should have a module/fraction/component for Hibernate OGM.

I realize that OGM is not a fully-mature project as Hibernate ORM is and some basic operations (ie: delete in MongoDB) are not supported by the ORM layer at all. However, I think OGM is great for startups who might want to store data for something like their ReST API in Cassandra or CouchDB without being locked tightly into dao code specific to those datastores.

Make a simple Archetype

Let's have one that at least just has all the POM stuff filled in.

We might also want to have one that stubs out @kenfinnigan 's HOWTO and call it quickstart

Default management port when web specified

If web.primary.port is set to something other than 8080 but web.management.port is not set, then the latter ends up pointing to 8080.

It might be a good idea to default web.management.port to the same as web.primary.port

Jax-RS dependency not sufficient for simple Jax-RS project

The following error is thrown:
java.lang.AbstractMethodError: javax.ws.rs.core.Response$ResponseBuilder.status(ILjava/lang/String;)Ljavax/ws/rs/core/Response$ResponseBuilder;

Steps to Reproduce:

  1. Ensure latest version of 4.x branch has been installed to local maven repository
  2. Create a JavaEE project
    1. put beans.xml in src/main/resources/META-INF/
    2. add a class which extends javax.ws.rs.core.Application with a javax.ws.rs.ApplicationPath annotation on it
    3. Add another class with a @GET endpoint which returns a String
  3. Configure pom.xml
    1. Set packaging to jar
    2. add thorntail-maven-plugin
    3. add thorntail-jaxrs as a dependency
    4. add thorntail-bom to dependencyManagement
  4. Package and run the project
  5. Invoke curl against your api endpoint and you will receive the following error:
ERROR : Do Mai 10 15:22:20 PDT 2018 [io.undertow.request] UT005023: Exception handling request to /api/test
java.lang.AbstractMethodError: javax.ws.rs.core.Response$ResponseBuilder.status(ILjava/lang/String;)Ljavax/ws/rs/core/Response$ResponseBuilder;
	at javax.ws.rs.core.Response$ResponseBuilder.status(Response.java:921)
	at javax.ws.rs.core.Response.status(Response.java:592)
	at javax.ws.rs.core.Response.status(Response.java:603)
	at javax.ws.rs.core.Response.ok(Response.java:638)
	at javax.ws.rs.core.Response.ok(Response.java:650)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:353)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:248)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:235)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209)
	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at io.thorntail.jaxrs.impl.opentracing.servlet.BetterSpanFinishingFilter.doFilter(BetterSpanFinishingFilter.java:55)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:197)
	at io.undertow.server.handlers.HttpContinueReadHandler.handleRequest(HttpContinueReadHandler.java:65)
	at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:94)
	at io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:217)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:332)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.