I have 2 applications deployed in seperate ear files. Application A has a session bean deployed as follows:
<session>
<ejb-name>ReaderEjbCH</ejb-name>
<home>org.library.ReaderEjbCHHome</home>
<remote>ejb.CH</remote>
<ejb-class>org.library.ReaderEjbCHBean</ejb-class>
where ejb.CH is packaged in a common jar file. The jndi name for this bean is "CH/ReaderEjbCH". The Home interface extends a tagging interface (BookCHHome), which is part of application B, which extends the ejb.CHHome interface, which contains the create for ejb.CH.
Application B does a jndi lookup of the CH context, finds the session bean from Application A, and tries to do the following narrow:
CHHome home = (CHHome) javax.rmi.PortableRemoteObject.narrow(obj, ti);
CH ch = home.create();
where obj is the looked up object, and ti is the tagging interface as explained. The tagging interface is a Home interface for a bean that is not defined. WebSphere throws a classCastException, because it can't find the stub for the tagging interface. If I manually create an iiop stub for that tagging interface's class, and include it in the ejb.jar for applicationB I get past the narrow, but then the create fails with a remote exception. From the stack trace it looks like it is trying to call a create() in the tagging interface rather than in the CHHome, which it has been cast to.
[8/18/04 9:43:11:905 EDT] 2e936ed7 SystemErr R at javax.rmi.CORBA.Util.wrapException(Util.java:295)
[8/18/04 9:43:11:905 EDT] 2e936ed7 SystemErr R at org.library.book._BookCHHome_Stub.create(Unknown Source)
This all works for WebLogic, Sun, Oracle, and
JBoss. Any clues as to why it might not be working for Websphere 5.1? and what I can try?
tia,
Mike