• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring for enteprise class applications

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone advocate using Spring for enterpise applications? That is, does it address the the big 'ilities' such as horizontal scalability, reliability, security, etc?
[ February 23, 2005: Message edited by: Sean Walker ]
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring doesn't really address these "ilities" other than by supporting distributed transactions through JTA (or implicitly by delegating to EJB's). Then again, do you see other frameworks supporting those non-functional requirements in any other way than by letting you use the J2EE platform?
 
Sean Walker
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, that's really what I'm getting at. What I keep hearing about Spring is that many people are disenchanted with EJBs and Spring offers a lighter weight alternative. So how lightweight is it? Should it only be used when you have light loads and in general you don't have enterprise type non-functional requirements?

Another related question is are EJBs the only way to go when developing enterprise applications in Java?
[ February 24, 2005: Message edited by: Sean Walker ]
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sean Walker:
What I keep hearing about Spring is that many people are disenchanted with EJBs and Spring offers a lighter weight alternative. So how lightweight is it? Should it only be used when you have light loads and in general you don't have enterprise type non-functional requirements?


By Spring offering a lighter weight alternative, people generally refer to it as an alternative for EJB's which are--from a development process point of view--a heavy-weight technology. By using Spring, your development process becomes lighter/faster, and you're still not giving up any "enterprise grade non-functional requirements".

Originally posted by Sean Walker:
Another related question is are EJBs the only way to go when developing enterprise applications in Java?


No, it isn't. We're currently developing an enterprise application with approximately a thousand users worldwide and the system's performance and other 'ilities' have improved significantly after throwing away those dozens of EJB's the original development team had put in. (ok, we still have 4 EJB's left but those will probably be gone as well by the summer)
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok i really am not sure what am asking here I'm havign some basic doubts

Stateless Session beans scale because
1.they can be pooled
2.When deployed in a cluster they can route the call to any server that hosts the bean and also the fact that all beans are essentially the same helps.

Now if i were to replace this with a Spring bean. I mean I dont need SSB just because i like declarative trans and security anymore. In Spring , a bean can be either deployed as a prototype or a singleton. I want the Spring container to manage the pool of beans like a j2ee container.
How can i achieve a similar effect?

Does Spring IOC know that a bean is actually being used by a client?
When i do appContext.getBean() what do i get? the actual reference to the object (bean) / some proxy?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Karthik Guru:
Stateless Session beans scale because
1.they can be pooled
2.When deployed in a cluster they can route the call to any server that hosts the bean

Now if i were to replace this with a Spring bean. I mean I dont need SSB just because i like declarative trans and security anymore. In Spring , a bean can be either deployed as a prototype or a singleton. I want the Spring container to manage the pool of beans like a j2ee container.
How can i achieve a similar effect?


Think about why you needed to pool the SLSB's in the first place -- they were too heavy-weight to be created upon request. Well, with Spring beans the infrastructure providing transactions etc. is lightweight enough that you can afford the prototype approach if that's what you need.
Also, if you really need distributed objects (remoting), EJB might very well be your best option (assuming you don't want to use web services, plain RMI, Burlap or Hessian, or the Spring HttpInvoker). It's just that those cases are far from being the majority, in my experience. When was the last time you had a separate web application container and application server?
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:

It's just that those cases are far from being the majority, in my experience. When was the last time you had a separate web application container and application server?



Agree with that. It was supposed to be the majority at the begening (of EJB I mean), but it is not anymore.
And all the applications I've worked on the past 4 years are deployed in one and only one container.

Nevertheless, a J2EE container is not just an EJB implementation. It also offers pooling, caching, lazy loading .... and J2EE compliance.
For enterprise class application, it can be important
Sounds like Spring can offer that too anyway, relying on a J2EE server or not
[ February 24, 2005: Message edited by: JeanLouis Marechaux ]
 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Stateless Session beans scale because
1.they can be pooled ....

...I want the Spring container to manage the pool of beans like a j2ee container.
How can i achieve a similar effect?



Here some data from Rob & Juergens J2EE without EJB (chapter 15 if you can access the book). They did some tests to measure the performance of Remote EJBs (RE) vs Local EJBs (LE) vs a shared instance of a POJO (SI) vs a pooled instance of a POJO(PI). Pooling was provided by Spring AOP and they measured a web transaction that didn't do much (first figure) & one that was a relatively intensive business operation(second figure):


(Figures interpreted from a graph)
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic