Experts views about implementation of EJB?

Discussions

EJB design: Experts views about implementation of EJB?

  1. Experts views about implementation of EJB? (2 messages)

    Hi ,
        I have been doing the ejb for last six months,and till
      date I could not get the clear idea about the circumstances in which I can use it.I had a system well deve
     loped in JSP.Initially I connect to the database in every
    request and later I found the connection pooling could impro
    ve the efficiency.I incorporated it and concluded the efficiency boosting up.
      As in case of the connection pooling the system performance has increased,I wanted to improve it more by
     the general Object pooling concept,to be presice the
     statement object pooling.
      Now in my application the concurrent users can be much
     more and my system(application) should perform well in
     all the cases in terms of scalibility and performance.
       Now the object pooling can do the same and more can
     be done if the system be distributed(the work be handled
     by two JVM 1)Servlet Engine and 2)EJB Servers JVM
     Now I wanted the experienced views regarding the following
     query:
      Is implementing of EJB in the system handle all the
     object pooling issues properly and keeping the data
      corruption away when being accessed concurrently.In
     short are all the features provided by EJB it self ie
     do it create the pool of objects by it self(implicitily),
     will it save my time of coding the pool and then breaking
     my head in creating the thread of pool and making the pool
     thread safe.
      Help from experts expected with detailed description.
     thanks.
     regards
     vicky
     
  2. Whatever things you mentioned you want to have will be taken care of by EJB. You can use and application server for

    1. Robustness
    2. reliability
    3. security

    Most important thing is you don't have to worry about synchronizing, threads etc.

    Generally EJB's has overhead, but you can overcome it by following right design patterns (check j2ee patterns from sun).

    It also improves performace if designed and coded in right way.
  3. Hi Ravi,
        Thanks for the reply,Let me explain the scene properly
      and let me know whether the need will be done by the EJB
      or not,Please give me a detailed explaination :
      I had developed the system with the following concept:
      1) In one.html there is a form where the data is being entered
      2) The entered data is being read by the one.jsp
      3) In one.jsp there is a logic which lets the captured data
         entered in multiple(5-10) tables.
      4) The logic of entering the data in tables is put as a transac-
         tion.
      5) In the one.jsp the JVM is using lots of objects,and the conne
         ction pooling concept has been used,by which the speed of the
         process has been increased.
      6) Connection pooling increses the speed,and more can be done
         if the statement pooling is also done.
      7) Here I had understood that the general object pooling can
         enhance my performance to larger extend.
      8) A step more improvement can be boosted by the thread pooling
         ie. looking at the memory management.
      Now the question is should I break my head in developing the
      entire logic and concentrate more on the following issues:
        a)Threading part(Making therd and Thread Pool)
        b)Making the system thread safe,thus avoiding the issue of
          data corruption.
        c)Transaction part
        d)Connection pooling
         OR
        Should I use the features provided as EJB.
        The entire system explained above has been created using only
        JSP and the system is performing well with lesser number of users
        in every respect.But I suspect once the number of users increse
        beyond the certain limit there will be drastic drop in the system
        performance.I am considering the same system handling 50,000 user
        in a month,an average of 70 user accessing the system in an hour.
        So what I am targetting the system to handle the 10000000 users
        in a month averaging the 14000 users/hour.Moreever there are various pages handling such concepts.

        Now what I wanted to know whether the remedy for the case is judged
        properly?Is this the case where I can user the EJB and let the
        system to handle the entire complicated issues, and only concentra
        te on the BUSSINESS LOGIC?
        Is my analysis appropriate and understood clearly? An expertise
        help is required at the earliest since my entire system is on
        halt to decide the way to develop.
        thanks
      regards
      vicky