String localHome = smd.getLocalHome();
// If remote, need home
if ((remote != null && remote.trim().length() > 0) && (home == null || home.trim().length() == 0))
{
throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x remote component interface of "
+ remote + " but has no home; " + errorMessageSuffix);
}
// If home, need remote
if ((home != null && home.trim().length() > 0) && (remote == null || remote.trim().length() == 0))
{
throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x home interface of " + home
+ " but has no remote component interface; " + errorMessageSuffix);
}
// If local, need localHome
if ((local != null && local.trim().length() > 0) && (localHome == null || localHome.trim().length() == 0))
{
throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x local component interface of "
+ local + " but has no localHome; " + errorMessageSuffix);
}
// If localHome, need local
if ((localHome != null && localHome.trim().length() > 0) && (local == null || local.trim().length() == 0))
{
throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x local home interface of "
+ localHome + " but has no local component interface; " + errorMessageSuffix);
}
// Log OK
log.trace("Passed validation for " + errorCode);