Announcement Announcement Module
Collapse
No announcement yet.
Spring in a multi tier (portal) enviroment Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring in a multi tier (portal) enviroment

    Hi folks,

    I'm pretty new to spring and currently evaluating the framework againt other technologies. I'm planing the development of a new java application. The application will be used in a portal enviroment (based on WebSphere Portal) and should be accessible with different client technolgies (WebClient and RichClient).

    For this reason I'm planing a multi tier architecture with a view tier which could (for performance or licensing reasons) be located on a different virtual maschine and some remote communication between the (JSF) view tier and business tier (using Session EJBs or some other technologie). Persistence should be handled using hibernate. After reading some stuff and searching this forum I've got some questions:
    • Is such an architecture (view tier on different VM) possible using th Spring Framework?
    • Can I handle distributed transaction or can transaction be implemented only in the business tier?
    • Can I use hibernate lazy loading, using some kind of SessionPerView interceptor (or some other technology), when the data based is localed in a different vm?

    Thanks
    Joerg

  • #2
    Is such an architecture (view tier on different VM) possible using th Spring Framework?
    Yes. You can use Spring's own remoting features, which work over a variety of protocols including RMI over HTTP, classic RMI and various web services protocols. Spring can provide remote access to POJOs in this way, injecting a proxy into clients.

    If you want to choose that route, Spring also makes accessing remote EJBs very much easier, through codeless proxying. No need to write a Service Locator or Business Delegate; just inject the business methods interface of the EJB.

    Can I handle distributed transaction or can transaction be implemented only in the business tier?
    Do you mean a tx distributed across multiple resources, or a transaction distributed over the wire between different objects? Spring can do the former, with its JtaTransactionManager. Spring does not do the latter. You should use EJB for this, if you really want to do it. Keeping a transaction context open during a remote invocation is a pretty questionable design decision IMO (which is one reason Spring doesn't offer it).

    Can I use hibernate lazy loading, using some kind of SessionPerView interceptor (or some other technology), when the data based is localed in a different vm?
    You are going to have to have all the data you need available before sending it over the wire. Personally I don't like Open Session In View, so I tend to use this approach even for local applications.

    This is not a Spring issue--you have to address it any time you send persistent object graphs remotely.

    HTH,
    Rod

    Comment

    Working...
    X