• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Spring and JSF together with EJB

 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Is there any benefit of using Spring framework with JSF if i am using EJB in my architecture???
Thanks,
kundan
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry if I answer with a question, but why do you want to use EJBs?
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To get the benefit of application server's security, transaction and distributed features
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you need distribution for?

If you don't need distribution, I think that using something else than EJB would probably make your system much simpler.
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ilja,
can you tell me why distribution is needed in any project and who can be benefitted by it???
Thanks,
kundan
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF is just a web framework. It has nothing to do with any other layers of your web app. Use JSF, SpringMVC, Struts, Tapestry, etc. It doesn't matter.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kundan, I think by "distribution" you mean "distributed computing" with various components running on different machines. At work we run into distributed stuff when we put the servlet container and EJB container on separate machines, or when we talk to partner systems which run on their own servers.

EJB is one of many ways to make a call from one component to another. It's all Java which is either good because you can pass Java objects back and forth or bad because it won't easily interact with other languages. So the remote abilities of EJB might be a positive or a negative in deciding to use it.

As mentioned above, JSF and EJB are far enough apart that one doesn't really influence whether you'd use the other. I work in a framework with just one SessionBean that is a gateway for calls from client to server. (The inventor obviously thought the remote abilities of EJB were a solid positive, but he hedged his bets by also providing XML/HTTP and raw socket gateways.) Once you're through the gateway the rest of the system is plain old Java, so one could use Spring or Spring-like dependency injection or other POJO frameworks.
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stan,
I know EJB and JSF are different thing. What i mean in my original post was if i am using EJB in my architecture then do i need to use spring(not springMVC) beacuse spring with pojo provides many things like application server with EJB. But i got few replies which forced me to think why i am using EJB(spcecially entity beans) ??? And mostly EJB is preffered for distributed functionality so i asked what is the benefit of distributed technology, why it is used? what benefit it can give in future???

Thanks
kundan
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kundan varma:
Hi Stan,
But i got few replies which forced me to think why i am using EJB(spcecially entity beans) ??? And mostly EJB is preffered for distributed functionality so i asked what is the benefit of distributed technology, why it is used? what benefit it can give in future???

Thanks
kundan



As I understand, EJB (mainly for business logic) is used when you want EJB container (App server) to mannage the system level requirements (like security,connection pooling, transaction mgmt, availabiliy, scalability etc.). To answer ur question regarding distributed, you might deployment distributed in following scenario.
Scalability support - may be verticle(adding more cpu processing and memory) and then running multiple ejb containers or horizontal scalabaility adding more machines running app servs on diff machines).

Availabily - Critical apps should serve for 24/7 so you need clustering. This also avoid single point of failure.

So now as you know container takes care of these you can design your components to provide scalability in these areas.

Sorry if I mistaken anywhere.

Best Regards,
Ravikant
 
reply
    Bookmark Topic Watch Topic
  • New Topic