It seems like it would be very easy to add another lookup method signature within InitialContext taking a class vs. a name as the parameter:
... lookup(class klass) {
return lookup(klass.getName());
}
that would relieve hundreds of places in the code to call getName().
Yes, that would be nice, but how an EJB is registered in JNDI or even that it should be registered in JNDI is not specified by the spec. :(
Do you want to vote for a different default for JBoss at least?
Bill