0

TomEE and more advanced resource configuration


TomEE 2 got two new interesting features (in particular in enterprises) to configure resources: default placeholder values and properties-provider.

Continue reading

0

TomEE, CDI and JAX-RS @Providers


TomEE trunk is now using CXF 3 as JAX-RS provider.

Providers were generally configured using openejb-jar.xml or just auto discovery (when using good defaults) but now in TomEE 2.x CDI and JAX-RS providers are linked.

It means you can @Inject inside your provider if the provider type is a CDI bean with @Default qualifier.

4

MDB and mails: yes it works!


Message Driven Beans (MDBs) are often linked to JMS but actually there is no link at all!

Using ironjacamar you can listen on your mail box :).

Continue reading

0

Get git information in your CDI application easily thanks to DeltaSpike and git-commit-id-plugin


Having SCM information in the project is really interesting to dump them at startup for instance.

There are several ways to do it.

One easy is to use templating-maven-plugin and filter a .java with these information but it has several drawbacks:

Continue reading

0

Apache TomEE Maven Plugin and web developement, easier reload


When developping a web application one boring task can be to redeploy an application for a css update.

There were some solution in tomee maven plugin (mainly synchronization based on timers) but this is not as smooth as it should be.

That’s why the plugin was enhanced for the coming 1.7.0.

Continue reading

2

Json API (JavaEE 7) + Java 8: collection to JsonArray


JavaEE 7 brings an API for JSON arrays (the surprising JsonArray ;)), Java 8 brings a stream API and lambdas so now you can combine both to create a JsonArray from a Collection!

Continue reading

0

TomEE CXF configuration tip: link Services and Resources


TomEE CXF configuration is mainly done in openejb-jar.xml to either use qualified name or service id to reference to more complicated objects.

For instance you can reference jsonProvider in openejb-jar.xml and define it in resources.xml like it:

<Service id="jsonProvider" class-name="org.superbiz.MyJsonProvider">
  rootName = foo
</Service>

It is also possible to link two services together using $:

Continue reading

2

Json Processing specification implementation: Apache enters the game


JSR 353 is part of JavaEE 7 and until today mainly glassfish implementation was available (found also https://github.com/vvakame/jpp-jsr353-impl on github). Since Apache will need its implementation (TomEE and CXF for instance ;)) and since JSon is a very common need at Apache, creating an incubator project for it didn’t create a big debate.

Continue reading

0

War-overlay TomEE to deploy your EE application in Tomcat


Regularly we see TomEE users wanting to deploy their app in Tomcat. Most of the time it is because they can’t select the container (company policy, cloud…).

Until now it needed some advanced knowledge, now it is easier :).

Continue reading

2

EJBContainer, OpenEJB and single start/stop by (test) JVM


When testing a EE application you regularly rely on EJBContainer.

One issue is its lifecycle handling. Most of implementations map it (and that’s really correct) to the test lifecycle. In summary it looks like:

@BeforeClass
public static void boot() {
    container = EJBContainer.createEJBContainer();
}

@AfterClass
public static void shutdown() {
    container.close();
}

Continue reading