buildtime bytecode instrumentation is only required if you want use lazy loading for basic properties (String, byte[], etc).
for lazy loading associations just use fetch plan in your mapping e.g: @OneToOne(fetch = FetchType.LAZY)
for lazy loading basic properties: @Basic(fetch = FetchType.LAZY) and enhance your entities with Ant task like:
Code:
<project name="enhance" basedir="." default="instrument">
<property name="root_dir" value="/libraries" />
<path id="compilation.classpath.id">
<fileset dir="${root_dir}/hibernate">
<include name="*.jar" />
</fileset>
<fileset dir="${root_dir}/javassist">
<include name="*.jar" />
</fileset>
<fileset dir="${root_dir}/slf4j">
<include name="*.jar" />
</fileset>
<fileset dir="${root_dir}/log4j">
<include name="*.jar" />
</fileset>
</path>
<target name="instrument">
<taskdef name="hibernateinstrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
<classpath>
<path refid="compilation.classpath.id" />
<pathelement path="bin" />
</classpath>
</taskdef>
<hibernateinstrument verbose="true">
<fileset dir="bin">
<include name="**/*.class" />
</fileset>
</hibernateinstrument>
</target>
</project>