-
1. Re: Command Pattern in JBoss3.0???
minamoto Sep 3, 2002 12:46 AM (in response to arich)>But there are some Exceptions like >NoClassDefFoundException
>or IncompatibleClassChangeError...
When and where did you get those errors?
At server console, your xx.jar may be imcomplete.
At client console, you may need to add command classes to your client classpath.
I recommend that you clean up the deploy directory and check the jar contents again.
With JBoss 3, an obsolete package may be used if it's loaded earlier than a newer package.
>Have any one use Command Pattern?
I have no problem at all.
Miki -
2. Re: Command Pattern in JBoss3.0???
minamoto Sep 3, 2002 9:45 PM (in response to arich)Last night I played around with my ejb program using the command pattern.
Changing the package structure, I reproduced your situation easily.
I thought you didn't add command classes to your ejb jar.
In your case, a command class is a subclass of the abstract Command class.
And the CommandRunner session bean only knows the Command class but doesn't know it's subclasses.
I think the RMI dynamic stub loading works when an unknown server class is transferred to the client but doesn't in the other direction.
I found the related page on EJB Design Pattern book (p.24). In a one of trade-offs, it states "Command Server ejb-jar tightly coupled command beans and other EJBs".
You may add command classes to a war or an ear file.
Miki -
3. Re: Command Pattern in JBoss3.0???
arich Sep 6, 2002 12:15 AM (in response to arich)minamoto,
thank for your reply
and i will try to put my subCommand class to war next time(because i have more other problem on JBoss now)
Now i use ByteArrayStream to serialize my Command to server:-)
and it work... maybe it will waste some execute time...
and thanks for your help again :-)
arich