I think the problem is that you are trying to find it by the ejb referance name: 
jndiContext.lookup("java:comp/env/ejb/CodelistManagerLocal") which refers to 
<ejb-ref-name>ejb/CodelistManagerLocal</ejb-ref-name>. Try instead to find it by the 
<jndi-name>csc/CodelistManagerLocal</jndi-name> as: Object clmRef 
=jndiContext.lookup("java:/csc/CodelistManagerLocal")

-----Original Message-----
From: KR�LIK Vladim�r [mailto:vladimir.kralik@;asset.sk]
Sent: Wednesday, 23 October 2002 6:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [JBoss-user] JUnitEE and test local interfaces


> From: Schnitzer, Jeff [mailto:JSchnitzer@;maxis.com]
> Sent: 22. okt�bra 2002 22:35
> 
> I call EJB local interfaces from my web applications 
> (packaged in the same EAR) just fine.
Can You explain how ?

I tried this, but it doesn't work. I had forget something :-(.

code from web.xml :
  <ejb-ref>
    <ejb-ref-name>ejb/CodelistManagerLocal</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>sk.asset.ajf.codelist.ejb.CodelistManagerLocalHome</home>
    <remote>sk.asset.ajf.codelist.ejb.CodelistManagerLocal</remote>
  </ejb-ref>

code from jboss-web.xml :
  <ejb-ref>
    <ejb-ref-name>ejb/CodelistManagerLocal</ejb-ref-name>
    <jndi-name>csc/CodelistManagerLocal</jndi-name>
  </ejb-ref>

code from MyServlet.java :
    Context jndiContext = new InitialContext();

    Object clmRef
=jndiContext.lookup("java:comp/env/ejb/CodelistManagerLocal");
    CodelistManagerLocalHome home = (CodelistManagerLocalHome) clmRef;
    // this ^^^^ throws ClassCastException :-(


                vlk


-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en

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

Reply via email to