Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

EJB 3.0 Interceptors

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I have some doubts regarding EJB 3.0 Interceptors.

First, according to the EJB 3.0 Core specification, lifecycle call back methods can only throw System Exception. How about @AroundInvoke Interceptor methods? Can a method with @AroundInvoke throw Application Exception?

Second, I don't quite understand the below statement from EJB 3.0 specification.

The deployment descriptor may be used to augment the interceptors and interceptor
methods defined by means of annotations. When the deployment descriptor is used to augment
the interceptors specified in annotations, the interceptor methods specified in the deployment descriptor
will be invoked after those specified in annotations, according to the ordering specified in sections
12.3.1 and 12.4.1.



Does it mean that interceptors specified in the deployment descriptor are always invoked after the interceptors defined by annotations?

Thanks in advance.

Regards,

Kyi Hein
 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,


Does it mean that interceptors specified in the deployment descriptor are always invoked after the interceptors defined by annotations?



Right, that's correct.

Regarding @AroundInvoke, if we are intercepting the business method then we can throw ApplicationException like Business methods.

Regards,
Amit
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic