@Override
protected Object lookupEJB(Context context, Class<?> fieldType) throws Exception
{
InitialContext initcontext = createContext(context);
return lookupRecursive(fieldType, initcontext, initcontext.listBindings("/"));
}
//TODO No, no no: we must look up a known location from metadata, not search for a matching type in the whole JNDI tree
protected Object lookupRecursive(Class<?> fieldType, javax.naming.Context context,
NamingEnumeration<Binding> contextNames) throws Exception