J2ME / J2EE Communication

R

Raydog

hi I am new to J2ME,
we are working on a ME application that the mobile client needs to be
notified by EE server when theres a event going
on server side. that is, Server Activate communication instead of the
Servlet, which is a server-passivate.

We don't think its possible to implement that using Servlet w/ http, so is
there any other method that can help us to
achieve our requirements ?

Thanks so much
 
D

Darryl L. Pierce

Raydog said:
hi I am new to J2ME,
we are working on a ME application that the mobile client needs to be
notified by EE server when theres a event going
on server side. that is, Server Activate communication instead of the
Servlet, which is a server-passivate.

We don't think its possible to implement that using Servlet w/ http, so is
there any other method that can help us to
achieve our requirements ?

Why don't you think you can do it with HTTP? You simply have the handset
make an HTTP connection and then have the servlet sit on it for a period of
time (I've had it sit up to 10 minutes on some handsets) before returning a
timeout result (assuming no data).

How long do you expect to go between data events?

--
/**
* @author Darryl L. Pierce <[email protected]>
* @see The Infobahn Offramp <http://mcpierce.multiply.com>
* @quote "Lobby, lobby, lobby, lobby, lobby, lobby..." - Adrian Monk
*/
 
R

Raydog

Data events could be anytime, so the time between them could be very long to
realtime (less then a second)
from what i understand your idea is to let the servlet on the serverside
hold onto the client connection for a
period of time, would this approach be scalable ? can the same client make
other requests to the servlets
at the same time as hanging to the servlet ?

Thanks so much Darryl
 
D

Darryl L. Pierce

Raydog said:
Data events could be anytime, so the time between them could be very long
to realtime (less then a second)
from what i understand your idea is to let the servlet on the serverside
hold onto the client connection for a
period of time, would this approach be scalable ? can the same client make
other requests to the servlets
at the same time as hanging to the servlet ?

I doubt it. Most handsets can handle only a single connection at a time. One
way to overcome the problem would be to have the servlet fire SMS messages
to the handsets. But, this assumes the handset supports the Wireless
Messaging APIs. If so, your MIDlet would register to listen to a specific
SMS port for incoming messages. Your servlet would fire messages to the
port on the handset. When the handset receives the message, it notifies the
MIDlet that was registered for that port (and will start the MIDlet if it's
not already running) and the MIDlet can get to the message.

--
/**
* @author Darryl L. Pierce <[email protected]>
* @see The Infobahn Offramp <http://mcpierce.multiply.com>
* @quote "Lobby, lobby, lobby, lobby, lobby, lobby..." - Adrian Monk
*/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top