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

  • RooJavaBean

    In the normal "wedding" application, that is typically used as an example for roo ...

    Two questions:

    1) What is responsible for scanning for the @RooJavaBean annotation?
    2) What causes that thing (whatever it is) to get invoked so that those beans will be available to the "wedding" application?

    Background: We are attempting to use a different controller than the spring web mvc controller that comes with roo, and we need to make sure that that invocation happens in our generated applications.

  • #2
    1) What is responsible for scanning for the @RooJavaBean annotation?
    All @Roo annotations are only retained in the source code at development time. So the Roo shell scans for these annotations on projects it is running in. At application runtime (when deployed in a Web container) the annotation is not present at all.

    2) What causes that thing (whatever it is) to get invoked so that those beans will be available to the "wedding" application?
    While this question is a little unclear I'll try to respond . If you are talking @Roo annotations, as mentioned above, they are only relevant to Roo at development time. They are used to add capabilities to beans via aspects or to install web artifacts (in the case of @RooWebScaffold). Spring or JPA annotations such as @Entity or @Controller on the other hand are picked up at application runtime to provide their respective functionalities. In the case of Spring this is done via component scanning configured in the applicationContext.xml file.

    Does that answer your questions?

    Comment

    Working...
    X