i don't work on EJBs. but i have read about them...so i'll try.
Is it a publisher-subscriber kind of a model??
then the client needs to register with the server / probably the way event listeners work in Java.
Server can notify the client when a certain even occurs through callback.
In your case, i guess the message needs to go to a specific client, then you need to put some logic while registering the client. say ask the client to send some kind of an identification. store the client reference against that id in a hash. So when an even occurs you can look up the hash with id and send the notification to that client
I have not used JMS (java message service),
you should be using that. I think this is what it is for.
it has the concept of provider and subscribers.
am a newbie to ejb world so my suggestion might not be very correct.
prav.
Originally posted by natasha malhotra:
While using a Java Client Application and an app-server EJB based server in a client-server environment, how do we notify the client of a new message (for ex: a mailing application) from the server instead of the client polling the server in a scheduled time frame?
Here the implementation should be using EJB on the app-server and not standard Java Class. Can this be done using an EJB?