Ok, I've - almost - solved the the problem.
In fact the problem is that the Student class is in a package and the MDB in another package.
Using
logger.info(this.getClass().getClassLoader());
logger.info(Thread.currentThread().getContextClassLoader());
give me
13:37:15,760 INFO [ConsumerBean] BaseClassLoader@1a3df98{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}
13:37:15,760 INFO [ConsumerBean] BaseClassLoader@1a3df98{vfszip:/D:/java/jboss-5.0.1.GA/server/jms/deploy/ejb1.jar/}
So if the 2 classes are in the default package (in the root of the jar), there is no problem.
But if I use packages to store my classes it's not working.
What can I do ?