atmosphere

How to get Vaadin Push work through Apache HTTP server?

五迷三道 提交于 2019-12-03 14:02:22
问题 I'm trying to get Vaadin 7.1.5 Push to work on Apache Tomcat 7.0.42 + Apache HTTP server (2.2.14 with mod_proxy_wstunnel). The Vaadin application and push with WebSocket works fine when I access Tomcat directly (ie. http://mydomain:8080/myapp ). The problem arises when I try to access it by using the Apache modules mod_proxy & mod_proxy_wstunnel. What happens is that the application hangs, the loading indicator gets red and I get this error in the push request in the browser console: HTTP

how to trigger notification from other framework in atmosphere (comet)?

戏子无情 提交于 2019-12-03 09:11:37
basically i have read some samples, but all are self contained in one servlet. such as: use doGet to establish the long polling connection, and then use doPost to trigger the event to notify all suspended connections. Here is my question: I have other web actions programming in spring mvc, in the spring mvc controller a user post a message via /message/post, how can I make this action to trigger the atmosphere handler to notify the suspended connections? But what about non web components (EJB, JMS, Akka/Scala Actor, etc.) or web component with different scope (another web application, another

How to get Vaadin Push work through Apache HTTP server?

泪湿孤枕 提交于 2019-12-03 03:24:43
I'm trying to get Vaadin 7.1.5 Push to work on Apache Tomcat 7.0.42 + Apache HTTP server (2.2.14 with mod_proxy_wstunnel). The Vaadin application and push with WebSocket works fine when I access Tomcat directly (ie. http://mydomain:8080/myapp ). The problem arises when I try to access it by using the Apache modules mod_proxy & mod_proxy_wstunnel. What happens is that the application hangs, the loading indicator gets red and I get this error in the push request in the browser console: HTTP Status 501 - Websocket protocol not supported type Status report message Websocket protocol not supported

How to design push notifications using Atmosphere

荒凉一梦 提交于 2019-12-03 02:50:01
问题 I want to use atmosphere to develop a notification System. I am very new to Atmosphere so apologies if I am wrong somewhere. What i understood is when a Actor publishes something I save the notification action to the database. What i don't understand how the receiver will receive those notifications in realtime. The sender i know will do something like following event.getBroadcaster().broadcast( objectMapper.writeValueAsString("Some Message")); Now i am not able to figure out how the receiver

unable to add roles to user with meteor using 'roles' package

烂漫一生 提交于 2019-12-02 18:25:36
I'm trying to use the 'roles' package available on Atmosphere but I can't get it to work with Accounts.onCreateUser(), I can get the example on github. When I register a user, I want to add a role to them, when I test whether the role is assigned, it's not picking it up. Here's my code /server/users.js Accounts.onCreateUser(function(options, user){ var role = ['admin']; Roles.addUsersToRoles(user, role); return user; }); /client/page.js Template.hello.events({ 'click input': function () { var loggedInUser = Meteor.user(); if (Roles.userIsInRole(loggedInUser, ['admin'])) { console.log("Hi Admin

How to design push notifications using Atmosphere

我怕爱的太早我们不能终老 提交于 2019-12-02 16:24:19
I want to use atmosphere to develop a notification System. I am very new to Atmosphere so apologies if I am wrong somewhere. What i understood is when a Actor publishes something I save the notification action to the database. What i don't understand how the receiver will receive those notifications in realtime. The sender i know will do something like following event.getBroadcaster().broadcast( objectMapper.writeValueAsString("Some Message")); Now i am not able to figure out how the receiver can receive this message. For example . I want to add a User Object as Friend. So when User1 adds

How to close PrimeFaces socket connection

↘锁芯ラ 提交于 2019-12-02 10:47:29
We’re using PrimeFaces 4.0 (socket) and atmosphere 2.0.3 for server side push in our J2E application. The issue with application it doesn’t close socket after closing browser or logout from the application. Hence application produce a socket in CLOSE_WAIT status and ultimately it create too many open connections(1024) and it throw below error. Most of the connections on this port on CLOSE_WAIT status. JBWEB003008: Maximum number of threads (1024) created for connector with address /0.0.0.0 and port XXX. code snippet for socket in JSP <p:socket id="s" channel="#{xxx.eventChannel}" onMessage=

How to load APR Connector (Native) in JBoss 7

丶灬走出姿态 提交于 2019-12-02 07:18:57
问题 I want to use Atmosphere XMPP but i need to load native connector APR. I am not very familiar as of yet with JBoss 7 so i was wondering if anyone knows how to do this? WIndows x64 or Linux x64 environment. Doesn't matter. Thanks 回答1: Assuming Linux x64 here. I am using Ubuntu 11.04 x64. Download JBoss7 distribution and unzip it to a suitable directory ( from here I am assuming that you have it in your '/home/myname/tools/jboss701/' folder. Start it using /jboss701/bin/standalone.sh and verify

How to load APR Connector (Native) in JBoss 7

ⅰ亾dé卋堺 提交于 2019-12-02 01:30:17
I want to use Atmosphere XMPP but i need to load native connector APR. I am not very familiar as of yet with JBoss 7 so i was wondering if anyone knows how to do this? WIndows x64 or Linux x64 environment. Doesn't matter. Thanks Assuming Linux x64 here. I am using Ubuntu 11.04 x64. Download JBoss7 distribution and unzip it to a suitable directory ( from here I am assuming that you have it in your '/home/myname/tools/jboss701/' folder. Start it using /jboss701/bin/standalone.sh and verify that it started properly ( check localhost:8080 url). Close the jboss for now. Download the native

Access pushcontext from EJB-tier

 ̄綄美尐妖づ 提交于 2019-12-01 12:22:18
Im using Primefaces Push (the new thing in 3.4) together with jsf2 and ejb3. Seperate .war and ejb.jar Now I need to trigger a prime-push event from the ejb tier. What is a clean way to do this? Some options I can think of: ManagedBean pass down a callback interface when invoking the ejb method A JMS messagelistener in the web-tier and ejb to send messages. Managed bean to analyze returned data from ejb method invocation and do push if conditions are met. Basicly the question is where to put below code? PushContext pushContext = PushContextFactory.getDefault().getPushContext(); pushContext