We have the following setup:
- application A: provides some services to access some data
- application B: calls services in application A
Unfortunately, it doesn't work as expected.
Both applications use their own separate class loading repository.
I know that application B can't directly access classes in application A, since it has no access to its repository.
So I though I'd retrieve the services in A like I would do in a remote client application:
new InitialContext().lookup( jndiName );
However, I get a ClassCastException which I partly understand: both applications include the API of application A, but the service really only implements only the interface in repository A.
I'd really appreciate if you could give me any hint on how to solve that problem.
Thanks in advance.
Oh, I forgot to mention that we are using JBoss 4.2.3.GA.