To tell you the truth, the only benefit that i can see is to use that reference in a helper class called from the class where the class level DI was used.
So lets say init looked like this:
HelperClass hc;
public void init(){
hc = new HelperClass();
}
and helper class
public class HelperClass{
AuditService audit;
public HelperClass(){
....
audit = (AuditSevice) initialContext.lookup("audit");
}
}
This allows you to bind a resource injected at runtime to local jndi.
Remember that if you use DI on field level, you can still access it via jndi, it is just the whole class path + "." classname + field name. Using class level di just makes it easier to access that resource.
This is a quote from bea.com
The class-level annotations declare an entry in the application component's environment but do not cause the resource to be injected. Instead, the application component is expected to use JNDI or component context lookup method to lookup the entry. When the annotation is applied to the class, the JNDI name and the environment entry type must be specified explicitly.
Maybe someone else can explain it better....sorry!