On Nov 26, 2014 10:12 PM, "Leonardo K. Shikida" <shik...@gmail.com> wrote:
>
> Hi
>
> Apache Tomee+ comes with Active MQ as its JMS provider. It's the
> implementation for JavaEE message-driven beans. So it can start an
embedded
> JMS instance, managed by TomEE+.
>
> About your JSP page, I think you can use some javascript to poll the
server
> for new messages using ajax.
>
You can use Websocket for this purpose. See Chat application using
Websocket example, which comes with Tomcat distribtion.
Websocket is specifically designed for these kind of two-way communication
need, unlike HTTP which is essentially one way(client driven) communication.
>

>
> []
>
> Leo
>
> On Wed, Nov 26, 2014 at 1:01 PM, Kernel freak <kernelfr...@gmail.com>
wrote:
>
> > Hello friends,
> >
> > I am working on a Spring MVC application for which I would like to
> > integrate a chat functionality for 2 users to chat. With my research I
> > found out that ActiveMQ is  a good thing to use it for. Unfortunately
all
> > the resources I found are related to broadcast chat, which is not my
> > target.
> >
> > Question 1) Does anyone know any examples where ActiveMQ is used for
> > personalized chatting, with persistence will be awesome, but minimum I
need
> > is for personalized chatting.
> >
> > Q2) When the method onMessage() is overriden, I can call a function in
> > Controller/Service or somewhere else, but how do I update the chatbox,
> > which is in JSP(with HTML code inside)? I am presuming here, because of
> > ActiveMQ, the client does not need to keep sending request to check if
> > there is a new message, rather the server tells the client, how does
that
> > work within a Spring-MVC project.
> >
> > Q3) As I am using Apache Tomcat for deploying the application, I found
out
> > that there is a version of ActiveMQ which has Apache Tomcat into it. I
> > presume it is Apache Tomcat EE, or similar. For this I couldn't find any
> > port number related documents. For ActiveMQ I don't want to open ports
> > using ActiveMQConnectionFactory, so does anyone know if it listens on
> > default tomcat provided ports instead of using line below :
> >
> > ActiveMQConnectionFactory connectionFactory = new
> > ActiveMQConnectionFactory("tcp://localhost:61616");
> >
> > Any help would be nice. Thank you very much.
> >

Reply via email to