public Class<?> getMessagingType()
{
if (messagingType == null)
{
MessageDriven annotation = (MessageDriven) resolveAnnotation(MessageDriven.class);
messagingType = annotation.messageListenerInterface();
if (messagingType.getName().equals(Object.class.getName()))
{
Set<Class<?>> businessInterfaces = ProxyFactoryHelper.getBusinessInterfaces(getBeanClass(), false);
if (businessInterfaces.size() > 1 || businessInterfaces.size() == 0)
throw new RuntimeException("Unable to choose messagingType interface for MDB " + getEjbName() + " from " + businessInterfaces);