I want to send messages from the Xpert.ivy server to a HTML Dialog, i.e. to JSF pages. PrimePush supports this but is not yet integrated in Xpert.ivy. How can I use it anyways? |
Answers for Axon.ivy 5.1 (Lauberhorn) with Primefaces 5.0
The usage of PrimePush has changed in many ways since ivy 5.1 as Primefaces has changed its implementation between primefaces 3.5 (ivy 5.0) and primefaces 5.0 (ivy 5.1). The documentation for Primefaces 5.0 with PrimePush is here. But basically primefaces push still works. There is an updated demo project here: PrimePush_51.iar. It can be set up as follows:
web.xml example:
endpoint example:
If you still run into problem with atomsphere. It can help to get more log outputs form the atmosphere runtime jar. To do so copy the following xml into your designer/configuration/log4jconfig.xml:
Thanks for your solution! After doing a lot of research on internet and make the same demo in eclipse as well to know about mechanism of primepush and atmosphere. --> Yesterday, I have found out the solution (same your solution) in Ivy Designer. and It works correctly now. Thanks again! Thanks for your reply. I guess that the endpoint can also be registered programatically. But i do not have the time at the moment to find out how. But if you inspect the code in the "AtmosphereFramework" class you should get an idea. Yes. The Endpoints have registered programmatically when the server/designer started. By default, It'll find all classes having @PushEndpoint in WEB-INF/classes. I mean we should look for a more intuitive way where we do not have to copy classes around the designer and server as this is very unflexible, difficult for deployment. And of course the endpoint is always global instead of local for one pmv. |
Answers for Xpert.ivy 5.0 (Rothorn) with Primefaces 3.5
There are two steps to do. First you have to install the Atmosphere framework on which PrimePush is based on. Second you have to configure PrimePush to use it in Xpert.ivy. For the first step, Atmosphere unfortunately does not provide binary releases. So, please follow the instructions on the Atmosphere homepage to get the Atmosphere jar files. Then move them into the directory webapps/Ivy/WEB-INF/lib of the Designer/Server. For the second step, please open the file webapps/Ivy/WEB_INF/web.xml. Within the web-app tag, add the following text:
Re-start the Designer/Server. To check whether it works not, please use the example project from the Xpert.ivy Hacker. Start the process PrimePush Hello World in multiple browsers and type a message in one of the browsers. If everything is correct you should see the message posted to all browser windows.
I have just added the init-param 'org.atmosphere.useWebSocketAndServlet3'. This is required that non-IO blocking threads are used for AJP connections! (e.g. when Xpert.ivy is integrated with IIS). Otherwise each connection consumes a thread on the server side. As soon as the MaxThreadCount is reached (default value is 200) no more connection could be created and the server will no longer answer. Hello Flavio! I want to test before and after I apply useWebSocketAndServlet3 into Ivy Engine. So, Pls give me some information: - Where is MaxThreadCount defined? - How can I test MaxThreadCount is reached? (Do you have a monitor tool to or test tool? Thanks & Regards, |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 07.10.2013 at 12:18
Seen: 22,765 times
Last updated: 07.03.2018 at 10:35