Microservices and Apache TomEE

in msa •  7 years ago 

original source

Microprofile

Microprofile is currently built on minimum footprint technology statck that includes JAX-RS, CDI and JSONP. More capabilities will be added going foward to build a more robust Microservices platform.

its current release is 1.2 is based on Eclipse Foundation under Apache 2.0 license

http://microprofile.io

Apache TomEE Microprofile

Apache TomEE is product from Tomitribe which is one of the vendor contributing towards Microprofile project.

@ApplicationScoped
@Produces({MediaType.APPLICATION_JSON})
@Path("/expenses")
public class ExpenseEndpoint {
    
    private Map<String, List<Expense>> expenses;
    
    @GET
    @Path("{customerId}")
    public List<Expense> getExpenses(@PathParam("customerId") String customerId) throws Exception {
        expenses = loadExpenses();
        return expenses.get(customerId);
    }
...
....
    <dependencies>
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.8.7</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>tomeeweb</finalName>
        <plugins>
        ...
            <plugin>
                <groupId>org.apache.tomee.maven</groupId>
                <artifactId>tomee-maven-plugin</artifactId>
                <version>7.0.1</version>
                <configuration>
                    <tomeeClassifier>webprofile</tomeeClassifier>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
....
mvn package
java -jar target\<buildname>-exe.jar
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @namoo4u! You received a personal award!

1 Year on Steemit

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @namoo4u! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!