Monthly Archives: June 2014

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

Advertisements

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

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