I never got EJB to EJB communication working with JRUN. I got similar
excetions. I finally switched to JBoss where EJB to EJB communication works
great.


Jay Walters <[EMAIL PROTECTED]> wrote:
So you got most of the answers you're looking for.  I can't remember the
error you get without the PortableRemoteObject.narrow(), think it's a class
cast though.  As for serialization, it might be that access to JNDI from
within an EJB to what I might term the 'external' namespace as opposed to
the java: namespace might be the culprit.  I can't remember why we went to
that change and it could have been to get around something in JRun.

The code I sent you (my whole app in fact) also runs on JBoss.  This
afternoon I'm going to try and get it running on Weblogic.  Other than JNDI
properties I've only needed one application server specific bit, and it's
JRun and that InstanceManager.setDirty() stuff.

Cheers

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 1:06 PM
To: JRun-Talk
Subject: RE: EJB to EJB - Initial Context probs (forgot 1 bit)


Ahhhhh, I see now how JRun got the info...via the <ejb-ref-name>
tag.

Ok.  Still would like an explanation though on why the exception in
the first place.

Robert




Jay Walters <[EMAIL PROTECTED]>
01/30/2001 09:08 AM
Please respond to jrun-talk

 
        To:     JRun-Talk <[EMAIL PROTECTED]>
        cc: 
        Subject:        RE: EJB to EJB - Initial Context probs (forgot 1
bit)


Sorry forgot to mention I've got the following in my ejb-jar.xml file

            <ejb-ref>
                <ejb-ref-name>ejb/BPackage.Bc</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>test.BPackage.BcHome</home>
                <remote>test.BPackage.Bc</remote>
                <ejb-link>BPackage.Bc</ejb-link>
            </ejb-ref>
 

Cheers
Jay Walters

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 10:04 AM
To: JRun-Talk
Subject: EJB to EJB - Initial Context probs


I didn't notice any examples or docs explainaing how to call an
EJB from within an EJB, so I'm using the same method that I've used
for other app servers.

In the EJB's create method, I get a new InitialContext( ), which is
used to do lookups on the other EJB's that might be called.  My
problem is that when JRun hits this piece of code, it throws a

java.io.NotSerializableException:  javax.naming.InitialContext.

Sure, I can see that an InitialContext might not implement the
Serializable interface, but why is JRun throwing it in the first place?
It works just fine for any other app server we've tried (Orion, JBoss,
Weblogic)!

The only reason I can think it would try to serialize is if we've 
crossed some module boundary in JRun.  In this instance, I've got a
bean (standard bean) that has been instantiated from a JSP page in
the web server which, through JNDI, is attempting to create the 
instance of the EJB in which the InitialContext class is instantiated.

Can someone explain this??
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to