{
RA10MetaData ra10 = ((JCA10DTDMetaData) cmd).getRa10();
if (ra10 == null || ra10.getManagedConnectionFactoryClass() == null
|| ra10.getManagedConnectionFactoryClass().equals(""))
{
throw new ValidateException("ManagedConnectionFactoryClass should be defined");
}
return cmd;
}
//make sure all need metadata parsered and processed after annotation handle
if (cmd.getRa() == null)
throw new ValidateException("ResourceAdapter metadata should be defined");
//make sure ra metadata contains inbound or outbound at least
boolean inboundOrOutbound = false;
if (validateOutbound(cmd.getRa().getOutboundRa()))
inboundOrOutbound = true;
if (validateInbound(cmd.getRa().getInboundRa()) && cmd.getRa().getRaClass() != null)
inboundOrOutbound = true;
if (!inboundOrOutbound)
throw new ValidateException("ResourceAdapter metadata should contains inbound or outbound at least");
return cmd;
}