Bugs item #520454, was opened at 2002-02-20 05:40
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=520454&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Hamann (thomash76)
Assigned to: Nobody/Anonymous (nobody)
Summary: self referring ejb-local-ref

Initial Comment:
win2000pro, jdk1.3.1_02, Jboss-3.0.0beta

Hi,

i tried to deploy and run an application on todays version of JBoss unfortunately i 
did not 
succeed... ;)
here's the problem:
 - i have a remote entity bean type "jatek/User" which references a local entity bean 
type 
"jatek/UserCertificate" - defined in ejb-jar.xml like that:
<entity>
<ejb-name>jatek/User</ejb-name>
...
<ejb-local-ref>
<ejb-ref-name>ejb/jatek/UserCertificate</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>jatek.UserCertificateHome</local-home>
<local>jatek.UserCertificate</local>
<ejb-link>jatek/UserCertificate</ejb-link>
</ejb-local-ref>
...
</entity>

 - both bean types are in the same .jar file - therefore the link should do without 
setting ejb-ref in 
jboss.xml explicitly
 - when looking in server.log after server startup and deployment everything seems 
quite fine:
2002-02-20 14:12:38,345 DEBUG [org.jboss.ejb.EntityContainer] Begin java:comp/env for 
EJB: 
jatek/User
2002-02-20 14:12:38,345 DEBUG [org.jboss.ejb.EntityContainer] TCL: 
java.net.URLClassLoader@140f82
2002-02-20 14:12:38,345 DEBUG [org.jboss.ejb.EntityContainer] Binding an 
EJBLocalReference 
ejb/jatek/UserCertificate
2002-02-20 14:12:38,345 DEBUG [org.jboss.ejb.EntityContainer] Binding 
ejb/jatek/UserCertificate 
to bean source: jatek/UserCertificate
2002-02-20 14:12:38,345 DEBUG [org.jboss.ejb.EntityContainer] End java:comp/env for 
EJB: 
jatek/User

 - but when calling create() on the home of the remote entity an exception is thrown 
during 
ejbPostCreate():
2002-02-20 14:13:08,362 ERROR [org.jboss.invocation.jrmp.server.JRMPInvoker] operation 
failed
javax.ejb.CreateException: local not bound
        at jatek.JaTeKUserBean.ejbPostCreate(JaTeKUserBean.java:108)
        at java.lang.reflect.Method.invoke(Native Method)
...
 --> in line 108 "initCtx.lookup("java:comp/env/ejb/jatek/UserCertificate")" is called 
which should 
return the corresponding local home interface


 - a look into the JNDI (via web frontend) tree reveals:
java:comp namespace of the jatek/User bean:
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- jatek (class: org.jnp.interfaces.NamingContext)
  |   |   |   +- UserCertificate[link -> local/jatek/User] (class: 
javax.naming.LinkRef)

==> now the question: why does the link referr to the remote entity itself and not to 
the local 
one? or am i just misunderstanding the output? or is a lookup of a referred local home 
interface not 
possible during create() of a remote entity bean?

Thank you in advance,
Thomas

----------------------------------------------------------------------

>Comment By: Thomas Hamann (thomash76)
Date: 2002-02-20 07:58

Message:
Logged In: YES 
user_id=445709

i think the problem was in org.jboss.ejb.Container at line 862 ...
the statement should be
Util.bind(envCtx, refName, new LinkRef(ref.getLink()));
instead of
Util.bind(envCtx, refName, new LinkRef(localJndiName));
shouldn't it?!

Thomas


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=520454&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to