问题标签 [atmosphere]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
5928 浏览

java - 如何在tomcat 6上启用NIO /大气

我在 tomcat 6 上尝试气氛,但只有长轮询有效,websockets 无效。我在控制台输出中收到的消息是

任何有关这方面的信息将不胜感激,谢谢

更新:修改 web.xml 和 server.xml 后,错误消息消失,但聊天应用程序总是回退到长轮询 - 我尝试了几种不同的 websocket 演示的 .war 部署,它们的行为都相同。

我也试过 Tomcat 7,但它仍然使用长轮询。

一些启动日志信息

当聊天客户端连接时

信息:使用共享选择器进行 servlet 写入/读取

发送消息时

0 投票
1 回答
211 浏览

ajax - grails 将表单发布到具有异步结果的另一个页面

我的应用程序中有一个表单,我希望允许用户提交表单并重定向到另一个页面,该页面将在结果可用时异步更新。我想知道如何做到这一点。

我的第一个想法是同步提交表单并立即重定向到最初为空的结果页面。然后使用某些版本的 Ajax 推送(例如氛围)来监听结果。

这是正确的方法还是有更简单的方法来解决这个问题?

我知道这类似于我提出的另一个问题(grails show wait page on form submit),但扩展了一些评论以提出更具体的问题。

0 投票
1 回答
404 浏览

grails - 服务中的 Grails jms 和大气插件 null springSecurityService 注入

你好!

我正在使用 grails jms 和气氛插件...

尝试将 springSecurityService 注入 Jms-Atmosphere Service 类时,principal/currentUser 为空,而有对该对象的引用(springSecurityService 不为空)

所以我想知道......
这是插件问题,还是监听从 jms 插件发布的事件(作为事件监听器)的问题?当使用 Atmosphere 插件将 Atmosphere Hander 用作服务时,我遇到了同样的问题!在这种情况下,气氛服务也必须暴露于 jms 事件!请给我一些想法来解决这个问题......解决方法也许......谢谢

0 投票
1 回答
1246 浏览

json - 从托管 bean 调用 Servlet doPost 方法

我有一个 servlet 方法,我需要在其中传递一个 json 对象。此 json 对象将在托管 bean (JSF) 之一中创建。我只是尝试将 bean 注入 servlet 以获取 json 对象,但我得到运行时异常,可能是不可能的。所以我想从 JSF bean 调用 servlet。任何想法如何从bean调用?

小服务程序

JSF 豆

现在我需要调用 servlet dopost 方法并发送“out.toString()”

0 投票
1 回答
745 浏览

jsf-2 - 从 EJB 层访问推送上下文

我将 Primefaces Push(3.4 中的新事物)与 jsf2 和 ejb3 一起使用。分离 .war 和 ejb.jar

现在我需要从 ejb 层触发一个 prime-push 事件。什么是干净的方法来做到这一点?我能想到的一些选择:

  1. ManagedBean 在调用 ejb 方法时向下传递一个回调接口
  2. Web 层中的 JMS 消息侦听器和用于发送消息的 ejb。
  3. 托管 bean 用于分析从 ejb 方法调用返回的数据,并在满足条件时进行推送。

基本上问题是在哪里放置下面的代码?

0 投票
1 回答
1076 浏览

configuration - servlet、primefaces 3.4 和 glassfish 3.1.2.2 的配置是什么?

我的环境是 Windows 7 上的 Glassfish 3.1.2.2(启用 Comet)、JDK 1.7.0_07、Atmosphere 1.0.0.RC1、JSF 2.1.10 和 PrimeFaces 3.4。

我正在尝试 Counter 示例(primefaces 3.4 counter
我按照手动PF3.4的步骤操作,并在我的域中启用了 Comet 支持。

我的servlet配置...

但是这个例子不起作用,因为浏览器之间没有通信。
另外,我有以下警告

任何人,会缺少另一种气氛配置吗?

0 投票
0 回答
236 浏览

spring - 气氛和弹簧portlet mvc

可以使用最近发布的1.0版本的大气框架与spring portlet mvc吗?我有一个进行多个 ajax 调用的 portlet,我想在服务器中并行处理它们。

我正在使用 weblogic,问题是服务器正在排队我的请求。当它们离开浏览器时,它们是真正并行的,但是当它们到达服务器时,它们被排入队列。

我想要的是类似于 spring 3.2 的异步控制器概念但通过大气框架在 servlet 2.5 中的东西

0 投票
0 回答
271 浏览

grails - Grails Atmosphere Broadcaster 不工作

我正在尝试在我的 grails 应用程序中实现气氛插件。我有以下代码

我还添加了 onRequest 和 onStateChange 闭包。但我得到一个“嵌套异常是 groovy.lang.MissingPropertyException:没有这样的属性:类的广播器:com.AtmosphereService”异常。我无法理解我做错了什么。有人可以帮我解决这个问题吗?谢谢

0 投票
1 回答
2313 浏览

java - mvc 中的冲突:调度程序 servlet 配置中的注释驱动

我试图将大气 websockets maven 项目集成到 spring ant 项目中。但是在配置时,似乎在 bean 实例化中引发了一些冲突。

这是我的调度员-servlet

这是显示的错误:

请求处理失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 bean 类 [org.atmosphere.cpr.AtmosphereResource]:指定的类是一个接口

0 投票
1 回答
1173 浏览

jquery - Multiple ajax calls for the same client with reverse ajax

I'm developing a very large application in JAVA / Sping MVC / Jquery over Oracle Weblogic that has a couple of screens called overviews that make multiple ajax calls to the server. All this calls should be made in parallel as they provide the summary of the different types of information to the end client. From this screens the user can then drill down to the detail of the information.

Since I have a lot of calls I'm constantly observing a behavior of the server that suggest en-queuing of the requests at the server (In the logs everything happens sequentially and when a specific type of information takes more time to process the other are only resolved when that ends).

I think I understand why this is happening, however I would like to process the requests in parallel in the server also. I'm considering two possible alternatives:

  • Change some configurations on weblogic (I don't know which one...)
  • Implement reverse ajax

I prefer the second however my server is bound to servlet 2.5 (weblogic 10.3.6) so I cannot take advantage of the new assynchronous API in servlet 3.0

I'm looking closely at atmosphere which has a very clean design IMHO. Also I'm open to other technologies suggestions. The problem is how can I do something like this in atmosphere. What I want is to shoot the requests to the server and have them processed in parallel. As soon as they are ready I want to receive the answer and close underlying connection.

How can I achieve this ?