Hello Michael.
Perhaps I do not explain very well my problem or perhaps I do not understand your solution but ... it's not wroking.
Now I got :
For the producer : the main class in the default package and the Student class in a 'objects' package. It sends an object message to a topic.
For the consumer (mdb) : the mdb is in a 'jms' package and the Student class in a 'myobjects' package.
Giving me
14:18:29,335 ERROR [STDERR] java.lang.RuntimeException: objects.Student
14:18:29,351 ERROR [STDERR] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
14:18:29,351 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
14:18:29,351 ERROR [STDERR] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
14:18:29,351 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
14:18:29,351 ERROR [STDERR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
14:18:29,351 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
....
And I don't understand why 'objects.Student' and not only 'Student'
So ... the only way to make the bean working is renaming the 'myobjects' package to 'objects'. The Student class MUST be in the same package.
I don't know if your solution is supposed to solve the problem but I don't understand why
logger.info(Thread.currentThread().getContextClassLoader());
logger.info(this.getClass().getClassLoader());
is giving
14:18:29,335 INFO [ConsumerBean] BaseClassLoader@eeeb48{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}
14:18:29,335 INFO [ConsumerBean] BaseClassLoader@eeeb48{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}
so that the "temporarily change TCCL" have not effect.