- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 EJB-JBOSS 配置目前面临“JBAS014516:无法在 5 分钟内获取许可”问题。以下是我的配置 -
<subsystem xmlns="urn:jboss:domain:ejb3:1.4">
<session-bean>
<stateless>
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
</stateless>
<stateful default-access-timeout="5000" cache-ref="simple"/>
<singleton default-access-timeout="5000"/>
</session-bean>
<mdb>
<resource-adapter-ref resource-adapter-name="hornetq-ra"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<pools>
<bean-instance-pools>
<strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
<strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
</bean-instance-pools>
</pools>
<caches>
<cache name="simple" aliases="NoPassivationCache"/>
<cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
<cache name="clustered" passivation-store-ref="abc" aliases="StatefulTreeCache"/>
</caches>
<async thread-pool-name="default"/>
<timer-service thread-pool-name="default">
<data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
</timer-service>
<remote connector-ref="remoting-connector" thread-pool-name="default"/>
<thread-pools>
<thread-pool name="default">
<max-threads count="10"/>
<keepalive-time time="100" unit="milliseconds"/>
</thread-pool>
</thread-pools>
<iiop enable-by-default="false" use-qualified-name="false"/>
<default-security-domain value="other"/>
<default-missing-method-permissions-deny-access value="true"/>
</subsystem>
要解决此问题,我应该将“strict-max-pool”增加到更高的值或增加线程池大小。
最佳答案
在不了解您的用例的情况下,很难提出一个好的方法,但很可能您正在 EJB bean 上调用一个方法,该方法执行时间太长,逐渐耗尽池中的实例,直到没有剩余的实例对于调用者进程。随着对此操作的请求越来越多,EJB 容器将尝试为客户端提供池中的下一个空闲项。通常,如果对 bean 实例的操作完成,该实例将返回到池中并可用于下一次客户端调用。如果操作需要很长时间,池将耗尽,直到没有可用的实例来服务客户端调用。根据您的配置,EJB 容器有 20 个实例;如果没有可用的实例,它将尝试等待 5 分钟,以确定是否有实例不会返回到池中。如果未能及时获取实例,则会向调用者抛出上述错误。
那么这将我们引向何方:首先也是最重要的分析花费这么长时间的 EJB 操作(向您的部署添加一个简单的 EJB 拦截器非常有用,它可以跟踪 EJB 调用的开始和结束以及跟踪执行时间)
确定谁调用该 EJB 实例 - 也许它对该 bean 进行了过多的调用。
如果无法避免或优化长时间运行的操作,请增加池大小,以便客户端可以使用该 bean 的更多实例(调整 max-pool-size
)
如果您的用例需要长时间运行的操作,但不需要阻塞并等待其结果,请考虑与 JMS 队列一起进行异步处理 - 在队列中创建作业,然后使用 MDB 执行它们。您仍然可以通过数据库存储和查询处理状态。
关于ejb - 如何解决 - JBAS014516 : Failed to acquire a permit within 5 MINUTES,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44321590/
我正在尝试编写一个简单的控制台应用程序,该应用程序将从键盘接受一个字符串,该字符串以 HH:MM 形式表示小时和分钟,然后必须将该字符串放入两个整数中,分别表示小时和分钟,然后再显示总分钟数,因此 0
在 Javascript 中,我有 4 个带有值的变量。 以下是示例: var start_hour = 1; var start_minute = 00; var end_hour = 6; var
例如我有 525 分钟,如果我们将它除以 60,结果将为 8.75 但是 1 小时只有 60 分钟而不是 75 如何从总分钟数中计算出准确的小时:分钟数? 最佳答案 $hours = intval($
我需要每 30 分钟(整点和整点后 30 分钟)重新加载页面内容。我正在考虑使用 JavaScript,并且尝试了下面的代码,但它进入了无限循环。我不知道如何更改它以避免循环。 meta 标记不会有帮
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
我正在寻找一个字符串 (mysql),它可以正确地计算总时间的几个小时。分钟。我找不到任何合适的东西。 例子: id| time_spent| 1 | 10.15 | 2 | 10.15
我对以下命令的理解是它查找在最后 {x} 分钟内修改过的文件。 如果我从 mmin 中排除 - 是什么意思,它应该返回什么? 命令 find . -maxdepth 1 -mmin -20 最佳答案
我有两个 Calendar 变量,分别命名为 calendar1 和 calendar2 其中存储了一些日历值。 我想比较这些变量的 MINUTE 值。 我找到了两种方法,但我想知道有什么区别以及哪一
例如,我想解析下面的字符串: Tue Sep 28 18:02:24 GMT+08:00 2010 我使用 SimpleDateFormat 的模式: new SimpleDateFormat("EE
我正在 Mac OS 终端上创建 cron,代码如下: home.cron 的内容: * * * * * /users/username/desktop/forTrump/script.sh 然后我这
我在 golang 1.9.2 中遇到了一个非常奇怪的错误:当我尝试编写 int64(1.1*float64(time.Minute)) 时显示错误。编译器说常量被截断为整数。 但是当我将 1.1 更
我正在使用从上午 9:50 开始的日内数据,并希望将其转换为 20 分钟的时间间隔,因此第一个时间段为 09:50 至 10:09:59,第二个时间段为 10: 10 到 10:29:59 等。但是
我的用户选择一个日期,我将其存储在纪元秒(或必要时以毫秒为单位)。 我的用户分别选择一天中的时间和时区。 如何使用这些新信息调整我的纪元时间。我觉得我应该能够根据小时/分钟添加 X 毫秒,然后根据时区
我有一个这样的表: id date_time 1 2/11/2013 7:05 2 2/11/2013 7:00 3 2/12/2013 7:00 4 2/14/2013 7:00
我这里有一个脚本(不是我自己的),它计算我的卫星接收器中电影的长度。它以分:秒为单位显示长度 我想在 小时:分钟 我必须做出哪些改变? 这是有关脚本的和平: if len > 0: len =
我有这样的查询: select t.Paydate,t.DelDate,DATEDIFF(MI, t.Paydate,t.DelDate) as Datdiffernce from Transacti
我有以下代码: insert into @Precalculo (descripcion, Valor) exec dbo.GetRankingTotalizador @Fecha,
我目前正在研究有关 super 马拉松的数据。有许多检查点带有每个运行者在该检查点上的时间的时间戳,但是当我试图研究分段时间时,我需要计算半场时间,这本身不是问题,但我遇到了格式问题。 我抓取的数据如
使用 cron,如果我想每 5 分钟运行一次命令,它将是: */5 * * * * command 但是如果我想专门设置一个分钟列表怎么办? 就像 5 点、18 分钟和 15 分钟一样?我猜这个: 5
很简单的问题。我有一个使用倒计时的 NodeJS 应用程序 ( https://www.npmjs.com/package/countdown )。倒计时本身有效。 但是,我不知道如何设置为8分钟?
我是一名优秀的程序员,十分优秀!