Ok, I found a solution to mange this problem. I have my own AnnotationFinder, in this I override the Method findMetaAnnotatedClasses(...).
There I have this code (all the code you can find https://github.com/feidner/jsf-testing): if(annotation == ManagedBean.class) { List<Annotated<Class<?>>> classes = super.findMetaAnnotatedClasses(annotation); Set<Class<?>> callers = getCallersFromSomewhere(); classes.add(new AnnotatedTestObject<>(caller))); return classes; } --------------------------- public class AnnotatedTestObject<T> implements Annotated<T> { private Annotation annotation = DefaultAnnotation.of(ManagedBean.class); private T obj; public AnnotatedTestObject(T obj) { this.obj = obj; } @Override public T get() { return obj; } @Override public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { return (T)annotation; } @Override public Annotation[] getAnnotations() { return new Annotation[] { annotation }; } @Override public Annotation[] getDeclaredAnnotations() { return new Annotation[] { annotation }; } } -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/openejb-additionnal-callers-in-EmbeddedTomEEContainer-tp4681588p4681593.html Sent from the TomEE Users mailing list archive at Nabble.com.
