I have enterprise application A and B deployed (in WLS 10.0). A is the wireframe, B is the client application. The client issues the following calls:
Object o = ctx.lookup(jndiName);
cf = (ConnectionFactory) o;
ConnectionFactory is an interface defined as:
public interface ConnectionFactory
extends java.io.Serializable, javax.resource.Referenceable {
...
}
What's happening:
- If the jar containing the interface class is in the system path, line 2 runs fine
- If the interface class is not in the system class path, but it is packaged separately with applications, line 2 throws a ClassCastException (which contains informative text, which o is ConnectionFactoryImpl)
? , JNDI ( ?), , - ?
:
- , , , ...
- , , ... ..., - .
- , , , , - -?
- ...:)
, - , JNDI , ( ?) ..
!