I tried with the jetty websocket test app [1].
But failed with it. I'll try with a simple sample.

regards, Achim

[1] -https://github.com/jetty-project/jetty-autobahn-websocket-webapp


2014-07-09 15:54 GMT+02:00 jimmy <[email protected]>:

> Achim,
>
> Could you give an access to your sample, I'll push a project with
> websocket and hazelcast features.
>
>
> Here How does it work :
>
> - the activator create a new instance of hazelcast with a new topic,
> - each websocket connection register to the activator
> - each time a message is send by client websocket, the message is
> published to the topic hazelcast
> - in activator, there is a listener to the topic hazelcast so when a
> message comes it's pushed to all registered clients websocket !
>
> With hazelcast, you can have an horizontal architecture if you add more
> machines in your cluster.
>
>
> Le 09/07/2014 01:05, Achim Nierbeck [via Karaf] a écrit :
> > I tried to run the autobahn-websocket test sample [1] from the jetty
> > sources, but either my client was wrong or it didn't work :/
> > I will investigate this more, though I've seen reports where it did
> > work right away so I'm not sure if this is really something needed to
> > be done with Pax Web. I'll keep investigating.
> >
> > regards, Achim
> >
> > [1] - https://github.com/jetty-project/jetty-autobahn-websocket-webapp
> >
> >
> >
> > 2014-07-08 18:12 GMT+02:00 Achim Nierbeck <[hidden email]
> > </user/SendEmail.jtp?type=node&node=4034077&i=0>>:
> >
> >     After giving it a quick glance, it seems like this can easily be
> >     configured using the Jetty.xml
> >     I'm gonna investigate this a bit more.
> >
> >     regards, Achim
> >
> >
> >     2014-07-08 18:06 GMT+02:00 Achim Nierbeck <[hidden email]
> >     </user/SendEmail.jtp?type=node&node=4034077&i=1>>:
> >
> >         Hi,
> >
> >         ok, I'm gonna give it a try, it very well needs some special
> >         handling in Pax Web.
> >
> >         regards, Achim
> >
> >
> >         2014-07-08 17:39 GMT+02:00 jimmy <[hidden email]
> >         </user/SendEmail.jtp?type=node&node=4034077&i=2>>:
> >
> >             I've all deleted, and redownloaded the apache karaf....
> >             Now, i don't have the problem of 404 of static files
> >             anymore...
> >
> >             But !
> >             The websocket doesn't work !!!!
> >
> >             Maybe there is something to do in pax-web ?
> >
> >             In a standalone jetty (without osgi), there is a
> >             *WebSocketServerContainerInitializer*
> >
> >
> >
> >               Server server = new Server();
> >                  ServerConnector connector = new ServerConnector(server);
> >                  connector.setPort(8081);
> >                  server.addConnector(connector);
> >
> >                  // Setup the basic application "context" for this
> >             application at "/"
> >                  // This is also known as the handler tree (in jetty
> >             speak)
> >                  ServletContextHandler context = new
> >             ServletContextHandler(ServletContextHandler.SESSIONS);
> >              context.setContextPath("/cloud-websocket");
> >
> >                  // server.setHandler(context);
> >
> >                  ResourceHandler resource_handler = new
> ResourceHandler();
> >              resource_handler.setDirectoriesListed(true);
> >              resource_handler.setWelcomeFiles(new String[]
> {"index.jsp"});
> >
> >              resource_handler.setResourceBase(".");
> >
> >                  HandlerList handlers = new HandlerList();
> >                  handlers.setHandlers(new Handler[] {resource_handler,
> >             context});
> >                  server.setHandler(handlers);
> >
> >                  try {
> >                    WebSocketActivator.init(); // WebSocketActivator
> >             contains the
> >             @ServerEndpoint
> >
> >                    // Initialize javax.websocket layer
> >             *      ServerContainer wscontainer =
> >
> WebSocketServerContainerInitializer.configureContext(context);*
> >
> >                    // Add WebSocket endpoint to javax.websocket layer
> >              wscontainer.addEndpoint(WebSocketActivator.class);
> >
> >                    server.start();
> >                    server.dump(System.err);
> >             //      server.join();
> >                  }
> >                  catch (Throwable t) {
> >                    t.printStackTrace(System.err);
> >                  }
> >
> >
> >
> >             i've found the example at
> >
> https://github.com/jetty-project/embedded-jetty-websocket-examples/blob/master/javax.websocket-example/src/main/java/org/eclipse/jetty/demo/EventServer.java
> >
> >
> >
> >             Le 08/07/2014 13:46, Achim Nierbeck [via Karaf] a écrit :
> >             > Just use your regular github account, that's all to
> >             access ops4j.
> >             > And if you wish I'd give you direct access to the ops4j
> >             repo.
> >             >
> >             > regards, Achim
> >             >
> >             >
> >             > 2014-07-08 12:26 GMT+02:00 jimmy <[hidden email]
> >             > </user/SendEmail.jtp?type=node&node=4034057&i=0>>:
> >             >
> >             >     Ok, i'll share it when it works.
> >             >     Is there a special git account for push or i have to
> >             share it via
> >             >     a zip
> >             >     file..
> >             >
> >             >     regards, Jimmy
> >             >
> >             >     Le 08/07/2014 11:51, Achim Nierbeck [via Karaf] a
> >             écrit :
> >             >     > One more ...
> >             >     > if you have a simple Websocket sample that could
> >             be used as
> >             >     sample for
> >             >     > Pax Web [1]
> >             >     > I would be more than happy to add it to the
> >             samples and integration
> >             >     > tests for it :)
> >             >     >
> >             >     > regards, Achim
> >             >     >
> >             >     > [1] -
> >
> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples
> >             >     >
> >             >     >
> >             >     > 2014-07-08 11:49 GMT+02:00 Achim Nierbeck <[hidden
> >             email]
> >             >     > </user/SendEmail.jtp?type=node&node=4034052&i=0>>:
> >             >     >
> >             >     >     Ok, you cleaned the Karaf. But that doesn't
> >             clean such files, so
> >             >     >     you most likely still got the
> >             >     >     "old" jetty.xml for Jetty8.
> >             >     >     The feauture deployer doesn't override config
> >             files cause they
> >             >     >     might be altered.
> >             >     >
> >             >     >     regards, Achim
> >             >     >
> >             >     >
> >             >     >     2014-07-08 11:44 GMT+02:00 jimmy <[hidden email]
> >             >     > </user/SendEmail.jtp?type=node&node=4034052&i=1>>:
> >             >     >
> >             >     >         Sorry,
> >             >     >
> >             >     >         in fact The default jetty.xml content
> >             does'nt match with
> >             >     jetty
> >             >     >         9 default
> >             >     >         configuration.
> >             >     >
> >             >     >         i replace the content of jetty.xml with
> >             >     >
> >             >     >           <Call name="addConnector">
> >             >     > <Arg>
> >             >     >               <New
> >             class="org.eclipse.jetty.server.ServerConnector">
> >             >     > <Arg name="server"><Ref refid="Server" /></Arg>
> >             >     > <Arg name="factories">
> >             >     > <Array
> >             >     > type="org.eclipse.jetty.server.ConnectionFactory">
> >             >     > <Item>
> >             >     > <New
> >             >     >
> >             class="org.eclipse.jetty.server.HttpConnectionFactory">
> >             >     >   <Arg name="config"><Ref refid="httpConfig"
> >             >     > /></Arg>
> >             >     > </New>
> >             >     > </Item>
> >             >     > </Array>
> >             >     > </Arg>
> >             >     > <Set name="host"><Property name="jetty.host"
> >             >     /></Set>
> >             >     > <Set name="port"><Property name="jetty.port"
> >             >     >         default="80" /></Set>
> >             >     > <Set name="idleTimeout"><Property
> >             >     name="http.timeout"
> >             >     > default="30000"/></Set>
> >             >     > <Set name="soLingerTime"><Property
> >             >     > name="http.soLingerTime"
> >             >     > default="-1"/></Set>
> >             >     > </New>
> >             >     > </Arg>
> >             >     > </Call>
> >             >     >
> >             >     >
> >             >     >
> >             >     >         I don't have any error but the application
> >             is now not
> >             >     deployed....
> >             >     >         I'm searching...
> >             >     >
> >             >     >         I'll keep you posted
> >             >     >
> >             >     >         Thank you Achim
> >             >     >
> >             >     >
> >             >     >
> >             >     >
> >             >     >         --
> >             >     >         View this message in context:
> >             >     >
> >
> http://karaf.922171.n3.nabble.com/WebSocket-tp4034012p4034050.html
> >             >     >         Sent from the Karaf - User mailing list
> >             archive at
> >             >     Nabble.com.
> >             >     >
> >             >     >
> >             >     >
> >             >     >
> >             >     >     --
> >             >     >
> >             >     >     Apache Member
> >             >     >     Apache Karaf <http://karaf.apache.org/>
> >             Committer & PMC
> >             >     >     OPS4J Pax Web
> >             <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> >             >     >     Committer & Project Lead
> >             >     >     blog <http://notizblog.nierbeck.de/>
> >             >     >
> >             >     >     Software Architect / Project Manager / Scrum
> >             Master
> >             >     >
> >             >     >
> >             >     >
> >             >     >
> >             >     > --
> >             >     >
> >             >     > Apache Member
> >             >     > Apache Karaf <http://karaf.apache.org/> Committer
> >             & PMC
> >             >     > OPS4J Pax Web
> >             <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> >             >     > Committer & Project Lead
> >             >     > blog <http://notizblog.nierbeck.de/>
> >             >     >
> >             >     > Software Architect / Project Manager / Scrum Master
> >             >     >
> >             >     >
> >             >     >
> >             >     >
> >             >
> >
> ------------------------------------------------------------------------
> >             >     > If you reply to this email, your message will be
> >             added to the
> >             >     > discussion below:
> >             >     >
> >
> http://karaf.922171.n3.nabble.com/WebSocket-tp4034012p4034052.html
> >             >     > To unsubscribe from WebSocket, click here
> >             >     > <> NAML
> >             >     >
> >             >
> >             <
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >             >     >
> >             >
> >             >     --
> >             >
> >             >     *Jimmy PANNIER*
> >             >     Ingénieur de développement
> >             >     Pôle Édition
> >             >
> >             >             169, Rue Sadi Carnot
> >             >     59350 Saint André-Lez-Lille
> >             >     03.20.06.16.17
> >             >
> >             >
> >             >
> >             >
> >             >
> >             >     logo_inovelan_mini.png (6K)
> >             >
> >             <
> http://karaf.922171.n3.nabble.com/attachment/4034055/0/logo_inovelan_mini.png
> >
> >             >
> >             >
> >             >
> >             >
> >             >     --
> >             >     View this message in context:
> >             >
> >
> http://karaf.922171.n3.nabble.com/WebSocket-tp4034012p4034055.html
> >             >     Sent from the Karaf - User mailing list archive at
> >             Nabble.com.
> >             >
> >             >
> >             >
> >             >
> >             > --
> >             >
> >             > Apache Member
> >             > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> >             > OPS4J Pax Web
> >             <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> >             > Committer & Project Lead
> >             > blog <http://notizblog.nierbeck.de/>
> >             >
> >             > Software Architect / Project Manager / Scrum Master
> >             >
> >             >
> >             >
> >             >
> >
> ------------------------------------------------------------------------
> >             > If you reply to this email, your message will be added
> >             to the
> >             > discussion below:
> >             >
> >
> http://karaf.922171.n3.nabble.com/WebSocket-tp4034012p4034057.html
> >             > To unsubscribe from WebSocket, click here
> >             > <> NAML
> >             >
> >             <
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >             >
> >
> >             --
> >
> >             *Jimmy PANNIER*
> >             Ingénieur de développement
> >             Pôle Édition
> >
> >                     169, Rue Sadi Carnot
> >             59350 Saint André-Lez-Lille
> >             03.20.06.16.17
> >
> >
> >
> >
> >
> >             logo_inovelan_mini.png (6K)
> >             <
> http://karaf.922171.n3.nabble.com/attachment/4034059/0/logo_inovelan_mini.png
> >
> >
> >
> >
> >
> >             --
> >             View this message in context:
> >
> http://karaf.922171.n3.nabble.com/WebSocket-tp4034012p4034059.html
> >             Sent from the Karaf - User mailing list archive at
> Nabble.com.
> >
> >
> >
> >
> >         --
> >
> >         Apache Member
> >         Apache Karaf <http://karaf.apache.org/> Committer & PMC
> >         OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> >         Committer & Project Lead
> >         blog <http://notizblog.nierbeck.de/>
> >
> >         Software Architect / Project Manager / Scrum Master
> >
> >
> >
> >
> >     --
> >
> >     Apache Member
> >     Apache Karaf <http://karaf.apache.org/> Committer & PMC
> >     OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> >     Committer & Project Lead
> >     blog <http://notizblog.nierbeck.de/>
> >
> >     Software Architect / Project Manager / Scrum Master
> >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> > Committer & Project Lead
> > blog <http://notizblog.nierbeck.de/>
> >
> > Software Architect / Project Manager / Scrum Master
> >
> >
> >
> > ------------------------------------------------------------------------
> > If you reply to this email, your message will be added to the
> > discussion below:
> > http://karaf.922171.n3.nabble.com/WebSocket-tp4034012p4034077.html
> > To unsubscribe from WebSocket, click here
> > <
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4034012&code=amltbXkucGFubmllckBpbm92ZWxhbi5mcnw0MDM0MDEyfC01NTUxNDMzNzU=
> >.
> > NAML
> > <
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
> --
>
> *Jimmy PANNIER*
> Ingénieur de développement
> Pôle Édition
>
>         169, Rue Sadi Carnot
> 59350 Saint André-Lez-Lille
> 03.20.06.16.17
>
>
>
>
>
> logo_inovelan_mini.png (6K) <
> http://karaf.922171.n3.nabble.com/attachment/4034091/0/logo_inovelan_mini.png
> >
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/WebSocket-tp4034012p4034091.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to