public Class getInvokedBusinessInterface() {
doCheck(Call.getInvokedBusinessInterface);
final ThreadContext threadContext = ThreadContext.getThreadContext();
final Class invokedInterface = threadContext.getInvokedInterface();
final InterfaceType type = threadContext.getBeanContext().getInterfaceType(invokedInterface);
if (!type.isBusiness()) {
throw new IllegalStateException("The EJB spec requires us to cripple the use of this method for anything but business interface proxy. But FYI, your invoked interface is: " + invokedInterface.getName());
}
if (invokedInterface == null) {
throw new IllegalStateException("Business interface not set into ThreadContext.");