Announcement Announcement Module
Collapse
No announcement yet.
Difference @Require and @Transaction annotation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Difference @Require and @Transaction annotation

    I Have two Questions:

    1. what is difference between @Require and @Transaction annotation?
    2. why we need this annotation, it is compulsory to use?




    Thank You,

  • #2
    @akhtar24,

    I would say that besides both being annotation they have nothing in common.

    @Required annotation indicates that the affected bean property must be populated at configuration time: http://static.springsource.org/sprin...red-annotation

    @Transactional annotation makes sure that a class/method runs within a transaction ( you would have to activate it by "<tx:annotation-driven/>" ): http://static.springsource.org/sprin...ve-annotations

    /Anatoly

    Comment

    Working...
    X