Hello Mark,

Thanks for the information. I will try it this way. I do not want to use more packages as needed.

Regards,

Marco

Op 30-03-13 19:06, Mark Struberg schreef:
Hi Marco!

Please don't do beans.iterator().next() - you can do BeanManager#resolve() 
instead.

Also Bean<T> != Contextual Instance of T

You would to create a CreationalContext<T> and invoke BeanManager#getReference

You might take a look at Apache DeltaSpike BeanProvider [1] which provides easy 
helpers for exactly that: getContextualReference(..)
Plus this also works in environments without a writeable JNDI contract like in 
plain tomcat.

LieGrue,
strub

Reply via email to