main website home
  • About this blog

    This blog features updates, opinions, and technical notes from Caucho engineers about Caucho products, the enterprise Java industry, and PHP. Caucho Technology is the creator of the Resin Application Server and the Quercus PHP in Java engine. A leader in Java performance since 1998, Caucho is a Sun JavaEE licensee with over 9000 customers worldwide.
  • Tags

    ajaxworld bam candi cdi cloud cluster comet configuration deploy devoxx eclipse ejb embedded flash flex google app engine hessian hmtp ioc java ee 6 javaone javazone jms messaging newsletter nyjug osgi php pomegranate quercus resin resin 4.0 REST servlet sfjug silicon valley code camp spring testing training tssjs watchdog webbeans web profile websockets wordpress
  • Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
« @Module - previewing JDK 7
@Inject popularity »

EJB/CDI shared Aspects

As I’ve been working through the CDI TCK, and Emil and Reza are working through the EJB TCK, we’re seeing the same shared capabilities for both kinds of beans. Both CDI beans and EJB beans have the same aspects, which makes sense because they have the same cross-cutting concerns.

Conceptually, the aspects are all designed out of @Interceptors, which CDI/EJB supports in two flavors: EJB’s direct naming of the interceptor classes, and CDI’s declarative description using the @InterceptorBinding. CDI’s bindings are a bit more descriptive because your code says what it wants to do, named by the custom binding, not who is responsible for doing it like the EJB interceptor class.

In Resin, we’ve added the EJB custom aspects to any CDI bean, i.e. essentially any Java class, including servlets, filters, and JSF beans. The predefined aspects in EJB are:

  • transaction boundaries: @TransactionAttribute
  • security: @RolesAllowed, @RunAs
  • async/messaging: @Asynchronous
  • locks: @Lock
  • and the custom @Interceptors and @Decorators

Tags: cdi, ejb, web profile

This entry was posted on Monday, May 3rd, 2010 at 9:38 am and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.


Caucho Technology is proudly powered by WordPress and Quercus®
Entries (RSS) and Comments (RSS).

  • HOME |
  • CONTACT US |
  • DOCUMENTATION |
  • BLOG |
  • WIKI 4 |
  • WIKI 3 |
  • Resin: Java Application Server
Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.
resin® is a cloud optimized, java® application server that supports the java ee webprofile ®