Configuring JDBC in TomEE

By Apache TomEE, Jakarta EE, Java EE, TomEE, Tutorials No Comments

A question that comes up frequently in the TomEE community and with Tomitribe’s support customers is “How do I configure a JDBC driver?” There are a number of ways to do this, but I’m going to talk about the two most common methods. You can configure a JDBC driver for the entire TomEE application server or for a specific webapp. Regardless of which way you choose to do it, the configuration syntax is the same. NOTE: You can also configure a JDBC DataSource directly within an @Resource annotation but this is not recommended and is not covered here. See the…

Read More

Using the TomEE Maven Plugin

By Apache TomEE, Maven, TomEE, Tutorials No Comments

If you are looking for the fastest way to download, install, and run TomEE with or without webapps, then look no further! This blog post shows how to use the TomEE Maven Plugin to easily install and run TomEE and webapps with a single command. Clean TomEE Install The TomEE Maven Plugin will download, install, and run TomEE with a single Maven command: $ mvn tomee:run Just copy the pom.xml file below – (you can also get it from GitHub) – then run the command above and the TomEE Maven Plugin will download, install, and run a clean installation of…

Read More

How to create a microservice with Eclipse MicroProfile and Apache TomEE

By Apache TomEE, Eclipse Foundation, Jakarta EE, Java EE, MicroProfile, Open Source, TomEE No Comments

At Tomitribe we are active stakeholders on projects like Apache TomEE, Eclipse MicroProfile and Eclipse JakartaEE and provide Enterprise Support for these and other Open Source projects like Apache Tomcat & Active MQ. In this article, we will cover how developers can create a microservice with Java using the Eclipse MicroProfile specifications with the DevOps friendly application server, Apache TomEE. If MicroProfile is a topic you want to learn more about, we have many other blog posts covering the basics of Eclipse MicroProfile with details of each of the specifications along with examples. The official Apache TomEE project website also…

Read More

Microservices Metrics targets with Eclipse MicroProfile

By Apache TomEE, Eclipse Foundation, MicroProfile No Comments

In our previous blog post, Getting Started with Microprofile Metrics, we covered the basic concepts about metrics scopes and types of application metrics you can include in your existing JAX-RS endpoints. In this article, we are going to summarize the metadata and default values from the Eclipse MicroProfile Metrics annotations and how they should be applied. The type of annotations applied to a target tracks how that target (field, method, etc.) is measured and the default values help us to make our code cleaner. Default units and targets per annotation Table No.1 describes each of the Metrics annotations and the…

Read More

Conviértete en un Contributor de Open Source con Apache TomEE

By Apache TomEE, Community, Open Source, TomEE No Comments

Durante esta sesión de video, Daniel Dias y Cesar Hernandez comparten sus retos, oportunidades y recomendaciones para iniciar a contribuir en proyectos de Código Abierto como lo és Apache TomEE. La demostración de la sesión incluye como desde cero llegar a colocar un pull-request en el proyecto Apache TomEE cubriendo los aspectos de herramientas, procesos y comunicación.

Read More

TomEE MicroProfile on Heroku

By Apache TomEE, MicroProfile, Open Source, TomEE No Comments

Following up on his last article, “CRUD with TomEE, MicroProfile, and REST”, Hayri Cicek deploys the TomEE MicroProfile application on Heroku, a cloud provider. Heroku is a cloud platform as a service (PaaS) supporting several programming languages and I’ve been using it for several years without any problems. Visit https://signup.heroku.com/dc and create a free account. TomEE configuration Inside projects root directory create the Procfile and add the following: web: java -DadditionalSystemProperties=-Dhttp.port=$PORT -jar target/blog-exec.jar The Procfile is used to specify commands executed by the app’s Heroku containers, which they call “dynos”. Dynos are isolated, virtualized Linux containers designed to execute code…

Read More

Tomcat RCE Vulnerability via JSP Upload Bypass

By Apache TomEE, Open Source, TomEE No Comments

Tomitribe’s Jonathan Gallimore (@jongallimore) explains how easy it is to exploit a simple configuration vulnerability in Apache Tomcat and take over your entire server. He also explains how easy it is to prevent this from happening with a simple configuration change. This is an older exploit but one that may not be patched on your own installation. Watch the video to ensure you are protected! Tomitribe’s Enterprise Support service works with Sonatype to monitor all reported vulnerabilities to Tomcat, TomEE, and ActiveMQ to help protect our customers from malicious hackers. Learn more about how we help protect our customers here.

Read More

Singleton Session Beans: Eager initialization and ordering

By Apache TomEE, Jakarta EE, Java EE, TomEE No Comments

Tomitribe support customers often use Java Singleton EJBs, and while powerful the sequence of startup and initialize can be confusing. This tutorial will help explain how Singleton EJB’s can be eagerly initialized at application startup and how we can define a priority during this process. Review EJB Annotations Before jumping into the code let’s do a recap of the following annotations used in this blog post: @Singleton Component-defining annotation for a singleton session bean. @Startup Marks a singleton bean for eager initialization during the application startup sequence. @DependsOn Used to express an initialization dependency between singleton components. The container ensures…

Read More