As per my knowledge, Application Server handles all the load balancing, failover kind of stuff in the distributed application..
then how working in clustered environment is different if we are using Spring instead of EJB? Do we require to do some extra configuration or coding in Spring? why some people say, EJB is more suitable for distributed environment?
no Sam, I didnt find reference to what i said in the first post about distributed application.
still, my main question is how Spring implementation is different in distributed application (or there is no difference?)..
for example, i have written an application that is running perfectly on the server. later, I added 2 more nodes using clustering in weblogic. now, do i require to do any changes in spring configuration or code... or, it will automatically take advantage of clustering.
Who said that? any reference/context in which you read that?
Enterprise JavaBeans (EJB) technology is the server-side component architecture for Java Platform, Enterprise Edition (Java EE). EJB technology enables rapid and simplified development of distributed, transactional, secure and portable applications based on Java technology.
development of distributed, transactional, secure and portable applications based on Java technology.
The original question & even mine was for the more. Is EJB more suited for distributed computing compared to Spring?
From what I know Spring is a pretty good replacement for EJB supporting (most/all) EJB features in a more simplified manner.
I personally haven't worked on any EJB to Spring migration or distributed computing features of either. So I don't have any first hand experience to talk about the topic.
No, and EJBs don't do distributed applications themselves either. Meaning it is the server that is responsible, and you can run Spring anywhere in any server, and even Tomcat can do clustering. If you write clean POJO classes then they can run in distributed environments with no code change at all. It is all about your servers configuration, not your applications. That is why I said EJBs don't do distributed/clustering, because EJBs are the code, not the server. Now to be an EJB container following the spec, then you have more than just code, but that is J2EE stuff in which EJB is just one part of the spec.
So, the answer is Yes, Spring can run in a distributed environment without any code changes or repackaging. It runs the same regardless of what environment it is running in.