Are Java1 and Java2 Session Beans bundled in different ears ear1 and ear2?

Is there a runtime dependency from ear1 to ear2?

And is Java2 injected via @EJB into Java1?

This should work.

If you call Java2.m1 directly without dependency injection, it will not work because the call remains inside ear1 and new InitialContext() in Java2 will return the Context from ear1 what you do not want.