deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Herzog" <>
Subject CDI Extension AnnotatedTypeBuilder
Date Sun, 12 May 2013 14:33:30 GMT
Hello guys


I want to add a @Transactional annotation which has an interceptor binding to our services
within our JUnit test (Deltaspike openEjb), so that the interceptor will take place when a
service method get invoked.

The problem is that I can add the annotation to our EjbService annotation (Stereotype) but
the interceptor does not take place when a service method gets invoked.

Do I miss something or is this not possible??


    public void handleEjbServiceannotation(@Observes ProcessAnnotatedType<EjbService>
annotatedType) {

        AnnotatedTypeBuilder<EjbService> builder = new AnnotatedTypeBuilder<EjbService>();


        builder.addToClass(new TransactionalLiteral());




public class TransactionalLiteral extends AnnotationLiteral<Transactional> {


    private static final long serialVersionUID = -5729507529445029857L;










        METHOD })



public @interface Transactional {












                wrapper = ConcurrentEntityUpdateException.class,

                sources = OptimisticLockException.class),


                wrapper = CoreException.class) })



public @interface EjbService {



When I try to add the annotation on the supertype of our service the interceptor does not
take place either.


Thanks in advance.


Mit freundlichen Grüßen


Thomas Herzog



curecomp Software Services GmbH

Hafenstrasse 47-51

4020 Linz


web: <> 

e-Mail: <> 

tel: +43 (0)732 9015-5563

mobile: +43 (0)664 8867 9829





  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message