Announcement Announcement Module
Collapse
No announcement yet.
ApplicationContext in a clustered environment Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ApplicationContext in a clustered environment

    If I deploy a webapp using spring in a clustered environment and the webapp is deployed to multiple servers. Will the ApplicationContext be created on each server within the cluster? More specifically if my ApplicationContext is in charge of creating a Hibernate SessionFactory, will seperate SessionFactory instances be created on each server in the cluster? If the answer to either of these questions is no, can someone please provide some explanations to why. Thanks.

  • #2
    The application context will be created on each server. Why would it not? But, use the forum search feature for more info, such as this thread: http://forum.springframework.org/showthread.php?t=18079
    Last edited by robyn; May 14th, 2006, 10:13 AM.

    Comment


    • #3
      Re: ApplicationContext in a clustered environment

      Originally posted by Shpongle
      If I deploy a webapp using spring in a clustered environment and the webapp is deployed to multiple servers. Will the ApplicationContext be created on each server within the cluster?
      I think it depends on your configuration. If the cluster supports farming (or whatever they call it) you can deploy an application to a single node and it will be copied to all others. If the cluster doesn`t support farming, you have to to it another way (by hand or maybe some script).

      But Spring certainly is not going to do anything.

      More specifically if my ApplicationContext is in charge of creating a Hibernate SessionFactory, will seperate SessionFactory instances be created on each server in the cluster?
      Yes.

      But sessions can be replicated on all the nodes:
      see SwarmCache, JBoss TreeCache.

      I have no practical experience with clustering and Hibernate so everything I say can`t be hold against me

      Comment

      Working...
      X