I have had that same problem. Like you, I have been pulling my hair out
trying to figure out
how to access a component in one application from a component in another.  I
too stumbled
upon the RMIInitialContextFactory as well but I cannot cast/narrow objects
obtained via JNDI.
I always get a ClassCastException. I have temporarily gotten around the
problem by using
reflection to call methods but it's not a solution. I think it's a bug in
Orion. I believe it's a class loader
issue. The object returned from JNDI and the class object you pass to narrow
have different
class loaders - it appears to me each application has its own class loader.

I am frustrated by the fact that I cannot access beans across application
domains without resorting
to proprietary incantations.  ejb-refs do not work either across domains -
deployment fails..  I think this
"feature" is a non-comformance of the J2EE/EJB specs. The spec says nothing
about partitioning the
namespace. The container should resolve the ejb-ref no matter where the
referenced bean resides. Other application servers I have tried employ a
flat namespace and do not have these issues.

Overall I think Orion is a good product but I see application namespace
domains as a limitation.
I really don't see the rationale behind the design. You cannot see another
apps namespace with
the JNDI context provided by the container but you CAN using another context
(RMIInitialContextFactory).
Seems inconsistent to me.

Ill be interested to see how they handle domains when they implement
IIOP/CosNaming for EJB 2.0.
Will C++ CORBA clients see a flat namespace?


Reply via email to