jboss5.1上的seam和mdb的问题 [英] problem with seam and mdb on jboss5.1

查看:196
本文介绍了jboss5.1上的seam和mdb的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用mdb作为接缝组件时遇到问题。在bean中我注入了一些其他接缝somponents。

I have a problem when using a mdb as a seam component. In the bean I inject some other seam somponents.

问题是当服务器在崩溃后重新启动并且部署了mdb时,它开始读取消息但是接缝不是初始化但我得到了一个例外(如上所列)。如果我启动服务器,队列为空,并在服务器启动后将消息提交到队列,则表示正常工作。

The problem is that when the server restart after a crash and the mdb is deployed it starts reading the messages but seam is not initialized yet and I got an exception(listed above). If i start the server whith the queues empty and submit a message to queue after the server start it is working ok.

是否有可能停止或延迟发送服务器启动时的消息,只有当接缝完全功能时才开始发送它们?

Is there a posibility to stop or delay the sending off messages on server startup and start sending them only when seam is fully funcional?

我在豆子上尝试了@Depends antotatin但是成功了

I tried the @Depends antotatin on the bean but withowt success

我的环境:
jboss5 .1 GA
seam 2.2.0 GA
jboss messaging 1.4

my environment : jboss5.1 GA seam 2.2.0 GA jboss messaging 1.4

任何帮助都会被激活

启动时的错误:

11:24:20,477 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException:java.lang.IllegalStateException:试图调用Seam初始化应用程序之外的组件

11:24:20,477 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside an initialized application

11:24:30,483 ERROR [TxPolicy] javax.ejb.EJBException:无法获取池信号量,strictTimeout = 10000

11:24:30,483 ERROR [TxPolicy] javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=10000

推荐答案

找到解决方案......我正在尝试使用错误名称pattrn @Depends

Find the solution...I was trying with the wrong name pattrn with @Depends

添加此注释:

@Depends({jboss.web.deployment:war = / myappname})

@Depends( {"jboss.web.deployment:war=/myappname"} )

其中myappname是应用程序warfile的名称。这将延迟MDB的初始化,直到Seam在战争部署期间完成初始化。

Where myappname is the name of your app's warfile. This will delay the initialization of the MDB until after Seam has finished initializing during the war deployment.

希望这有助于某人

这篇关于jboss5.1上的seam和mdb的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆