English 中文(简体)
为什么SIB连接被关闭? (Websphere服务整合公交车)
原标题:Why is SIB connection closed? (Websphere Service Integration Bus)

我在WebSphere 7.0.0.21上布置了MDB(MDB)信息,通过SIB(服务整合巴士)队列发送JMS信息。

联合管理系统资源创建如下:

@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());
}

并且毁灭了:

@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();

我有大约20个MDB的例子。当我向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..

如果我多次增加 Quue 连接工厂的连接池大小, 错误会发生得更少, 但还是存在。 如果我降低 Quue 连接工厂的连接池大小, 错误会经常发生 。

如何关闭连接? 如果连接池的大小大于同时运行的MDB:s, 如何关闭连接?

连接池有各种属性, 但我找不到任何连接关闭功能... 我的代码绝对不关闭任何连接( 除了 ) ) 。

最佳回答

我不清楚是什么原因导致这里的 SIMPConnectionUnworkExpendion ,但您管理您的 MDB 中连接的方式并不正确。 您应该将 < code> posterConsstruct 和 < code> 方法中的代码移动到 < code> preDestroy 方法上, 而不是试图再利用相同的连接。 如果您想要确保 MDB 正确处理交易行为, 这一点尤其重要。 请注意, 由于连接工厂进行连接集合, 请求连接每收到信件不会造成管理 。

问题回答

暂无回答




相关问题
Recommended way to develop using Jetty and Eclipse

I am currently developing a J2EE application and I would like to use Jetty. I would like to have iot integrated with Eclipse, so I could debug the appliaction. I ve tried out couple of plugins (...

Call function periodically in Java

we need run one function periodically in Java web application . How to call function of some class periodically ? Is there any way that call function when some event occured like high load in server ...

Why make an EJB rather than a Web Service?

I would have thought that there is a lot of information out there on this, but I haven t found anything that really answers my question. What are the advantages of making an EJB rather than a web ...

Where should I put this configuration setting?

I m designing a fairly small web application which will run on a Sun application server (v9.1). It only has a few pages, no database of its own, and will retrieve/update data via web services. There s ...

JNDI Names -- Is Prefix "jdbc/" needed?

What s up with JNDI names? I m trying to get a javax.sql.DataSource using the new annotations feature of Java 5. It s not working for me, so I want to ask... I have a in my web.xml, inside of it is ...

hibernate interceptors : afterTransactionCompletion

I wrote a Hibernate interceptor : public class MyInterceptor extends EmptyInterceptor { private boolean isCanal=false; public boolean onSave(Object entity, Serializable arg1, Object[] arg2, String[]...

热门标签