Category Archives: JEE6

Released : CDIProperties – v.1.0.0

Inspired by the tutorial about writing CDI extensions I wrote several days ago I created a CDI extension which targets exactly this topic CDIProperties This handy library enables a CDI (in a standalone or application server environment) application to directly inject properties from a property file. It’s extensible via an SPI, so that you can […]

 

0
Kudos
Don't
move!

Read more

Tutorial: Writing your own CDI extension

Today I will show you how to write a CDI extension. CDI provides a easy way for extending the functionality, like adding own scopes, enabling java core classes for extension, using the annotation meta data for augmentation or modification, and much more. In this tutorial we will implement an extension that will inject properties from […]

 

6
Kudos
Don't
move!

Read more

DataFX – @Named support (accepted)

During the christmas and new year holidays I implemented the @Named feature for DataFX. It’s already accepted and merged into the validation branch of DataFX (Thanks to Hendrik Ebbers). This feature enables a user to inject different instances of a bean into a controller, distinguished by a resource name via @Named annotation. You can, for […]

 

1
Kudos
Don't
move!

Read more

Tutorial: How to use JAX-RS and CDI together

Hi, because it’s relative hard to figure out, how to do it, I would like to show you how to combine JAX-RS and CDI. Preparation You need a Glassfish v3.x where we will run this application Gradle at least in version 1.0 Let’s start with a minimal application “The Greeter”. If you call “<your_host>/GreetMeWithJaxRSAndCDI/rest/greet/<NAME>” it […]

 

20
Kudos
Don't
move!

Read more

Gradle, Hibernate and “No Persistence provider for EntityManager named”

During the actual migration of an JEE project, consisting of several moduls (WAR, EJB ..) from Ant to Gradle I faced the following problem: In the test phase, e.g. when calling gradle test, one integration test (or should it better be called functional test? I’m not sure about this) stated out that: No Persistence provider […]

 

0
Kudos
Don't
move!

Read more

@Resource.lookup – How to solve classpath problems when compiling or testing with gradle

I’ve started this week with Gradle and tried to convert one project from maven to Gradle. Besides of some, I think beginner mistakes, I faced with the following problem. With JEE6 the @Resource annotation was extented with the “lookup” attribute. This attribute links to any resource which uses a global JNDI name. Something like this: […]

 

0
Kudos
Don't
move!

Read more