• 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

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my reporting tool is for reporting services to over 10000 desktop users. There are
multiple regions and offices. Communication is via XML to desktop flash clients. Each
time a change in services is made by the help desk. The change is broadcasted to all
clients. Those which have a matching region path accept the data and dispaly it to the
user..

My concern is whether I should use session or entity ejbs. Each ejb reads data from the
db on initialization and creates an object for each office. When a change in services
occurs due to an update, the object is destroyed and a new one is created.

There is not going to be a class for each office
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd make a collection of POJOs. If you make them at startup and hold them in memory all day you need to think about a Singleton or static cache, right? Whether you use a session bean to build the cache and an entity bean to read them is really less important. I'm not terribly conversant with entity beans; if they really work better for you than that, let me know.

I'm interested in how you broadcast updates to 10,000 users. My project needs to broadcast to about 1200 using sockets. Say you connect to a server socket, send a message and disconnect in about a second. You're up to almost 3 hours to get the message out to everyone. And if any of the clients shut down you may have a long timeout before you discover they are gone. If you have a better way, please share!!

I'm also interested in how you keep these in-memory office objects in sync across a cluster. If one node updates an office, how do the others know about it?
[ October 12, 2005: Message edited by: Stan James ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic