0 Replies Latest reply on Mar 17, 2003 9:59 AM by Andrew

    NullPointerException in BaseConnectionManager2

    Andrew Newbie

      Hello !
      I have resource adapter, service.xml for it and stateless bean that use it. I looking for ConnectionFactory in ejbCreate. Then I redeploy service.xml to change some init parameters. But EJB instance not recreated, and when it try to get connection then NullPointerException throws in BaseConnectionManager2. New instances of EJB works fine.

      public Object allocateConnection(ManagedConnectionFactory mcf,ConnectionRequestInfo cri) throws ResourceException
      //it is an explicit spec requirement that equals be used for matching rather than ==.
      if (!this.mcf.equals(mcf))//this.mcf is NULL
      throw new ResourceException("Wrong ManagedConnectionFactory sent to allocateConnection!");
      } // end of if ()

      May be ResourceException have to be thrown in case of this.mcf is null ?