T
Taki
Hi everyone,
I'm new in J2EE, so my problem might be an easy one,
but I'm stuck for days.
I'm developing an online game that 2 players interact
with each other in applets. For 2 players to interact,
I have a game (POJO) class stored in JNDI so that 2 players
can interact with each other through it. I implemented
the observer pattern between the game class and player class
(player is observer, game is observable),
but I am having problems:
1. J2EE server (I'm running JBoss) wants all the classes used
directly or indirectly by game class to be packaged in a jar file.
This includes all the GUI files that are not serializable.
I want a clear separation between server side components and
client side components.
2. Because of the problem above, I declared all GUI components as
transient. Now, this is giving me another problem. The update method
in player class uses transient attributes (call a method on them etc).
However, the game object generates null poitner exception (I think it's
because the attributes are declared as transient).
I am not even sure I'm designing this in a right way, but if
someone can give me some advice, I would really appreciate it.
I'm running Jboss3.2.3 with tomcat, and client talks to a session bean
directly (doesn't go though a servlet).
Thanks in advance
Taki
I'm new in J2EE, so my problem might be an easy one,
but I'm stuck for days.
I'm developing an online game that 2 players interact
with each other in applets. For 2 players to interact,
I have a game (POJO) class stored in JNDI so that 2 players
can interact with each other through it. I implemented
the observer pattern between the game class and player class
(player is observer, game is observable),
but I am having problems:
1. J2EE server (I'm running JBoss) wants all the classes used
directly or indirectly by game class to be packaged in a jar file.
This includes all the GUI files that are not serializable.
I want a clear separation between server side components and
client side components.
2. Because of the problem above, I declared all GUI components as
transient. Now, this is giving me another problem. The update method
in player class uses transient attributes (call a method on them etc).
However, the game object generates null poitner exception (I think it's
because the attributes are declared as transient).
I am not even sure I'm designing this in a right way, but if
someone can give me some advice, I would really appreciate it.
I'm running Jboss3.2.3 with tomcat, and client talks to a session bean
directly (doesn't go though a servlet).
Thanks in advance
Taki