Is there another forum that would be more appropriate, or failing that, more likely to have an answer, for this question?
JBoss does it by calling container.getEjbJndiName(businessInterface).
You might be able to access the Ejb3Registry to get the right container, but it's tricky business.
I like the functionality though, you should open up a Jira issue.
I did a little experimenting based on wolfc's suggestion last night; it looks like by the time code is running in a webapp context Ejb3Registry.getContainers() returns an empty collection. I'm willing to bet this is classloader-related: web applications do not run in the same classloader context as ejb3 deployment, where calls to Ejb3Registry methods normally go.
You could create a stateless session bean to do the lookup.
Do you have an API in mind?
Maybe a lookup java:comp/Registry or something, which can also be injectable.