atmosphere

atmosphere + spring + autowired problems [duplicate]

假如想象 提交于 2019-12-06 03:33:10
This question already has an answer here: Why is my Spring @Autowired field null? 16 answers I am developing a web app and trying to integrate a chat (for now). I am using Spring and Atmosphere to do this. I managed to get the chat working, but now I seem to have run into a problem. I am using the @ManagedService in a separate servlet (similar to the atmosphere-chat-multiroom example) and now I need to access to a bean that is inside the spring application. For the rest of the servlets that I am using, this works flawlessly, but I am at a dead end when it comes to doind this in Atmosphere

How do I configure Tomcat and HAProxy to work with the WebSocket Framework Atmosphere?

Deadly 提交于 2019-12-06 01:41:08
I have a Java application running on Tomcat7, which uses the Atmosphere Framework . Atmosphere is a Websocket Framework. I used a sample application from the Atmosphere Sample Chat . My problem is that I did not get the connectors as well as the proper configuration for my Websocket Atmosphere application running. The questions I have are: How do I have to configure my HAProxy? How do I have to configure my Tomcat server? How do I have to configure Tomcat for APR and for the NIO connector? Do I have to change something in my app (i.e., my web.xml)? How do I have to fix the errors below? This

Tomcat crashes with error java.lang.OutOfMemoryError: GC overhead limit exceeded

偶尔善良 提交于 2019-12-05 09:12:26
After the tomcat ran several months, I got unexpectetly the error below. We restarted the tomcat and the error do not appear now but may be will come again in the future. I saw that another users had simmilar exceptions, related with the garbage collection, but not related exactly with the NIO connector. Does somebody has an idea why this happens and what should be the correct fix to avoid it. Jan 15, 2016 7:46:47 AM org.apache.tomcat.util.net.NioEndpoint$SocketProcessor run SEVERE: java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.Collections.synchronizedSet(Collections.java

Atmosphere can't get session on Glassfish 3.1.2

倖福魔咒の 提交于 2019-12-04 18:15:31
I got the chat example working from Atmosphere, and now I want to get the session, but I get a null pointer exception. My configuration: GlassFish 3.1.2 Atmosphere 1.0.0-SNAPSHOT My ChatAtmosphereHandler.java file: @Override public void onRequest(AtmosphereResource r) throws IOException { AtmosphereRequest req = r.getRequest(); // First, tell Atmosphere to allow bi-directional communication by suspending. if (req.getMethod().equalsIgnoreCase("GET")) { /* ------- ADDED LINES BY ME ------- */ double i = Math.random(); System.out.println(i); req.getSession(true).setAttribute("user", i); //Null

Broadcasting to a subset of subscribers in Atmosphere

我与影子孤独终老i 提交于 2019-12-04 15:51:56
What I'm trying to do: Be able to have users subscribed to a number of different 'chat rooms' and use reverse AJAX / comet to send messages from a chat room to everyone logged into that room. (a bit more complicated but this is a similar use case). What I'm doing: Using Grails with JMS and Atmosphere. When a message is sent, I'm using JMS to send the message object which is received by a Grails service which is then broadcasted to the atmosphere URL (i.e. atmosphere/messages). Obviously JMS is a bit redundant there but I though I could use it to help me filter who should retrieve the message

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

柔情痞子 提交于 2019-12-04 14:35:49
问题 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? 回答1: But what about non web components

Basketbalschoenen Nike Greek Freak 1 kopen terughoudend

青春壹個敷衍的年華 提交于 2019-12-03 22:57:42
Er komt demping als de drop-in tussenzool over de gehele lengte reageert. Er is een klein deel van Cushlon dat functioneert als een balanscoating in de hiel aan de achterkant, maar de meeste tussenzolen van Nike Roshe Operate zijn eigenlijk Reageren schuim. Als je hebt opgetreden binnen de Nike Kobe ADVERT NXT 360, waarin zowel Reageren als Lunarlon werd getoond, is deze specifieke opstelling niet omdat ze zacht / zacht zijn omdat individuen dat waren geweest. Desondanks ontdekte ik dat deze opstelling iets leuker werd toen ik zoals Nike Atmosphere VaporMax 2019 schoenen slechts een beetje

Atmosphere/Jersey bidirectional conversation

风格不统一 提交于 2019-12-03 22:24:58
问题 I've seen a number of Atmosphere examples including pub-sub. I want to do something like pub-sub (client subscribes to a channel that is unique to that client; server periodically publishes to that channel), except that the client will send data to the server as well. The client will send data in response to data sent by the server and in other cases when something important happens on the client that the server needs to know about (which the server doesn't need to acknowledge). Is it even

WebSockets - correct approach for creating channels and pushing data

試著忘記壹切 提交于 2019-12-03 21:47:37
I have a scenario whereby I want to inform users of my site that someone has commented on an article on which they have also commented. This is a lot like the way that SO notifies me when someone responds to a question! Server side, I persist the comment and then look up all users who commented on the same article. I then broadcast (I'm using Atmosphere): PushContext pushContext = PushContextFactory.getDefault().getPushContext(); for(User u : users){ // channel name, message pushContext.push("/user_" + u.id, "someone commented! blah blah"); } The "channel" I am broadcasting to is the user's

Spring Webflow , Primefaces with Comet (Atmosphere)

女生的网名这么多〃 提交于 2019-12-03 21:39:54
Thinking to start a project using Spring Web Flow with Primefaces. I need to use comet so i figured Primefaces uses Atmosphere. I'm not really experienced with the Atmosphere / Comet business so any pointers about where to start is welcomed. Thanks in Advance Jens a very basic example can be found in the primefaces showcase: https://www.primefaces.org/showcase/push/chat.xhtml This is the old example for the ajax push component and is NOT officially included in the show case right now because it will be redone in primefaces 3 if I know right. In addition to that you have to configure the comet