Discussions
EJB programming & troubleshooting: how to send events to a java application client in j2ee???
-
how to send events to a java application client in j2ee??? (5 messages)
- Posted by: Yeray Santana Borges
- Posted on: February 16 2007 07:37 EST
Hi, Im reading about EJBs and conainers, but i dont read anything about how to send events form j2ee server to a java application client. At now, i understand that a java application lookup a ejb, send it a request by his component interface, the ejb receive the request and send back the response to the client, with for example a data transfer object. But what happen if a event occur inside a j2ee container??, how can my ejbs send a events to the clients that are connected???, for example a ejb stateful bean that have a conversational states might want to send a event to his client that begin the conversation i think that this is possible using a message driven beans, but how can instanced it outside of the j2ee container??? maybe the client could get a jndi queue refrence and stay listen it??, this is the only way, using message driven beans to inform the current java application clients?? thanks in advanceThreaded Messages (5)
- Re: how to send events to a java application client in j2ee??? by Cameron Purdy on February 21 2007 15:45 EST
- Re: how to send events to a java application client in j2ee??? by Jyothish John on February 22 2007 15:57 EST
-
Re: how to send events to a java application client in j2ee??? by Cameron Purdy on February 22 2007 04:15 EST
- Re: how to send events to a java application client in j2ee??? by Yeray Santana Borges on February 23 2007 03:35 EST
-
Re: how to send events to a java application client in j2ee??? by Cameron Purdy on February 22 2007 04:15 EST
- Re: how to send events to a java application client in j2ee??? by Jyothish John on February 22 2007 15:57 EST
- Re: how to send events to a java application client in j2ee??? by Vinant Pandey on February 22 2007 10:09 EST
-
Re: how to send events to a java application client in j2ee???[ Go to top ]
- Posted by: Cameron Purdy
- Posted on: February 21 2007 15:45 EST
- in response to Yeray Santana Borges
This type of capability is not provided for by J2EE, except perhaps by an event being handled by an MDB which is responsible for pushing the event to the client(s). An alternative approach is something like the Coherence "Real Time Client" (two-way connection into a Java Data Grid). Peace, Cameron Purdy Tangosol Coherence: The Java Data Grid -
Re: how to send events to a java application client in j2ee???[ Go to top ]
- Posted by: Jyothish John
- Posted on: February 22 2007 15:57 EST
- in response to Cameron Purdy
Or can we look it from a different angle? Instead of the Server pusing events to the client, can't the client poll the server for any "events"? -
Re: how to send events to a java application client in j2ee???[ Go to top ]
- Posted by: Cameron Purdy
- Posted on: February 22 2007 16:15 EST
- in response to Jyothish John
Or can we look it from a different angle?
Sure, but its way more expensive and will have higher latencies. Peace, Cameron Purdy Tangosol Coherence: The Java Data Grid
Instead of the Server pusing events to the client, can't the client poll the server for any "events"? -
Re: how to send events to a java application client in j2ee???[ Go to top ]
- Posted by: Yeray Santana Borges
- Posted on: February 23 2007 03:35 EST
- in response to Cameron Purdy
Thank you for all the answers, I will practise with this -
Re: how to send events to a java application client in j2ee???[ Go to top ]
- Posted by: Vinant Pandey
- Posted on: February 22 2007 10:09 EST
- in response to Yeray Santana Borges
As mentioned by yourself & Cameron use an Message Bean. Yeray, you need to understand the actual purpose of a container. It is to provide services. In this case receive the message from the queue. The MDB can in turn call java helper classes or other services to process the requests. Multiple clients can also be polled using the Messaging framework. If you are looking for cross app interportability do checkout ESB (e.g MQ and Mule or OpenESB). Job Schedules are also available (Opensyphony Quartz) -Vinant Pandey