User: schulze 
  Date: 00/10/12 11:33:23

  Modified:    src/main/org/jboss/ejb Container.java
  Log:
  Fixed the NullPointerException in case of a wrong spelled ejb-link within a ejb-ref 
tag. It throws a DeploymnetException now.
  
  Revision  Changes    Path
  1.28      +3 -1      jboss/src/main/org/jboss/ejb/Container.java
  
  Index: Container.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/Container.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- Container.java    2000/09/28 01:16:58     1.27
  +++ Container.java    2000/10/12 18:33:23     1.28
  @@ -67,7 +67,7 @@
    *   @see ContainerFactory
    *   @author Rickard �berg ([EMAIL PROTECTED])
    *   @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  - *   @version $Revision: 1.27 $
  + *   @version $Revision: 1.28 $
    */
   public abstract class Container
   {
  @@ -402,6 +402,8 @@
                   {
                      // Internal link
                      Logger.debug("Binding "+ref.getName()+" to internal JNDI source: 
"+ref.getLink());
  +                   if (getApplication().getContainer(ref.getLink()) == null)
  +                      throw new DeploymentException ("Bean "+ref.getLink()+" not 
found within this application.");
                      bind(ctx, ref.getName(), new 
LinkRef(getApplication().getContainer(ref.getLink()).getBeanMetaData().getJndiName()));
                          
   //                   bind(ctx, ref.getName(), new Reference(ref.getHome(), new 
StringRefAddr("Container",ref.getLink()), getClass().getName()+".EjbReferenceFactory", 
null));
  
  
  

Reply via email to