What do you mean by "reference names does not start with ejb/"?  What does
you lookup call look like?  It should be something like this:

         DbSourceHome home = (DbSourceHome) new
InitialContext().lookup("java:comp/env/ejb/guyr/DbSource");

This would be accompanied by the following in ejb-jar.xml:

         <ejb-ref>
            <ejb-ref-name>ejb/guyr/DbSource</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>guyr.DbSourceHome</home>
            <remote>guyr.DbSource</remote>
         </ejb-ref>

and this in jboss.xml:

      <ejb-ref>
         <ejb-ref-name>ejb/guyr/DbSource</ejb-ref-name>
         <jndi-name>guyr/DbSource</jndi-name>
      </ejb-ref>

If both beans are in the same jar, look at the ejb-link tag in the
documentation.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 12:12 PM
Subject: [JBoss-user] External reference inside one jar


> Hi,
>
> I need to deploy same beans in different jar files in same JBoss instance
> (I'm using JBoss 2.0 FINAL). These beans implement user account bases, and
I
> need two different account bases.
>
> To acomplish this, I use <ejb-ref> reference in the ejb-jar.xml and
> appropriate <ejb-ref> in jboss.xml specifying in ejb-ref/jndi-name local
> JNDI name.
>
> When I look into the log file, i see that all references were resolved
> correctly:
>
> [Container factory] Binding an EJBReference jndi/accountGroup
> [Container factory] Binding jndi/accountGroup to external JNDI source:
> account.group
> [Container factory] Binding an EJBReference jndi/group
> [Container factory] Binding jndi/group to external JNDI source:
group.group
> [Container factory] Binding an EJBReference jndi/account
> [Container factory] Binding jndi/account to external JNDI source:
> account.account
> ....
> [Container factory] Bound ProfileHandlerBean to profile
> [Container factory] Bound UserAccountBean to account.account
> [Container factory] Bound UserGroupFactoryBean to group.factory
> [Container factory] Bound UserGroupBean to group.group
> [Container factory] Bound UserAccountGroupBean to account.group
> ....
>
> Ok, one thing that I've found, is that reference names does not start with
> ejb/, but everything works ok, if I use internal references and deploy
only
> one jar file. Another thing is, that I do not use the full external URL,
but
> only local. However, local JNDI names are resolved correctly, because I
get
> references to some instances.
>
> I'm not able to use internal reference in case of two and more deployed
> jars, because JBoss start mixing references. Seems that <ejb-ref-name> is
> unique to the JBoss instance, and not the bean context (which is logical,
> but I didn't find anything in specifications that supports or deny the
scope
> of the <ejb-ref-name>).
>
> Does anybody came across such problem and what was the solution, if any?
>
> Roman Rokytskyy
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to