WebSphere (JMS) 메시지를 SIB (서비스 통합 버스) 큐에 보내는 WebSphere 7.0.0.21에 MDB (Message Driven Bean)가 배치되었습니다.왜 SIB 연결이 닫혀 있습니까? (Websphere Service Integration Bus)
@Resource(name = CONN_FACTORY, mappedName = CONN_FACTORY)
private QueueConnectionFactory connFactory;
@PostConstruct
public void postConstruct() {
queueConnection = connFactory.createQueueConnection();
queueSession = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
responseQueueSender = queueSession.createSender(getResponseQueue());
}
을 파괴 :
은 JMS 자원이 생성됩니다
@PreDestroy
public void preDestroy() {
responseQueueSender.close();
queueSession.close();
queueConnection.close();
}
같이 보내기 :
TextMessage responseMessage = queueSession.createTextMessage("message");
responseQueueSender.send(responseMessage, DeliveryMode.PERSISTENT, Message.DEFAULT_PRIORITY, expirationTime);
queueSession.commit();
내 MDB의 약 20 인스턴스를 가지고있다. MDB에 들어오는 많은 메시지를 생성 할 때 문제가 발생합니다. 나는 많은 오류가 더 거의 발생하지 대기열 연결 팩토리의 연결 풀 크기를 늘리면
CWSIA0053E: An exception was received during the call to the method JmsSessionImpl.getTransaction (#1): javax.resource.spi.IllegalStateException: CWSJR1121E: An internal error has occurred. During the call to the method getManagedConnection the exception javax.resource.spi.ResourceAllocationException: CWSJR1028E: An internal error has occurred. The exception com.ibm.ws.sib.processor.exceptions.SIMPConnectionUnavailableException: CWSIK0022E: The connection is closed to messaging engine seit3022Node01.server1-Payment and cannot be used. was received in method createManagedConnection. was thrown..
하지만 여전히 존재한다 : 나는 다음과 같은 오류가 발생했습니다. 풀 크기를 줄이면 오류가 자주 발생합니다.
어떻게 연결을 닫을 수 있습니까? 동시 MDB 수보다 큰 연결 풀 크기가있는 경우 어떻게 연결을 닫을 수 있습니까?
는 연결 풀의 다양한 호텔을 고를 수 있습니다,하지만 난 사용중인 모든 관련 닫는 연결을 찾을 수 없습니다 ... 그리고 내 코드는 확실히 아니에요 (@PreDestroy
제외) 모든 연결
오라클의 Java EE 튜토리얼 (http://docs.oracle.com/javaee/6/tutorial/doc/bncgl.html)에 따르면 리소스를 관리하는 두 가지 방법 (onMessage() 또는 위에서 설명한 방법)은 다음과 같습니다. 옳은. onMessage()에서 자원 관리를 시도했지만 오류없이 작동하지만 성능은 실제로 상당히 낮습니다! (비즈니스 논리를 포함하여 약 1000 % 메시지 소요 시간이 약 50 % 길다.) – DagR