Tag Archives: tomee

A single TomEE ApplicationComposer instance for all your tests!


TomEE ApplicationComposer is a nice solution for embedded EE testing. The goal is to describe its application in Java and deploy this model. However it starts OpenEJB and deploys/undeploys the application either by class or method depending the setup.

When this feature can be insane for small deployments which would benefit of an insanely easy configuration and simple mock solution it can be an issue for application deploying again and again the same model.

To avoid that the coming TomEE 7.0.0-M2 provides a new JUnit runner but you can already benefit from it with a single class!

Continue reading

JavaEE and Swagger: TomEE example


More and more applications are composed of REST services. In JavaEE land it means you develop and expose JAX-RS services.

Once developped and well tested with TomEE the first thing you will realize is that to make an API useful you need to document it. There are a lot of ways to do it but Swagger seems to be the trendy one and it is indeed a nice solution as we’ll see in this post.

Continue reading

Mix TomEE embedded and Angular 2 with Maven


Since months a typical web application is a JAX-RS for the server-side and a javascript on the client-side.

This powerful architecture can sometimes reveal some challenges in the build pipeline.

However today it is not that hard to mix both frontend and backend build tools to get a single build pipeline easily integrable in a continuous integration solution.

To illustrate that we’ll digg into how to create an Angular 2 application packaged with Maven.

Continue reading

Customize your TomEE instance with javascript and maven


TomEE Maven plugin got recently a new feature allowing to use javascript (or groovy) to customize the TomEE instance you build using tomee:build goal.

Let’s see why and how to use this feature…

Continue reading

Align TomEE and DeltaSpike ciphering configuration


When you develop an application relying on a container for its awesome features you often hit the fact you use several code bases to do the same thing. In the context of this post it will be the ciphering of the passwords in the configuration:

  • TomEE does it using PasswordCipher API
  • DeltaSpike does it using ConfigFilter API
  • So finally you end up having to maintain two ciphering solutions which makes hard to production teams to maintain the configuration without developpers.

    Continue reading

Apache Johnzon JSON library and Javascript date


By default Apache Johnzon JSON-Java mapper uses the pattern “yyyyMMddHHmmssZ” for Dates. The good thing about this pattern is that it is fast enough for most cases. However, its drawback is not as common as the ISO8601 format of the RFC822.

The solution is quite simple.

Continue reading

ApplicationComposer Maven Plugin


Even if it comes from test side of OpenEJB, ApplicationComposer is now a solution to develop microservices. Because of this evolution it now gets a maven plugin to be able to go further in the development pipeline.

Continue reading

TomEE new Maven coordinates


Recently TomEE version and groupId have changed.

The new groupId is org.apache.tomee, previously org.apache.openejb.
The new version is common between TomEE and OpenEJB and is aligned on JavaEE version. It means that next major version of TomEE/OpenEJB will be the 7.0.0 version (side note: there is no engagement yet to stay aligned on EE versioning).

Also note that org.apache.openejb.maven groupId for maven plugins has been updated, as well, to org.apache.tomee.maven.

Last change, arquillian OpenEJB Embedded artifactId doesn’t contain the version anymore, as it doesn’t make sense to do
so for OpenEJB (ie arquillian-openejb-embedded-5 is now arquillian-openejb-embedded).

Servlet FORM based login


Servlet API supports FORM login by specification.

Activating it is pretty easy and few lines in your web.xml is enough.

To use a form, just configure a login-config using the provided FORM auth method:

Continue reading

TomEE Maven Plugin: finally server.xml in your pom!


Until 1.x releases to configure the server.xml related to tomee maven plugin (embedded or not) you needed to configure either its direct location through “serverXml” parameter or a “conf” folder containing a server.xml. This is working fine but it was often forcing you to create a folder containing the server.xml only.

Note: if you are not used to tomee maven plugins, you can configure almost all the container through properties in the pom.

To avoid it both plugins now got a new variable to let you provide your server.xml inline!

Continue reading