// Get Business Locals
BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
// Get Business Remotes
BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
// Get Local Home
String localHome = StringUtils.adjustWhitespaceStringToNull(smd.getLocalHome());
// Get Remote Home
String remoteHome = StringUtils.adjustWhitespaceStringToNull(smd.getHome());
// Determine if there are local/remote views
boolean hasLocalView = (localHome != null || (businessLocals != null && businessLocals.size() > 0));
boolean hasRemoteView = (remoteHome != null || (businessRemotes != null && businessRemotes.size() > 0));
// If no local or remote views
if (!hasLocalView && !hasRemoteView)
{
throw new RuntimeException("EJB " + smd.getEjbName() + " has no local or remote views defined.");