Hi Christian,

Thanks for responding.

Unfortunately the server side messaging infrastructure to which we are
trying to connect only exposes Web Sockets that utilize the Stomp protocol.

How can my Java client use the JMS API to communicate with that server side
infrastructure?

Thanks,
-h


On Tue, May 21, 2013 at 4:22 PM, Christian Posta
<christian.po...@gmail.com>wrote:

> 1) you don't want to use ws:// for the client side within java.. that
> transport's not implemented because it's intended for use in a WebSocket
> enabled environment, ie, a browser. Just use the tcp://localhost:X where X
> is the transportConnector configured to handle STOMP connections.
>
> 2) Use the StompJms code from fusesource. It's a more mature now, follows
> the JMS API, and should be good to use.
>
> So basically, juse StompJms from the Java side, use a websockets/stomp
> library from the browser.
>
> Good luck, let us know how it goes.
>
>
>
> On Tue, May 21, 2013 at 12:43 PM, Hereen Oh <her...@stormpath.com> wrote:
>
> > Hi,
> >
> > We are interested in using ActiveMQ's (v5.8.0) Web Socket transport with
> > Java.
> >
> > We have been successful in bringing up a broker and running the included
> > javascript web socket demo. However, we're running into some
> > difficulty/confusion with how to proceed with Java.
> >
> > 1) Web socket connection
> > We were able to create a Java client that can listen and send messages
> to a
> > broker using the tcp transport.
> > <amq:connectionFactory id="connectionFactory"
> > brokerURL="tcp://localhost:616
> > 16"/>
> >
> > However, when we switch to using the ws transport by changing the URL
> like
> > so:
> > <amq:connectionFactory id="connectionFactory"
> > brokerURL="ws://localhost:61614"  />
> >
> > We get an error thrown from the TransportFactory class (line 158): "Could
> > not create Transport. Reason: java.io.IOException: createTransport()
> method
> > not implemented!"
> >
> > Are we missing some additional changes in our configuration?
> >
> > 2) Stomp
> > There is seemingly clear documentation on how to use Stomp with scripting
> > languages but we're not sure what we should be doing for Java. The
> ActiveMQ
> > documentation (http://activemq.apache.org/stomp.html) mentions a
> provided
> > Stomp Java API but cautions users:
> > "Note that this API is provided purely for testing purposes and you
> should
> > always consider using standard JMS API from Java instead of this one."
> > Are we to look for some sort of bridging component between jms and stomp
> > (like stompjms (https://github.com/fusesource/stompjms) or stompj (
> > http://code.google.com/p/stompj/)?
> >
> > What is the recommended solution for using Java with ActiveMQ's web
> > sockets?
> >
> > Any info would be appreciated.
> > Thanks,
> > -h
> >
> >
> >
> > --
> > @goStormpath
> >
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
>



-- 
@goStormpath

Reply via email to