Hello,

When I tried to connect to the JBoss4 from a client to look up a remote session 
bean, it just raised the following exceptions, please tell me what's wrong with 
my programs ? The EJBs are deployed successfully without any errors.


  | 00:52:48,312 INFO  [EjbModule] Deploying Restaurant
  | 00:52:48,328 INFO  [EjbModule] Deploying RestaurantManager
  | 00:52:48,562 INFO  [EJBDeployer] Deployed: 
file:/C:/jboss4.0.0/server/default/myapp/ejfood-ejb-1.0.jar
  | 


  | package com.echows.ejfood.clients;
  | 
  | import java.util.Properties;
  | 
  | import javax.naming.InitialContext;
  | import javax.naming.Context;
  | import javax.naming.NamingException;
  | import javax.rmi.PortableRemoteObject;
  | import java.rmi.RemoteException;
  | 
  | import com.echows.ejfood.interfaces.RestaurantManagerHomeRemote;
  | import com.echows.ejfood.interfaces.RestaurantManagerRemote;
  | import com.echows.ejfood.interfaces.RestaurantManagerUtil;
  | 
  | 
  | public class RestaurantClient 
  | {
  |    public static void main(String [] args) 
  |    {
  |       try 
  |       {
  |          Context jndiContext = getInitialContext();
  |          RestaurantManagerHomeRemote home = 
(RestaurantManagerHomeRemote)RestaurantManagerUtil.getHome();
  |          RestaurantManagerRemote rManager = home.create();
  |          rManager.addRestaurant(1, "Test Restaurant");
  |       } catch (java.rmi.RemoteException re) {
  |          re.printStackTrace();
  |       } catch (javax.naming.NamingException ne) {
  |             ne.printStackTrace();
  |       } catch (javax.ejb.CreateException ce) {
  |          ce.printStackTrace();
  |       }/* catch (javax.ejb.FinderException fe) {
  |          fe.printStackTrace();
  |       }*/
  |    }
  | 
  |    public static Context getInitialContext() 
  |       throws javax.naming.NamingException 
  |    {
  |       //return new InitialContext();
  |       // context initialized by jndi.properties file
  |             Properties p = new Properties();
  |             p.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  |             p.put(Context.URL_PKG_PREFIXES, 
"jboss.naming:org.jnp.interfaces");
  |             p.put(Context.PROVIDER_URL, "localhost:1099");
  |             return new javax.naming.InitialContext(p);
  |       
  |       
  |    }
  | }
  | 
  | 



  | package com.echows.ejfood.controller;
  | 
  | import java.util.ArrayList;
  | import java.util.Date;
  | import java.util.Collection;
  | import java.util.Iterator;
  | import java.util.Set;
  | 
  | import javax.ejb.CreateException;
  | import javax.ejb.EJBException;
  | import javax.ejb.FinderException;
  | import javax.ejb.DuplicateKeyException;
  | import javax.ejb.RemoveException;
  | import javax.ejb.SessionBean;
  | import javax.ejb.SessionContext;
  | import javax.naming.NamingException;
  | 
  | 
  | import org.apache.commons.logging.Log;
  | import org.apache.commons.logging.LogFactory;
  | 
  | 
  | import com.echows.ejfood.pk.RestaurantPK;
  | import com.echows.ejfood.interfaces.RestaurantValue;
  | import com.echows.ejfood.interfaces.Restaurant;
  | import com.echows.ejfood.interfaces.RestaurantHome;
  | import com.echows.ejfood.interfaces.RestaurantUtil;
  | 
  | 
  | 
  | /**
  |  * the RestaurantManagerBean.
  |  *
  |  *
  |  * @ejb.bean
  |  *    name="RestaurantManager"
  |  *    type="Stateless"
  |  *    transaction-type="Container" 
  |  *    local-jndi-name="ejfood/local/RestaurantManager"
  |  *    jndi-name="ejfood/remote/RestaurantManager"
  |  *    view-type="both"
  |  *
  |  * @ejb.home
  |  *    local-class="com.echows.ejfood.interfaces.RestaurantManagerHome"
  |  *    
remote-class="com.echows.ejfood.interfaces.RestaurantManagerHomeRemote"
  |  *
  |  * @ejb.interface
  |  *    local-class="com.echows.ejfood.interfaces.RestaurantManager"
  |  *    remote-class="com.echows.ejfood.interfaces.RestaurantManagerRemote"
  |  *
  |  *
  |  * @ejb.ejb-ref
  |  *    ejb-name="Restaurant"
  |  *    ref-name="ejfood/local/Restaurant"
  |  *    view-type="local"
  |  *
  |  *
  |  *
  |  * @ejb.util
  |  *    generate="${ejb.util.generate}"
  |  *
  |  * 
  |  * @author
  |  *    <a href="mailto:[EMAIL PROTECTED]">Eric Chow</a>
  |  */
  | public abstract class RestaurantManagerBean implements SessionBean {
  |     
  |    private Log log = LogFactory.getLog(this.getClass());
  | 
  |    protected SessionContext sc = null;      
  | 
  | 
  |    /**
  |     * @ejb.create-method
  |     */
  |    public void ejbCreate() { }
  |    
  |    // =====================================
  |    // Implementation of Local Interface
  |    // =====================================
  |     
  |     /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */              
  |    public void addRestaurant(long restaurantId, String restaurantName) 
throws EJBException, CreateException {               
  |       try {
  |          addRestaurant(new Long(restaurantId), restaurantName);
  |       } catch(Exception e) {
  |          sc.setRollbackOnly();
  |          log.debug(e);
  | 
  |          if (e instanceof CreateException) {
  |                             throw new CreateException();
  |                     } else {
  |                             throw new EJBException(e);
  |                     }
  |       }
  |    }
  |     
  |     
  |     
  |     /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */              
  |    public void addRestaurant(Long restaurantId, String restaurantName) 
throws EJBException, CreateException {               
  |       try {
  |          RestaurantHome restaurantHome = RestaurantUtil.getLocalHome();
  |          Restaurant restaurant = restaurantHome.create(restaurantId, 
restaurantName);                                    
  |       } catch(Exception e) {
  |          sc.setRollbackOnly();
  |          log.debug(e);
  | 
  |          if (e instanceof CreateException) {
  |                             throw new CreateException();
  |                     } else {
  |                             throw new EJBException(e);
  |                     }
  |       }
  |    }
  |    
  |    
  |    /**
  |     *
  |      *      Remove a specific restaurant.
  |      *              
  |      *      @param  restaurantId    - the restaurant Id.
  |      *      
  |      *      @exception      EJBException            - throws general EJB 
exception if any EJB problem.
  |      *      @exception      FinderException - throws if cannot find the 
specific user or role.
  |      *      @exception      RemoveException - throws when fail to remove 
the EJB.    
  |     *
  |     *
  |     * @ejb.interface-method
  |     *
  |     */      
  |    public void removeRestaurant(long restaurantId) 
  |       throws EJBException, FinderException, RemoveException, 
NamingException {            
  |       
  |       removeRestaurant(new Long(restaurantId));
  |    }
  |     
  |     
  |     /**
  |     *
  |      *      Remove a specific restaurant.
  |      *              
  |      *      @param  restaurantId    - the restaurant Id.
  |      *      
  |      *      @exception      EJBException            - throws general EJB 
exception if any EJB problem.
  |      *      @exception      FinderException - throws if cannot find the 
specific user or role.
  |      *      @exception      RemoveException - throws when fail to remove 
the EJB.    
  |     *
  |     *
  |     * @ejb.interface-method
  |     *
  |     */      
  |    public void removeRestaurant(Long restaurantId) 
  |       throws EJBException, FinderException, RemoveException, 
NamingException {
  |       
  |       RestaurantHome restaurantHome = RestaurantUtil.getLocalHome();
  |       Restaurant restaurant = restaurantHome.findByPrimaryKey(new 
RestaurantPK(restaurantId));
  |       
  |       removeRestaurant(restaurant);
  |    }
  |     
  |     
  |     /**
  |     *
  |      *      Remove a specific restaurant.
  |      *              
  |      *      @param  restaurant      - the restaurant.
  |      *      
  |      *      @exception      EJBException            - throws general EJB 
exception if any EJB problem.
  |      *      @exception      FinderException - throws if cannot find the 
specific user or role.
  |      *      @exception      RemoveException - throws when fail to remove 
the EJB.    
  |     *
  |     *
  |     * @ejb.interface-method
  |     *
  |     */      
  |    public void removeRestaurant(Restaurant restaurant) throws EJBException, 
FinderException, RemoveException {
  |       try {
  |          restaurant.remove();
  |       } catch(Exception e) {
  |          log.debug(e);
  |          
  |          if (e instanceof RemoveException) {
  |             throw new RemoveException();
  |          } else if (e instanceof FinderException) {
  |             throw new FinderException();         
  |          } else {
  |             throw new EJBException(e);
  |          }
  |       }
  |    }
  |     
  |     
  |     /**
  |     *
  |      *      Update a specific restaurant.
  |      *              
  |      *      @param  restaurantId    - the restaurantId.
  |      *      @param  restaurantName   - the restaurant name.
  |      *      
  |      *      @exception      EJBException            - throws general EJB 
exception if any EJB problem.
  |      *      @exception      FinderException - throws if cannot find the 
specific user or role.
  |      *      @exception      RemoveException - throws when fail to remove 
the EJB.    
  |     *
  |     *
  |     * @ejb.interface-method
  |     *
  |     */      
  |    public void updateRestaurant(long restaurantId, String restaurantName) 
  |       throws EJBException, FinderException, RemoveException, 
NamingException {
  |       
  |       try {         
  |          updateRestaurant(new Long(restaurantId), restaurantName);
  |       } catch(Exception e) {
  |          sc.setRollbackOnly();
  |          
  |          log.debug(e);
  |          
  |          if (e instanceof RemoveException) {
  |             throw new RemoveException();
  |          } else if (e instanceof FinderException) {
  |             throw new FinderException();
  |          } else if (e instanceof NamingException) {
  |             throw new NamingException();
  |          } else {
  |             throw new EJBException(e);
  |          }
  |       }
  |    }
  |    
  |    
  |    /**
  |     *
  |      *      Update a specific restaurant.
  |      *              
  |      *      @param  restaurantId    - the restaurantId.
  |      *      @param  restaurantName   - the restaurant name.
  |      *      
  |      *      @exception      EJBException            - throws general EJB 
exception if any EJB problem.
  |      *      @exception      FinderException - throws if cannot find the 
specific user or role.
  |      *      @exception      RemoveException - throws when fail to remove 
the EJB.    
  |     *
  |     *
  |     * @ejb.interface-method
  |     *
  |     */      
  |    public void updateRestaurant(Long restaurantId, String restaurantName) 
  |       throws EJBException, FinderException, RemoveException, 
NamingException {
  |       
  |       try {         
  |          RestaurantHome restaurantHome = RestaurantUtil.getLocalHome();
  |          Restaurant restaurant = restaurantHome.findByPrimaryKey(new 
RestaurantPK(restaurantId));
  |          
  |          restaurant.setRestaurantName(restaurantName);
  |       } catch(Exception e) {
  |          sc.setRollbackOnly();
  |          
  |          log.debug(e);
  |          
  |          if (e instanceof RemoveException) {
  |             throw new RemoveException();
  |          } else if (e instanceof FinderException) {
  |             throw new FinderException();
  |          } else if (e instanceof NamingException) {
  |             throw new NamingException();
  |          } else {
  |             throw new EJBException(e);
  |          }
  |       }
  |    }
  |    
  |     
  |     
  | 
  |    /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */              
  |    public Restaurant getRestaurant(long restaurantId) throws EJBException, 
NamingException, FinderException {               
  |       try {         
  |          return getRestaurant(new Long(restaurantId));
  |       } catch(Exception e) {
  |          log.debug(e);
  |                     
  |          if (e instanceof FinderException) {
  |             throw new FinderException();
  |                } else if (e instanceof NamingException) {
  |                   throw new NamingException();
  |          } else {
  |             throw new EJBException(e);
  |          }                  
  |       }
  |    }
  |     
  |    /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */              
  |    public Restaurant getRestaurant(Long restaurantId) throws EJBException, 
NamingException, FinderException {               
  |       try {
  |          RestaurantHome restaurantHome = RestaurantUtil.getLocalHome();
  |          Restaurant restaurant = restaurantHome.findByPrimaryKey(new 
RestaurantPK(restaurantId));
  |          
  |          return restaurant;
  |       } catch(Exception e) {
  |          log.debug(e);
  |                     
  |          if (e instanceof FinderException) {
  |             throw new FinderException();
  |                } else if (e instanceof NamingException) {
  |                   throw new NamingException();
  |          } else {
  |             throw new EJBException(e);
  |          }                  
  |       }
  |    }
  |    
  |    
  |    /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */              
  |    public RestaurantValue getRestaurantValue(long restaurantId) throws 
EJBException, NamingException, FinderException {             
  |       try {         
  |          return getRestaurantValue(new Long(restaurantId));
  |       } catch(Exception e) {
  |          log.debug(e);
  |                     
  |          if (e instanceof FinderException) {
  |             throw new FinderException();
  |                } else if (e instanceof NamingException) {
  |                   throw new NamingException();
  |          } else {
  |             throw new EJBException(e);
  |          }                  
  |       }
  |    }        
  |    
  |    
  |    /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */              
  |    public RestaurantValue getRestaurantValue(Long restaurantId) throws 
EJBException, NamingException, FinderException {             
  |       try {         
  |          Restaurant restaurant = getRestaurant(restaurantId);
  |          
  |          return restaurant.getRestaurantValue();
  |       } catch(Exception e) {
  |          log.debug(e);
  |                     
  |          if (e instanceof FinderException) {
  |             throw new FinderException();
  |                } else if (e instanceof NamingException) {
  |                   throw new NamingException();
  |          } else {
  |             throw new EJBException(e);
  |          }                  
  |       }
  |    }        
  |     
  |     /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */      
  |    public Collection getAllRestaurants() throws FinderException, 
EJBException, NamingException {
  |       RestaurantHome restaurantHome = RestaurantUtil.getLocalHome();      
  |       
  |       return restaurantHome.findAll();
  |    }
  |    
  |    
  |    /**
  |     *
  |     * @ejb.interface-method
  |     *
  |     */      
  |    public Collection getAllRestaurantValues() throws FinderException, 
EJBException, NamingException {
  |       Collection restaurants = getAllRestaurants();
  |       
  |       if (restaurants == null || restaurants.size() == 0) {
  |          return null;
  |       }
  |       
  |       Collection result = new ArrayList();
  |       
  |       Iterator its = restaurants.iterator();
  |       
  |       while(its.hasNext()) {
  |          Restaurant r = (Restaurant)its.next();
  |          
  |          result.add(r.getRestaurantValue());
  |       }
  | 
  |       return result;
  |    }       
  | }
  | 
  | 
  | 



  | /* ====================================================================
  |  * eChows.com Software License
  |  * ====================================================================
  |  */
  | 
  | package com.echows.ejfood.model;
  | 
  | 
  | import javax.ejb.CreateException;
  | import javax.ejb.EntityBean;
  | import javax.ejb.EntityContext;
  | 
  | import com.echows.ejfood.pk.RestaurantPK;
  | import com.echows.ejfood.interfaces.RestaurantValue;
  | 
  | /**
  |  * This is an RestaurantBean.
  |  *
  |  * @ejb.bean
  |  *    type="CMP"
  |  *    cmp-version="${ejb.cmp.version}"
  |  *    name="Restaurant"
  |  *    local-jndi-name="ejfood/local/Restaurant"
  |  *    view-type="local"
  |  *
  |  * @ejb.home
  |  *    local-class="com.echows.ejfood.interfaces.RestaurantHome"
  |  *
  |  * @ejb.interface
  |  *    local-class="com.echows.ejfood.interfaces.Restaurant"
  |  *
  |  * @ejb.persistence
  |  *    table-name="restaurant"
  |  *
  |  * @ejb.pk
  |  *    class="com.echows.ejfood.pk.RestaurantPK"
  |  *
  |  * @ejb.transaction
  |  *    type="Supports"
  |  *
  |  * @ejb.finder
  |  *    signature="java.util.Collection findAll()"
  |  *    query="SELECT OBJECT(a) FROM Restaurant AS a"
  |  *    transaction-type="Supports"
  |  *    unchecked="true"
  |  *
  |  * @ejb.finder
  |  *     signature="Restaurant 
findByPrimaryKey(com.echows.ejfood.pk.RestaurantPK pk)"
  |  *     transaction-type="Supports"
  |  *
  |  *
  |  * @ejb.finder
  |  *    method-intf="LocalHome"
  |  *    result-type-mapping="Local"
  |  *    signature="java.util.Collection findByRestaurantName(java.lang.String 
restaurantName)"
  |  *    query="SELECT OBJECT(o) FROM Restaurant AS o WHERE o.restaurantName = 
?1"
  |  *    transaction-type="Supports"
  |  *
  |  *
  |  * @ejb.value-object 
  |  *
  |  *
  |  * @ejb.util
  |  *    generate="${ejb.util.generate}"
  |  *
  |  *
  |  * @jboss.query
  |  *    signature="java.util.Collection findByRestaurantName(java.lang.String 
restaurantName)"
  |  *    query="SELECT OBJECT(o) FROM Restaurant AS o WHERE o.restaurantName = 
?1"
  |  *
  |  *
  |  * 
  |  *
  |  *
  |  * @author  <a href="mailto:[EMAIL PROTECTED]">Eric Chow</a>
  |  */
  | public abstract class RestaurantBean implements EntityBean {
  | 
  |     protected EntityContext ctx;
  | 
  |     /**
  |      * Create MessageRecord.
  |      *
  |      * @ejb.create-method
  |      *
  |      */
  |     public RestaurantPK ejbCreate(Long restaurantId, String restaurantName)
  |         throws CreateException {
  | 
  |         setRestaurantId(restaurantId);
  |         setRestaurantName(restaurantName);
  | 
  |         return null;
  |     }
  |     
  |     
  |    /**
  |     * @ejb.create-method
  |     */
  |    public RestaurantPK ejbCreate(RestaurantValue restaurantValue) throws 
CreateException {
  |       setRestaurantValue(restaurantValue);
  |       
  |       return null;
  |    }
  | 
  |     /**
  |      * the restaurant id.
  |      *
  |      * @ejb.interface-method
  |      *
  |      * @ejb.pk-field
  |      *
  |      * @ejb.persistence
  |      *    column-name="restaurantId"
  |      *
  |      *
  |      * @jboss.persistence
  |      *    not-null="true"
  |      *
  |      */
  |     public abstract Long getRestaurantId();
  | 
  |     /**
  |       *
  |       * @ejb.interface-method
  |       *
  |       */
  |     public abstract void setRestaurantId(Long restaurantId);
  | 
  |     /**
  |      * the restaurant name.
  |      *
  |      * @ejb.interface-method
  |      *
  |      * @ejb.persistence
  |      *    column-name="restaurantName"
  |      *
  |      *
  |      * @jboss.jdbc-type
  |      *    type="VARCHAR"
  |      *
  |      * @jboss.sql-type
  |      *    type="VARCHAR(200)"
  |      *
  |      * @jboss.persistence
  |      *    not-null="true"
  |      *
  |      */
  |     public abstract String getRestaurantName();
  | 
  |     /**
  |       *
  |       * @ejb.interface-method
  |       *
  |       */
  |     public abstract void setRestaurantName(String restaurantName);
  |     
  |     
  |    /**
  |      * Sets the restaurantValue.
  |      *
  |      * @param   the restaurantValue
  |      *
  |      *
  |      *
  |     * @ejb.interface-method
  |      */
  |    public abstract void setRestaurantValue(RestaurantValue restaurantValue);
  | 
  |    /**
  |      * Sets the restaurantValue.
  |      *
  |      * @param   the restaurantValue
  |      *
  |      *
  |      *
  |     * @ejb.interface-method
  |      */
  |    public abstract RestaurantValue getRestaurantValue();
  | }
  | 
  | 



  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise 
JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd";>
  | 
  | <ejb-jar >
  | 
  |    <description><![CDATA[No Description.]]></description>
  |    <display-name>Generated by XDoclet</display-name>
  | 
  |    <enterprise-beans>
  | 
  |       <!-- Session Beans -->
  |       <session >
  |          <description><![CDATA[the RestaurantManagerBean.]]></description>
  | 
  |          <ejb-name>RestaurantManager</ejb-name>
  | 
  |          
<home>com.echows.ejfood.interfaces.RestaurantManagerHomeRemote</home>
  |          
<remote>com.echows.ejfood.interfaces.RestaurantManagerRemote</remote>
  |          
<local-home>com.echows.ejfood.interfaces.RestaurantManagerHome</local-home>
  |          <local>com.echows.ejfood.interfaces.RestaurantManager</local>
  |          
<ejb-class>com.echows.ejfood.controller.RestaurantManagerSession</ejb-class>
  |          <session-type>Stateless</session-type>
  |          <transaction-type>Container</transaction-type>
  | 
  |          <ejb-local-ref >
  |             <ejb-ref-name>ejfood/local/Restaurant</ejb-ref-name>
  |             <ejb-ref-type>Entity</ejb-ref-type>
  |             
<local-home>com.echows.ejfood.interfaces.RestaurantHome</local-home>
  |             <local>com.echows.ejfood.interfaces.Restaurant</local>
  |             <ejb-link>Restaurant</ejb-link>
  |          </ejb-local-ref>
  | 
  |       </session>
  | 
  |      <!--
  |        To add session beans that you have deployment descriptor info for, 
add
  |        a file to your XDoclet merge directory called session-beans.xml that 
contains
  |        the <session></session> markup for those beans.
  |      -->
  | 
  |       <!-- Entity Beans -->
  |       <entity >
  |          <description><![CDATA[This is an RestaurantBean.]]></description>
  | 
  |          <ejb-name>Restaurant</ejb-name>
  | 
  |          
<local-home>com.echows.ejfood.interfaces.RestaurantHome</local-home>
  |          <local>com.echows.ejfood.interfaces.Restaurant</local>
  | 
  |          <ejb-class>com.echows.ejfood.model.RestaurantCMP</ejb-class>
  |          <persistence-type>Container</persistence-type>
  |          <prim-key-class>com.echows.ejfood.pk.RestaurantPK</prim-key-class>
  |          <reentrant>False</reentrant>
  |          <cmp-version>2.x</cmp-version>
  |          <abstract-schema-name>Restaurant</abstract-schema-name>
  |          <cmp-field >
  |             <description><![CDATA[the restaurant id.]]></description>
  |             <field-name>restaurantId</field-name>
  |          </cmp-field>
  |          <cmp-field >
  |             <description><![CDATA[the restaurant name.]]></description>
  |             <field-name>restaurantName</field-name>
  |          </cmp-field>
  | 
  |          <query>
  |             <query-method>
  |                <method-name>findAll</method-name>
  |                <method-params>
  |                </method-params>
  |             </query-method>
  |             <ejb-ql><![CDATA[SELECT OBJECT(a) FROM Restaurant AS 
a]]></ejb-ql>
  |          </query>
  |          <query>
  |             <query-method>
  |                <method-name>findByRestaurantName</method-name>
  |                <method-params>
  |                   <method-param>java.lang.String</method-param>
  |                </method-params>
  |             </query-method>
  |             <result-type-mapping>Local</result-type-mapping>
  |             <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Restaurant AS o WHERE 
o.restaurantName = ?1]]></ejb-ql>
  |          </query>
  |       <!-- Write a file named ejb-finders-RestaurantBean.xml if you want to 
define extra finders. -->
  |       </entity>
  | 
  |      <!--
  |        To add entity beans that you have deployment descriptor info for, add
  |        a file to your XDoclet merge directory called entity-beans.xml that 
contains
  |        the <entity></entity> markup for those beans.
  |      -->
  | 
  |       <!-- Message Driven Beans -->
  |      <!--
  |        To add message driven beans that you have deployment descriptor info 
for, add
  |        a file to your XDoclet merge directory called 
message-driven-beans.xml that contains
  |        the <message-driven></message-driven> markup for those beans.
  |      -->
  | 
  |    </enterprise-beans>
  | 
  |    <!-- Relationships -->
  | 
  |    <!-- Assembly Descriptor -->
  |    <assembly-descriptor >
  |      <!--
  |        To add additional assembly descriptor info here, add a file to your
  |        XDoclet merge directory called assembly-descriptor.xml that contains
  |        the <assembly-descriptor></assembly-descriptor> markup.
  |      -->
  | 
  |    <!-- finder permissions -->
  | 
  |    <method-permission >
  |       <description><![CDATA[description not supported yet by 
ejbdoclet]]></description>
  |       <unchecked/>
  |       <method >
  |          <ejb-name>Restaurant</ejb-name>
  |          <method-name>findAll</method-name>
  |          <method-params>
  |          </method-params>
  |       </method>
  |    </method-permission>
  | 
  |    <!-- finder permissions -->
  | 
  |    <!-- transactions -->
  |    <container-transaction >
  |       <method >
  |          <ejb-name>Restaurant</ejb-name>
  |           <method-name>*</method-name>
  |        </method>
  |        <trans-attribute>Supports</trans-attribute>
  |     </container-transaction>
  | 
  |    <!-- finder transactions -->
  |    <container-transaction >
  |       <method >
  |          <ejb-name>Restaurant</ejb-name>
  |          <method-name>findAll</method-name>
  |          <method-params>
  |          </method-params>
  |       </method>
  |       <trans-attribute>Supports</trans-attribute>
  |    </container-transaction>
  |    <container-transaction >
  |       <method >
  |          <ejb-name>Restaurant</ejb-name>
  |          <method-name>findByPrimaryKey</method-name>
  |          <method-params>
  |             <method-param>com.echows.ejfood.pk.RestaurantPK</method-param>
  |          </method-params>
  |       </method>
  |       <trans-attribute>Supports</trans-attribute>
  |    </container-transaction>
  |    <container-transaction >
  |       <method >
  |          <ejb-name>Restaurant</ejb-name>
  |          <method-intf>LocalHome</method-intf>
  |          <method-name>findByRestaurantName</method-name>
  |          <method-params>
  |             <method-param>java.lang.String</method-param>
  |          </method-params>
  |       </method>
  |       <trans-attribute>Supports</trans-attribute>
  |    </container-transaction>
  |    </assembly-descriptor>
  | 
  | </ejb-jar>
  | 


  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" 
"http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd";>
  | 
  | <jboss>
  | 
  |    <unauthenticated-principal>nobody</unauthenticated-principal>
  | 
  |    <enterprise-beans>
  | 
  |      <!--
  |        To add beans that you have deployment descriptor info for, add
  |        a file to your XDoclet merge directory called jboss-beans.xml that 
contains
  |        the <session></session>, <entity></entity> and 
<message-driven></message-driven>
  |        markup for those beans.
  |      -->
  | 
  |       <entity>
  |          <ejb-name>Restaurant</ejb-name>
  |          <local-jndi-name>ejfood/local/Restaurant</local-jndi-name>
  | 
  |         <method-attributes>
  |         </method-attributes>
  | 
  |       </entity>
  | 
  |       <session>
  |          <ejb-name>RestaurantManager</ejb-name>
  |          <jndi-name>ejfood/remote/RestaurantManager</jndi-name>
  |          <local-jndi-name>ejfood/local/RestaurantManager</local-jndi-name>
  | 
  |         <method-attributes>
  |         </method-attributes>
  |       </session>
  | 
  |    </enterprise-beans>
  | 
  |    <resource-managers>
  |    </resource-managers>
  | 
  | </jboss>
  | 
  | 





  |     [java] javax.naming.CommunicationException: Receive timed out [Root 
exception is java.net.SocketTimeoutException: Receive timed out]
  |     [java]      at 
org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1118)
  |     [java]      at 
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1232)
  |     [java]      at 
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:515)
  |     [java]      at 
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
  |     [java]      at 
javax.naming.InitialContext.lookup(InitialContext.java:351)
  |     [java]      at 
com.echows.ejfood.interfaces.RestaurantManagerUtil.lookupHome(RestaurantManagerUtil.java:22)
  |     [java]      at 
com.echows.ejfood.interfaces.RestaurantManagerUtil.getHome(RestaurantManagerUtil.java:42)
  |     [java]      at 
com.echows.ejfood.clients.RestaurantClient.main(RestaurantClient.java:23)
  |     [java] Caused by: java.net.SocketTimeoutException: Receive timed out
  |     [java]      at java.net.PlainDatagramSocketImpl.receive0(Native Method)
  |     [java]      at 
java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
  |     [java]      at java.net.DatagramSocket.receive(DatagramSocket.java:712)
  |     [java]      at 
org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1088)
  |     [java]      ... 7 more
  | 




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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3854303


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to