在我看来,@ApplicationScoped只有在第一次使用EL访问页面时才启动bean.
当我查询时ApplicationMap,是否@ApplicationScoped会创建bean?
ExternalContext ec = currentInstance.getExternalContext(); result =
ec.getApplicationMap().get(beanName);
Run Code Online (Sandbox Code Playgroud)
如何在加载XHTML页面之前触发应用程序作用域bean的实例化?
这两个查询之间有什么区别:
select a.gid, sum(length(b.the_geom))
from polygons as a
, roads as b
where st_intersects(a.the_geom,b.the_geom)
group by a.gid ;
select a.gid, sum(length(b.the_geom))
from polygons as a
, roads as b
where st_overlaps(a.the_geom,b.the_geom)
group by a.gid ;
Run Code Online (Sandbox Code Playgroud)
第一个查询提供正确输出的位置,而第二个查询根本不检索任何行.与多边形相交的道路也与它重叠,对吧?
我使用PrimeFaces 3.5.x和Mojarra JSF 2.1.x我想以编程方式访问和显示这两个库的版本.
我使用版本作为maven2属性,但我希望有一个更简单的方法来获得版本.我希望找到类似的东西:
Primeface.getVersion();
FacesContext.getCurrentInstance();
Run Code Online (Sandbox Code Playgroud)
基于JavaScript的解决方案也可以,因为我只想在状态页面上显示版本.
如何格式化我的jqplot中的刻度来处理之间的变化,和.和""取决于我所在的地区.
例如.
我的示例jqplot初始化看起来像....
plot3 = $.jqplot('saturationChart', lineArray,
{
title:m_Language.saturationChartName,
series:lineColor,
legend:{show:true, location:'se'},
// You can specify options for all axes on the plot at once with
// the axesDefaults object. Here, we're using a canvas renderer
// to draw the axis label which allows rotated text.
axes:{
xaxis:{
// label:'Minutes',
renderer: $.jqplot.LogAxisRenderer,
tickDistribution:'power',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
labelOptions: {
//fontSize: '12pt'
},
},
yaxis:{
// label:'Megaohms',
renderer: $.jqplot.LogAxisRenderer,
tickDistribution:'power',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
labelOptions: {
//fontSize: …Run Code Online (Sandbox Code Playgroud) 概括
我们max_slot_wal_keep_size从 Postgresql 13 开始使用来防止 master 被滞后的复制杀死。看来,在我们的例子中,WAL 存储在超过此参数后没有被释放,从而导致复制失败。正如我所认为的,WAL 应该被释放,但似乎没有任何其他事务一次需要它。我想知道这应该如何工作以及为什么 WAL 段没有被删除?
请在下面找到详细信息。
配置
max_slot_wal_keep_size = 600GBmin_wal_size = 20GBmax_wal_size = 40GBcheckpoint_timeout= 5 分钟(检查点没有问题)发生了什么
在重负载(大型 COPY/INSERT 事务,加载数百 GB 数据)下,复制开始落后。pg_wal 上的可用空间以与 safe_slot 相同的速度减少pg_replication_slot.safe_wal_size- 正如预期的那样。在某些时候safe_wal_size出现负值并且流媒体停止工作。这不是问题,因为副本开始从 WAL 存档恢复。我预计一旦槽丢失,WAL 将被删除最多max_wal_size. 但这并没有发生。看来 Postgres 试图维持接近max_slot_wal_keep_size(600GB) 的可用容量,以防副本再次开始追赶。随着时间的推移,没有任何一笔交易需要保留这么多的 WAL。归档也不落后。
max_slot_keep_sizeWAL 可用?大部分时间 pg_wal 上的可用空间量大约为 70GB,但是在某些时候,在大量自动清理期间,它下降到 0 :( 这是 …
从版本9.1开始,PostgreSQL支持创建不使用WAL的UNLOGGED表,并在任何数据库恢复期间被截断.见文档: create unlogged table
PostgreSQL在哪里存储信息,关系是否是UNLOGGED?我正在寻找一个查询列出所有UNLOGGED的关系.
提前致谢
在JSF1您可以访问您当前的bean实例FacesContext由
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext()
ev.getApplicationMap().get(beanName) // get an @ApplicationScoped bean instance
ev.getSessionMap().get(beanName) // get a @SessionScoped bean instance
ev.getRequestMap().get(beanName) // get a @RequestScoped bean instance
Run Code Online (Sandbox Code Playgroud)
在JSF2 @ViewScoped中已经介绍过了,但是我找不到相应的getViewMap()方法了ExternalContext?我使用的是最新的JSF 2.1.1-b04.我误解了@ViewScopedbean的某些方面吗?@ViewScoped在服务器端获取bean实例是否有另一种好的做法?
谢谢,史蒂夫
jsf-2 ×3
postgresql ×2
facescontext ×1
java ×1
jqplot ×1
jquery ×1
jsf ×1
overlap ×1
postgis ×1
primefaces ×1
replication ×1
spatial ×1
sql ×1
wal ×1