About Persistence

Discussions

EJB design: About Persistence

  1. About Persistence (3 messages)

    I want to know what dose the persistence mean and why
    are entity bean Persistent and Session bean not.

    Threaded Messages (3)

  2. About Persistence[ Go to top ]

    Dear Padma,

    Persistent means permanent and safe storage of data. If one uses session beans, the data is not persistent. That is if you want to save a record in a database while using session beans, and if the server crashes of suddenly, you cannot save the data in the database.

    But it is not in the case of entity bean. Even if the server crashes off, your data or record will be saved after the server is started again.

    That's why they say that entity bean is persistent and not the session bean.

    Regards
    Suresh
  3. About Persistence[ Go to top ]

    Hai Suresh Thank u for your clarification
    More informations are welcomed regarding PERSISTENCE

    Ambically
    SEKHAR
  4. About Persistence[ Go to top ]


    Persistance means storing data(it can be anything like storing client session data or data of particular account,etc..).
    and it is not true all the session beans are not persisted.
    stateful session beans are passivated and the session details are serialized.
    but in stateless session beans there is no necessity to store the data, so no passivation occurs in the life span of a stateless session bean.

    and Entity Beans are persistant b'cos they effectively just represent the a row in a database(to make it simple).
    since database is persistant(b'cos u wont like to loose the details of your account permanently), entity beans too, persistant. whatever changes you are making in the fields of a entity bean, it changes permanently value in your database.(which is mapped to that particular field).
    is that clear???