Hi Ashwani,
this took a little longer to check, please excuse my replying to mails out of
order!
I think I have the ejb-link references done correctly,
in the <ejb-link> tag I've placed the JNDI name (the same as the name used
for the <ejb-name> tag) in the ejb-link tag. I've included a http link to the
contents of orion-ejb-jar.xml (I'm using Orion 1.5.2) which I've done
something similar. What is bothering me is the fact the the exact same code
is working fine from a regular java client but throws the classcastexception
when I copy and paste the same code into an ejb.
Thanks for your help with this,
I really do appreciate it,
Oisin

heres the content of the ejb-jar.xml file deployment descriptor:

<?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>
                <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>
                        <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>
                <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>
                        <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>

and the orion-ejb-jar.xml
http://www.cs.tcd.ie/Oisin.Kim/ejb/orion-ejb-jar.xml


On Tuesday 03 July 2001 06:18, Ashwani Kalra wrote:
> Hi,
>
> This is what you should do to access ejb from another ejb. For more details
> you can refer to DD chapter of ejb specs
>
>
> This is taked from ejb spec:
> The ejb-link element is used in the ejb-ref element to specify that an
> EJB reference is linked to another enterprise bean.
> The value of the ejb-link element must be the ejb-name of an enter-prise
> bean in the same ejb-jar file, or in another ejb-jar file in the
> same J2EE application unit.
> Alternatively, the name in the ejb-link element may be composed of a
> path name specifying the ejb-jar containing the referenced enterprise
> bean with the ejb-name of the target bean appended and separated from
> the path name by # . The path name is relative to the jar file con-taining
> the referencing component. This allows multiple enterprise
> beans with the same ejb-name to be uniquely identified.
> Used in: ejb-entity-ref, ejb-ref
> Example:
> <ejb-link>EmployeeRecord</ejb-link>
> Example for entity beans that exist in other ejb-jar files in the same
> J2EE unit:
> <ejb-link>../products/products.jar#PrductEJB</ejb-link>
>
>
> Example:
> <ejb-entity-ref>
> <description>
> This is a reference descriptor for an order bean which is
> used in product.jar
> </description>
> <remote-ejb-name>OrderEJB</remote-ejb-name>
> <ejb-ref-name>ejb/Order</ejb-ref-name>
> <home>com.commercewarehouse.catalog.OrderHome</home>
> <remote>com.commercewarehouse.catalog.Order</remote>
> <ejb-link>../orders/orders.jar#OrderEJB</ejb-link>
> </ejb-entity-ref>
> -->
>
> ========================
> Cheers
> Ashwani Kalra
> Aithent Technologies
> India
> http://www.geocities.com/ashwani_kalra/
> =========================
>
>
>
>
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Oisin Kim
> Sent: Thursday, August 16, 2001 12:27 AM
> To: [EMAIL PROTECTED]
> Subject: What do I have to do to get EJBs to communicate with each
> other?
>

===========================================================================
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".

Reply via email to