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
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