Thank you Kevin for your suggestion. It seems to be the right thing to do.
But it is telling me the stub for the session bean A or entity bean A could
not be found, what did I do wrong ?
I also have another question:
>From the Session Bean B's code, I have already do 'import session A's
package name', then I have something like
SessionA sesA = new SessionA();
String returnValue = sesA.somemethod(String someparameter);
So why do I still need to establish the ejb-ref for Session bean B
referencing Session bean A, in ejb-jar.xml ? I find this rather redundant.
Thanks again!
ChetHong Lau
> -----Original Message-----
> From: Kevin O'Neill [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 05, 2001 1:37 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-user] Help: cross package EJB access problem how ?
>
>
> Make sure you have a references between the beans established in
> ejb-jar.xml.
>
> For example:
>
> I in my ejb-jar.xml I have several session and entity beans that
> reference each other.
>
> <entity>
> <display-name>Topic</display-name>
> <ejb-name>jmoz.Topic</ejb-name>
> <home>org.rocketred.jmoz.model.TopicHome</home>
> <remote>org.rocketred.jmoz.model.Topic</remote>
>
> <ejb-class>org.rocketred.jmoz.model.castor.TopicEJB</ejb-class>
> <persistence-type>Bean</persistence-type>
> <prim-key-class>java.lang.Integer</prim-key-class>
> <reentrant>True</reentrant>
> <ejb-ref>
> <ejb-ref-name>ejb/ResourceLink</ejb-ref-name>
> <ejb-ref-type>Entity</ejb-ref-type>
> <home>org.rocketred.jmoz.model.ResourceLinkHome</home>
> <remote>org.rocketred.jmoz.model.ResourceLink</remote>
> <ejb-link>jmoz.ResourceLink</ejb-link>
> </ejb-ref>
> </entity>
>
> This entity bean has a global name of jmoz.Topic internally it uses
> another entity bean ejb/ResourceLink whose global name is
> jmoz.ResourceLink but mapped to ejb/ResourceLink via the ejb-ref
>
> <session>
> <display-name>Manager</display-name>
> <ejb-name>jmoz.Manager</ejb-name>
> <home>org.rocketred.jmoz.manager.ManagerHome</home>
> <remote>org.rocketred.jmoz.manager.Manager</remote>
> <ejb-class>org.rocketred.jmoz.manager.ManagerBean</ejb-class>
> <session-type>Stateless</session-type>
> <transaction-type>Container</transaction-type>
> <ejb-ref>
> <ejb-ref-name>ejb/Topic</ejb-ref-name>
> <ejb-ref-type>Entity</ejb-ref-type>
> <home>org.rocketred.jmoz.model.TopicHome</home>
> <remote>org.rocketred.jmoz.model.Topic</remote>
> <ejb-link>jmoz.Topic</ejb-link>
> </ejb-ref>
>
> ....
>
> </session>
>
> Here the Session bean refers to the topic bean as
> "java:comp/env/ejb/Topic" in code so as above the name is
> mapped in the
> ejb-ref portion of the bean declaration from jmoz.Topic to ejb/Topic
>
> Hope this helps.
>
> k.
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>>Hello all,
>>
>>Please help me wit this: I have a session bean A accessing to an entity
bean
>>A using EJB reference java:comp/env/ejb/syssetting. These two beans is put
>>into package A. Then I have another package B, with a session bean B
trying
>>to access the session bean A (which in turns accesses entity bean A). But
>>this can't be done, it gives out the error below. What should I do ?
Should
>>I define any reference for session bean B, or should session bean A access
>>entity bean A using different way, or is there a different way of session
>>bean B accessing session bean A, etc ? Any suggestion appreciated.
Thanks!!
>>
>>The error is :
>>
>>java.rmi.ServerException: ; nested exception is:
>> java.rmi.RemoteException: Missing Node - syssetting; nested
>>exception is:
>> java.rmi.RemoteException: Missing Node - syssetting
>>java.rmi.RemoteException: Missing Node - syssetting; nested exception is:
>> java.rmi.RemoteException: Missing Node - syssetting
>>java.rmi.RemoteException: Missing Node - syssetting
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user