YAML is a nice and readable format for configuration allowing to set your properties hierarchically making them organized and readable. Let see how to use this format with Apache DeltaSpike @ConfigProperty injections!
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 […]
DeltaSpike configuration: read where you want and decrypt passwords DeltaSpike configuration is a very elegant configuration solution for CDI. However to make it fitting your application you often need to integrate it: to read the configuration from the source/location you desire to use a custom algorithm to decrypt passwords or sensitive data Read your own […]
OpenEJB/TomEE ApplicationComposer design is to describe a test application with an in memory model close to the xml EE one (Beans for beans.xml, EjbJar for ejb-jar.xml…). But when it comes to CDI and since it was mainly designed for small apps it is hard to say “I have a CDI dependency/library”. The more obvious use […]
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:
DeltaSpike is now providing a Data module allowing to use interface or abstract classes as repositories for JPA (a bit like spring-data). It got recently a new feature aiming to support DTOs pattern. I’ll just show how to use it on a simple “User” entity in this post.
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 […]
If you never implemented a CDI context/scope it is a simple as implementing this interface: Note: in CDI 1.1 there is AlterableContext too which just adds a destroy(Contextual) method which is not important for this post so I will ignore it but I would recommand you to use it instead of Context if you can […]
Writing a website today often looks like writing a REST server to provide data to a rich client side application. JavaEE is a killing stack to quickly deploy a JAX-RS application and everybody is using angularjs for the client side. However there are several alternatives that worth a look. One of them I particularly like […]
Lambda + CDI in Alpha! Lambda are nice new features of Java 8 and I’m sure we’re still missing a lot of their uses to get nicer API in all domains where Java can be used (i.e all domains ;)). However, it is often limited to JavaSE only. Typically, you can desire to get “injected” […]