Sharing EJB and notifying client

T

Taki

Hi,

I am developing an online chess-like game on JBoss (using EJB).
The clients are both an applet and an application, and they connect
SessionFacade session bean directly.

The problems I'm having are:

1. How can I notify the opponent player when a player does his turn?
The only way I can think of is to share an entity bean called game, and
it acts as an observable (clients are observers). However, I have read
books about entity beans, and since my game entity bean will be a
coarse-grained business object, I don't want to use entity bean to persist
data unless that's the only way. Does anyone have any ideas?

2. The problem1 can be solved if a stateful session bean can be shared
(having players as attributes of the session bean). I believe this is not
possible, but is there any tricks so that clients can share a session bean,
and the bean exists until both of them log out?

Any comments will be appreciated.

Taki
 

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

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top