This is my first time posting. Apologies if I have not followed the rules/standards/procedures. The problem I have is the following:
I have the following stateless bean defined:
@Stateless(name = "ReportQueueSenderBean", mappedName = "ReportQueueSenderBean")
@EJB(mappedName = "ReportQueueSenderBean",
name = "ReportQueueSenderBean",
beanInterface = ReportQueueSenderLocal.class,
beanName = "ReportQueueSenderBean")
public class ReportQueueSenderBean implements ReportQueueSender, ReportQueueSenderRemote,
ReportQueueSenderLocal
{
etc
}
The interfaces for the above bean are defined as follows:
public interface ReportQueueSender
{
void addToQueue(ReportRequest repRequest, String clientid) throws Exception;
int determineNumMessagesInQueue() throws JMSException;
}
@Remote
public interface ReportQueueSenderRemote extends ReportQueueSender
{
//Marker interface
}
@Local
public interface ReportQueueSenderLocal extends ReportQueueSender
{
//Marker interface
}
And then I have the following message driven bean implemented:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destination", propertyValue =
"queue/OnlineReportingEngineQueue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue =
"javax.jms.Queue")
})
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class ReportQueueReceiverBean implements MessageListener
{
@Override
public void onMessage(Message message)
{
etc.
}
etc.
}
I get the following error at deployment time:
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0094: EJB 3.1 FR 5.4.2 MessageDrivenBean xxxxx.ReportQueueSenderBean does not implement 1 interface nor specifies message listener interface at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getMessageListenerInterface(MessageDrivenComponentDescriptionFactory.java:193) at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:154) at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:83) at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:50) at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:76) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176) ... 8 more
The strange thing though is that ReportQueueSenderBean is not defined as a message driven bean but we get the "MessageDrivenBean xxxxx.ReportQueueSenderBean does not implement 1 interface nor specifies message listener interface" error. Any ideas please?
I'm using jboss version: Release: 10.0.3.Final Product: WildFly Full 18.0.1.Final
using ejb specification 3.1 I believe.
Any suggestion is highly appreciated.
Thanks, Vick.
Additional info:
- Both the ReportQueueSenderBean and the ReportQueueReceiverBean classes are in the same package and are part of the same jar file. Same for the ReportQueueSender and the ReportQueueSenderRemote and ReportQueueSenderLocal interfaces.
- There is no entry in the ejb descriptor which describes ReportQueueSenderBean as a message driven bean.