I am new to java enterprise and trying to understand message driven beans. I implemented MDB along with the remote interface, wanting my MDB to implement both the MessageListener and the RemoteEjbSenderInterface. Similar:
@Remote
public interface RemoteEjbSenderInterface
{
public void sendMessage(String mess) throws JMSException;
}
and MDB
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName =
"messageSelector", propertyValue = "SenderType =
Receiver"),
@ActivationConfigProperty(propertyName =
"destinationType", propertyValue =
"javax.jms.Queue"),
@ActivationConfigProperty(propertyName =
"destination", propertyValue = "queue/test")})
public class EjbSender implements MessageListener, RemoteEjbSenderInterface
{
...
}
The problem is that when I deploy the application, I get an error message:
Called: org.jboss.as.server.deployment.DeploymentUnitProcessingException: EJB 3.1 FR 5.4.2 MessageDrivenBean com.ericsson.ejb.sender.EjbSender does not implement 1 interface and does not specify a message listener interface
it makes me think, maybe the message is controlled by a bean can ONLY implement the MessageListener interface and nothing more?
Thank you in advance for your help.