저는 자바 엔터프라이즈에 익숙하지 않으며 메시지 기반 빈을 이해하려고합니다. 원격 인터페이스와 함께 MDB를 구현하여 MDB에서 MessageListener와 원격 인터페이스 RemoteEjbSenderInterface를 모두 구현합니다. 그냥 그렇게 :Message Driven Bean은 MessageListener 이외의 다른 인터페이스를 구현할 수 있습니까?
@Remote
public interface RemoteEjbSenderInterface
{
public void sendMessage(String mess) throws JMSException;
}
과 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
{
...
}
문제는 응용 프로그램을 배포 할 때, 나는 오류가 있음을 말하고있다 : org.jboss.as.server :
에 의한 .deployment.DeploymentUnitProcessingException : EJB 3.1 FR 5.4.2 MessageDrivenBean com.ericsson.ejb.sender.EjbSender가 1 인터페이스를 구현하지 않고 메시지 수신기 인터페이스를 지정하지 않음
thi 내가 메시지 어쩌면 메시지 기반 빈은 MessageListener 인터페이스 만 구현할 수 있다고 생각하게 만드는가? 여러 인터페이스를 구현하는 경우, 당신은 @MessageDriven
주석의 속성 messageListenerInterface
를 사용하여 메시지 리스너 인터페이스 인 하나 지정해야합니다
는 당신의 도움을 주셔서 감사합니다! – user3635684
@ user3635684이 질문에 대한 답변이 있으면 정답으로 표시 할 수 있습니까? 감사 –