It would be really nice to auto generate references.
One simple (but not completly full proof) way to do it
would be to check ejb's for variables of type <ejb-
class> in the bean. If they are using a variable of the
given type then add the reference.
The only breakage I can foresee right now would be if
the context is never assigned to a variable. but I don't
think that would be a show stopper.