Announcement Announcement Module
Collapse
No announcement yet.
Spring framework best practices: deploying a non-bean compliant component Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring framework best practices: deploying a non-bean compliant component

    I want to build an MVC app using Spring (first timer here).

    As such I want to embed Jetty as the servlet engine. Jetty however doesn't strictly follow the java beans pattern, so I can't launch some classes from Spring (they use overloaded setters or non setter init methods like addXYZ).

    What is the accepted/recommended practice for structuring this project? Obviously all my code fits nicely in the MVC model, but for Jetty:
    • Do I encapsulate all of Jetty (or any other non-bean friendly component) in my own Spring-friendly bean?
    • Do I try to instantiate as much of it as possible in spring and just extend classes that aren't bean con-formant to make them act like proper beans?
    • Should I use Java Config instead of XMLs in order to sidestep problems like overloaded setters and other non-bean issues?
    • Is there another option?
Working...
X