Description
If no specific bean type is given for getReference we currently use bean.getBeanClass(). But this is actually wrong for producer methods and producer fields as those will return the containing class.
This is only a minor enhancement as it only hits us if we enter the getEjbOrJmsProxyReference path. This gets used if we @Inject a pure EJB in which case the EJB container might not even take this information into account.