1 Reply Latest reply on Oct 23, 2001 10:47 PM by David Jencks

    EJB Object Pooling

    mausam Newbie

      Hi All,

      How r u?

      I have problem, if any body have solution then please
      help me out.

      We are making an ERP application. For that we create
      EJB and servlet. Database for this server is mySQL and
      operating system is Linux.
      For deploying EJB we are using JBoss with Tomcat.

      In this application we are preparing different
      databases for different users, but using same
      application files for all users.

      Earlier everybody was developing his part and that
      part was tested by himself (means by single user).
      That time application was working properly.

      Now we are integrated all applications. Now 3-4
      peoples are doing testing of this application by
      logging simultaneously from different terminals as
      different users, after login they are connected to
      different databases as I told you above that we are
      using different databases for different members.

      Problem has started now. If coincedently any two
      different users form different members access same
      application and make changes then it will overwrite
      changes on another users database for the record which
      having same primary key value. So now it's become very
      big problem for us.

      Our conclusion on this problem is that as we are using
      different databases but same EJB because of that it is
      giving problem.
      Our conclusion is that it is preparing only one EJB
      object for one application. I guess it should prepare
      different object for different clients.

      If anybody has solution then please do reply.

        • 1. Re: EJB Object Pooling
          David Jencks Master

          It's hard for me to imagine how you got any of this to work... is everything BMP with the DataSource selected by which user is logged in?

          IMHO this is an extremely questionable design, however you may be able to rescue the design by including the user id or database id in the pk of every entity bean.