Hi Rob,
Thanks for the help,
I think I did it correctly,
heres the contents of the ejb-jar.xml file you can see the ejb-ref tag,
I'm just not sure I have it in the right place,
can you tell from this file?
Thanks a million, I'm very desparate at the moment,
Oisin
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
1.2//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_2.dtd">
<ejb-jar>
<description>
</description>
<enterprise-beans>
<!--this bean references no others-->
<entity>
<description>
</description>
<ejb-name>MyHLR</ejb-name>
<home>HLRHome</home>
<remote>HLR</remote>
<ejb-class>HLRBean</ejb-class>
<primkey-class>java.lang.Integer</primkey-class>
<reentrant>False</reentrant>
<persistence-type>Container</persistence-type>
<cmp-field><field-name>SubscriberNumber</field-name></cmp-field>
<cmp-field><field-name>Available</field-name></cmp-field>
<primkey-field>SubscriberNumber</primkey-field>
</entity>
<!--this bean references the HLR bean-->
<entity>
<description>
</description>
<ejb-name>MyMessageNode</ejb-name>
<home>MessageNodeHome</home>
<remote>MessageNode</remote>
<ejb-class>MessageNodeBean</ejb-class>
<primkey-class>java.lang.Integer</primkey-class>
<reentrant>False</reentrant>
<persistence-type>Container</persistence-type>
<cmp-field><field-name>DestinationAddress</field-name></cmp-field>
<cmp-field><field-name>OriginatingAddress</field-name></cmp-field>
<cmp-field><field-name>SMSCAddress</field-name></cmp-field>
<cmp-field><field-name>StatusReportingRequest</field-name></cmp-field>
<cmp-field><field-name>ServiceCentreTimeStamp</field-name></cmp-field>
<cmp-field><field-name>ReplyPath</field-name></cmp-field>
<cmp-field><field-name>Length</field-name></cmp-field>
<cmp-field><field-name>MessageTypeIndicator</field-name></cmp-field>
<cmp-field><field-name>Content</field-name></cmp-field>
<cmp-field><field-name>Priority</field-name></cmp-field>
<cmp-field><field-name>BillingDetails</field-name></cmp-field>
<cmp-field><field-name>RoutingInfo</field-name></cmp-field>
<cmp-field><field-name>IsPrimary</field-name></cmp-field>
<cmp-field><field-name>HashValue</field-name></cmp-field>
<cmp-field><field-name>WasTransmitted</field-name></cmp-field>
<cmp-field><field-name>Cost</field-name></cmp-field>
<cmp-field><field-name>NodeName</field-name></cmp-field>
<cmp-field><field-name>ClusterIsland</field-name></cmp-field>
<cmp-field><field-name>MessageID</field-name></cmp-field>
<primkey-field>MessageID</primkey-field>
<!--this is where I've defined the ejb-ref tags, is this
correct?-->
<ejb-ref>
<ejb-ref-name>MyHLR</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>HLRHome</home>
<remote>HLR</remote>
<ejb-link>MyMessageNode</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>MyMessageNode</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>MessageNodeHome</home>
<remote>MessageNode</remote>
<ejb-link>MyHLR</ejb-link>
</ejb-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MyHLR</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
<container-transaction>
<method>
<ejb-name>MyMessageNode</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
On Wednesday 15 August 2001 21:12, you wrote:
> Hi, Oisin:
> Did you configure the <ejb-ref> tag in the ejb-jar.xml?
>
> Good luck!
>
> Rob
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Oisin Kim
> Sent: Wednesday, August 15, 2001 2:57 PM
> To: [EMAIL PROTECTED]
> Subject: What do I have to do to get EJBs to communicate with each
> other?
>
>
> Hello all,
> this is a repost the last mail didn't show but I've made some progress and
> narrowed down the cause of my problem.
>
> I'm having great difficulties trying to get ejb to ejb communication. I
> have Entity and Session EJBs that are deployed fine, I know this since they
> work from regular java clients, I can contact all the ejbs from a single
> client using their JNDI namespaces.The problem comes when I try to
> reference an ejb from another ejb it gives me the following exception,
>
> java.lang.ClassCastException
> at
> com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRem
>o teObject.java:296)
> at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
> at SimpleEntityBean.Submit(SimpleEntityBean.java:261)
> at
> SimpleEntity_EntityBeanWrapper1.Submit(SimpleEntity_EntityBeanWrapper1.java
>: 268)
> at java.lang.reflect.Method.invoke(Native Method)
> at com.evermind._dh._gc(Unknown Source)
> at com.evermind._if.run(Unknown Source)
>
> This happens as soon as I try to create an home object in an ejb that
> references another ejb using the
>
> PortableRemoteObject.narrow(ref,OtherSimpleBean.class) method.
> This code above is where the exception is being thrown.
>
> Is there something I need to do to tell ejbs about one another? I've
> deployed
> all the beans in a sinlge jar file and also in individual jar files but all
> to no avail.
>
> Any help is greatly appreciated,
> I am desparate!
> Best Regards,
> Oisin
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
--
Best Regards,
Oisin
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".