• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB Messages

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I'm a bit new to EJB, so forgive me if this question is too simple - I just can't seem to figure it out. I have some stateful beans running on a server and when the bean runs, it should have the ability to send out a message indicating its progress to whatever client is currently using the bean. When this was a non-distrbuted application, I could simply register the client with the "server" as a listener and then the server would iterate over its listeners and send out status messages.

This is a problem for a couple of reasons now:
1. The server throws a NoClassLoaderFoundException because when it tries to resolve the type of the listener, it fails (maybe putting the appropriate client interfaces in the JBoss client directory would solve this, but that leads to #2...).
2. I obviously don't want to be sending a GUI back and forth (since that is the registered listener to be displaying the status of the bean).

So, long question short, is there a way to send a message to the client using the bean at the time? I've looked into message-driven beans and JMS but it seemed like messages there went to a Queue, in which case I would need a different queue for each client, which ties the client/server together a little tighter than I care to do.

Thanks in advance.
Jeff
 
Jeff Storey
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to clarify my thoughts just a little bit here because I know my first message was quite long.

Simply put, is there a way for a bean to send a message to the client that is currently using it (i.e. a status message to update a progress bar on the client GUI)?

Thanks,
Jeff
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic