0 Replies Latest reply on May 31, 2006 1:33 PM by Zaid Omar

    Instrumenation of EJB 3.0 Entity beans

    Zaid Omar Newbie

      Hi all,

      In Hibernate, for the purpose of defining lazy properties fetching, I used to instrument the Hibernate classes using the typical ant instrumentation task:

      <target name="instrumentation" >
      <taskdef name="instrument" classname="org.hibernate.tool.instrument.InstrumentTask" classpathref="project.classpath"/>
      <instrument verbose="true">
      <fileset dir="${instrumentation.build.dest}">
      <include name="*.class"/>
      </fileset>
      </instrument>
      </target>


      However, I couldn't manage to instrument the Entity Bean POJOS properties which are annotated as lazy (fetch=FetchMode.LAZY).

      I tried to use the typical instrumentation with both following classes:
      org.hibernate.tool.instrument.cglib.InstrumentTask
      org.hibernate.tool.instrument.javassist.InstrumentTask

      however, it didn't work.

      Please let me know if there is a solution for that. As I am planning to migrate Hibernate-based web application to EJB 3.0-based and the application is heavily based on lazy properties fetching.

      Regards,
      Zaid