Results 1 to 2 of 2

Thread: Spring in a multi tier (portal) enviroment

  1. #1
    Join Date
    Jul 2005
    Location
    Hannover, Germany
    Posts
    3

    Default 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. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  3. BEA Portal 8.1 and Spring WebFlow
    By sgulics in forum Web Flow
    Replies: 0
    Last Post: Aug 8th, 2005, 04:51 PM
  4. Spring Support in BEA Portal 8.1
    By sgulics in forum Web
    Replies: 0
    Last Post: Aug 8th, 2005, 04:51 PM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •