Since only EJB jars need the Class-Path entry, you have to enter every dependent .jar there (not only direct dependencies).
It should work with JBoss even without declaring the Class-Path at all, since all the .jars share the same loader repository.
I need to put the jars in the EJB class-path as I am following the spec. I do not want to rely on JBoss features (although JBoss is the server that I'm using for this customer).
My point is that the referenced jars also have a Class-Path entry (which also follows the JAR spec) and so, in theory at least, their referenced jars should also be added to the EJB's classpath...
P.S. When I do not add the jars to the EJB class-path, I get CNF exceptions (As I would expect)
Well, i dont think the cascade effect works here. Because if u are considering EJB.jar and having a.jar in its manifest classpath, you can have the classes in "a" loaded using the Classloader for EJB.jar. If a.jar needs b.jar, the classloader for ejb.jar needs to find those classes, which it cannot, if you dont have b.jar in its classpath.
I dont think this is a jboss specific feature.
The 'JBoss specific feature' that I was refering to was the repository, not the Class-Path cascade.
I think that the EJB.jar classloader *should* recurse it's Class-Path and the classpaths of the referenced JARs... (a.jar in this case)