AspectJ 1.2 released


News: AspectJ 1.2 released

  1. AspectJ 1.2 released (11 messages)

    AspectJ 1.2 was released today. Full details of the release can be found in the accompanying README. In related news, we also released AJDT version 1.1.10 which includes the 1.2 compiler and works on Eclipse 3.0 M9.

    Feature highlights

    • Much faster compilation and weave times (approx. twice as fast in many cases) than 1.1.1.
    • Support for a new option -XlazyTjp which generates code that runs faster and uses less memory in some common cases.
    • Faster incremental compilation, coupled with incremental support for binary resources.
    • The return of ajdoc, which generates javadoc-like html containing information about aspects and shows cross-cutting structure (e.g. "advised-by" hyperlinks for methods).
    • Better out-of-the-box support for load-time weaving, including a sample command-line script you can use straightaway, and also a class loader and adapter implementation if you need to integrate AspectJ's load-time weaving into an existing server.
    • Much improved error messages (with source context information for weaver messages restored).
    • New lint warnings help catch common mistakes and advise on changes to serializability.
    • The new -Xreweavable option allows class files to be woven more than once.
    • A new -inpath option allows both jar files and directories to be specified as input to the weaver.
    More AspectJ 1.2 details at

    Read some thoughts on the JavaOne AOP panel

    Threaded Messages (11)

  2. AspectJ 1.2 released[ Go to top ]

    Congratulations to your Adrian and the rest of the AspectJ team. My download is stuck at 39%. Can't wait to play with this release. :)

  3. I apologize in advance as this may not be the best forum for this question :

    Has anybody used AOP related techniques with EJB based applications for maintaining audit information. We recently added 4 fileds " createdBy", "modifiedBy", "createdTime" and "modifiedTime" to all our entity tables.

    I think AOP may be the best way to inject this audit functionality into existing code but I have no experience with AOP. Has anyone tried this with AOP ? Doe it impact your existing CMP Entity beans and CMRs ?

  4. AOP as triggers ?[ Go to top ]


    I suggest to use old-styled database triggers.
    Oracle's HeadStart utility provides complete generation
    of these 4 columns and their maintainance for whole database!
    This way you will be covered from any modification, not only
    from J2EE side. The only week point here is lost of identity
    in connection pools. This can be fixed by setting
    DBMS_APPLICATION_INFO and using this in triggers
    (of cource if INFO=NULL then use USER).
  5. AOP as triggers ?[ Go to top ]


    Thanks for the reply . But if we are using a Weblogic connection pool , how will the trigger know which user updated the record ? we need to stiore the user id of the user who cerates or updates the entries.

  6. In Oracle - DBMS_APPLICATION_INFO[ Go to top ]


    1. I do not know weblogic pool, but the aproarch is general.

    2. some pool provide placeholder for "validation sql" or
    some kind of pre-releasing callback to perform any
    action BEFORE pool gives connection to user's code.
    You can get middle-layer session user-id form
    appropriate context and set oracle session.

    details can be found here (just Google DBMS_APPLICATION_INFO):

    3. Triggers can read from DBMS_APPLICATION_INFO, and if info is not
    set, than get ordinary Oracle user.

    4. If weblogic does not provide convinient callback, may be
    it will be possible to encapsulate pool into another object
    with callback.

    5. I do not know exact connection handling strategy inside weblogic.
    (theoretically, connection can be stored in componets reusable for
    several users) In this case, it will be more appropriate
    to set info somewhere in transaction
    manager , on start of every thansaction.

    6. It works. We used (open sourced) bitmechanic pool and
    home implementation of JTA.
    It was 3-5 lines and our DBA was very glad.

    Alex V.
  7. If you are using JBoss, you can use a "valid-connection-checker". This class is normaly used to check the validity of the Connection. But, as it will be invoked every time the Connection pool gives the user a Connection, you can use it to set the DBMS_ APPLICATION _INFO. You declare such a class in the oracle-ds.xml like this: jdbc/myDS jdbc:oracle:thin:@ oracle.jdbc.driver.OracleDriver MyEncryptDBPassword test.MyValidConn Oracle9i Your class must implement the org.jboss.resource.adapter.jdbc.ValidConnectionChecker interface. If you use Maven, you can include this interface with the following dependency: jboss jboss-common-jdbc-wrapper 3.2.3 provided This interface has only one method: isValidConnection. I copy my implementation: public SQLException isValidConnection(Connection arg0) { CallableStatement statement; try { statement = arg0.prepareCall("call dbms_application_info.set_client_info('"+getInfos()+"')"); statement.execute(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } Hope it helps ! BenoƮt
  8. This is a very common requirement. In Hibernate we solve this using Interceptor.onSave() and Interceptor.onFlushDirty(). A similar feature will probably find its way into the EJB3 spec.

    Actually, I don't think its a use case for AOP in the sense of aspectj, since the events you are trying to intercept are /container/ events, not events in your own classes.
  9. AspectJ 1.2 released[ Go to top ]

    I guess I also have the issue with downloading.
    I can't go beyond 23%...
    May be there are too many people clogging the network??
  10. AspectJ 1.2 released[ Go to top ]

    I guess I also have the issue with downloading.I can't go beyond 23%...May be there are too many people clogging the network??
    Wouldn't doubt it. People are trying to get Eclipse too. I've tried the last 2 days - without success.
  11. Off-topic but...[ Go to top ]

    Maybe eclipse folks could use bittorrent to solve this network trafic problem.
  12. Just use a mirror...[ Go to top ]

    Maybe eclipse folks could use bittorrent to solve this network trafic problem.
    I used a mirror in Denver (I'm in AZ) to get eclipse and had no problems.