Announcement Announcement Module
Collapse
No announcement yet.
Entity bean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Entity bean

    Hi,
    I use spring framework and have session bean using entity beans. How do i achieve caching of entity bean home, so that i don't have do lookup everytime. I know there are some JndiSupport classes, Not sure which one does my job. A snippet of code is appreciated.

    Thanks.

  • #2
    Spring doesn't provide specific support for working with entity beans, although it does provide support for working with other EJB types.

    You can use JndiObjectFactoryBean in your session beans to simplify lookup of any JNDI-bound object, however, and provide caching. This should work with entity beans, if you are refactoring to take advantage of Spring.

    We recommend that users using entity beans migrate to an O/R mapping solution such as Hibernate, a JDO implementation, or TopLink. This will place you must better if you want to migrate to EJB 3.0 in the future, as the EJB 2.x entity bean model will be much more like Hibernate or JDO than the EJB 2.x entity bean model.

    Comment


    • #3
      Entity beans

      Spring doesn't provide specific support for working with entity beans, although it does provide support for working with other EJB types.

      ---> I knew about it, just wanted to know the right way.

      You can use JndiObjectFactoryBean in your session beans to simplify lookup of any JNDI-bound object, however, and provide caching. This should work with entity beans, if you are refactoring to take advantage of Spring.

      ---> I already did a similar thing by extending one of the spring jndi support classes.

      We recommend that users using entity beans migrate to an O/R mapping solution such as Hibernate, a JDO implementation, or TopLink. This will place you must better if you want to migrate to EJB 3.0 in the future, as the EJB 2.x entity bean model will be much more like Hibernate or JDO than the EJB 2.x entity bean model

      ----> I fully agree with u & that's what we have in mind. But at this point we are forced to use entity beans(legacy stuff), time limit & political compulsion . But using O/R mapping is our next goal, in near future.


      Thanks rod for ur reply. Appreciate ur excellent framework.

      Comment

      Working...
      X