JBoss 6.1을 백엔드로 사용하여 웹 응용 프로그램을 개발하고 있습니다.
"대상"등록 정보 인 "queue/searchtabQueue"및 "대상 유형"등록 정보 "javax.jms.Queue"로 메시지 구동 Bean을 만들었습니다. https://community.jboss.org/wiki/HowToCreateJMSQueuetopicInAS6에서 설명한 바와 같이JBoss message driven beans, onMessage가 호출되지 않았습니다.
내가 내 큐 "큐/searchtabQueue"("searchtab-hornetq-jms.xml")을 만들 관리 : 관리 콘솔에서 배포 후
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
<queue name="searchtabQueue">
<entry name="/queue/searchtabQueue"/>
</queue>
</configuration>
을, 나는 볼 내 상태가 "작동 중"인 "JMS 대기열"에서 대기열에 있습니다.
Context ctx = new InitialContext(p); // Create the initial context
ConnectionFactory factory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
Queue queue = (Queue) ctx.lookup("queue/searchtabQueue");
Connection connect = factory.createConnection();
javax.jms.Session session = connect.createSession(false, 0);
MessageProducer sender = session.createProducer(queue);
TextMessage msg = session.createTextMessage();
msg.setText("abc");
sender.send(msg);
connect.close();
그러나 메시지 구동 Bean의 onMessage 메소드되지 않은 : 나는 올바른 작동 큐에 대한 모양을하고있어 상태가없는 빈에서
, 또한 전송도 예외가 발생하지 않습니다 라는.무엇이 누락 되었습니까? 많이 사전에
감사
볼프강
업데이트 : 내 MDB-코드 :
내 메시지 구동 빈 다음과 같은 코드가 있습니다 지금
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "queue/searchtabQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge")
})
public class SearchTableBean implements MessageListener {
public void onMessage (Message message) {
}
}
MDB 코드를 추가 할 수 있습니까? 원격 대기열입니까? – CoolBeans
Hello CoolBeans, 내 MDB 코드 추가 –