Note that client view jar file must be included directly in the app2.ear file.
But I think the ejb1_client.jar (client view jar file) may not necessary in app2.ear. In app2.ear->ejb3.jar, there can be a bean EJB3 that accesses app1.ear -> ejb1_client1.jar->EchoRemote:
But I think the ejb1_client.jar (client view jar file) may not necessary in app2.ear. In app2.ear->ejb3.jar, there can be a bean EJB3 that accesses app1.ear -> ejb1_client1.jar->EchoRemote:
You will need the ejb1_client jar because of the interface definition of EchoBeanRemote. Otherwise the classes in app2.ear won't compile.
Thanks for Frit's reply.
That makes sense to have the EchoBeanRemote interface class in the class path to make it compile.
So, in general, even though we can look up JNDI to look up the bean or dependency injection, we still need the bean's class file in the class path to compile.