joel cordonnier wrote:
> 
> Hi!
> 
> I have a SessionBean that call an CMP entity bean.
> They are not found in the same package, nor in the
> same based directory.
> Which xml tag should I use to refer to the entity bean
> package in the deployment descriptor of the session
> bean???
> 
> Is it necessary to add this tag in the jboss.xml file?

Yes, it is an external ejb reference.  For external ejb-references, you
have to provide:

in ejb-jar.xml: no ejb-link tag

in jboss.xml, in the bean section: 
<ejb-ref>
  <ejb-ref-name>ejb/myRef</ejb-ref-name>
  <jndi-name>CMPbean</jndi-name>
</ejb-ref>


The call in the session bean your call will be

Context context = new InitialContext();
CMPHome home = (CMPHome)context.lookup("java:comp/env/ejb/myRef");



> In my session bean, I call the function lookup like
> this: jndiLookup("") to get the Home interface of my
> entity bean. What should I use for the lookup
> arguments ?
> 
> Is the <jndi-name> tag in the jboss.xml file used only
> for lookup ?
> 

AFAIK, yes


Sebastien


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to