I have an EJB21 session bean that uses an entity bean. 

This is located in the ejb-jar:
                <entity>
  |                     <ejb-name>Book</ejb-name>
  |                     <local-home>BookHome</local-home>
  |                     <local>Book</local>
  |                     <ejb-class>BookEntity</ejb-class>
  |                     <persistence-type>Container</persistence-type>
  |                     <prim-key-class>java.lang.String</prim-key-class>
  |                     <reentrant>false</reentrant>
  |                     <cmp-version>2.x</cmp-version>
  |                     <abstract-schema-name>Book</abstract-schema-name>
  |                     <cmp-field>
  |                             <field-name>title</field-name>
  |                     </cmp-field>
  |                     
  |                     <primkey-field>title</primkey-field>
  |                     
  | 
  |          <ejb-local-ref>
  |             <ejb-ref-name>ejb/Book</ejb-ref-name>
  |             <ejb-ref-type>Entity</ejb-ref-type>
  |                     <local-home>BookHome</local-home>
  |                     <local>Book</local>
  |             <ejb-link>Book</ejb-link>
  |          </ejb-local-ref>                   
  |             </entity>
  | 

JNDI:

  | java:comp namespace of the Book bean:
  | 
  |   +- env (class: org.jnp.interfaces.NamingContext)
  |   |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   |   +- Book[link -> local/[EMAIL PROTECTED] (class: 
javax.naming.LinkRef)
  | 

But my lookup says: javax.naming.NameNotFoundException: ejb not bound

This code is inside the session bean is as follow:

  |             try {
  |                     InitialContext ic = new InitialContext();
  |             
  |                     book = (BookHome) ic.lookup("java:comp/env/ejb/Book");
  |                     
  |             } catch (NamingException e) {
  |                     // TODO Auto-generated catch block
  |                     e.printStackTrace();
  |             }
  | 

Any suggestions? I can't get the local entity bean to work with the session 
bean.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136916#4136916

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136916
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to