• 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 IOC, Spring AOP alongwith Spring JDBC, as a substitute for EJB3.1

 
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

Please let me know if we can ue Spring IOC, Spring AOP alongwith Spring JDBC instead of EJB 3.1
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB 3.1 uses annotations to inject container managed objects and in a similar manner, Spring injects objects by looking against the Spring container. So the idea is more or less the same, the only difference is that EJB 3.1 defines a set of standards / specifications on how to develop enterprise components that can be deployed to any container that implements the EJB standards. On the other hand Spring is a lightweight alternative and dictates that you could achieve the same without the need for a hefty container.

So to answer your question, yes you could use Spring along with any Spring module instead of EJB 3.1.
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Joe for your reply..!!
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

How can I prove the use of spring instead of EJB in my project?

We used to deploy EJB's on JBOSS. EJB's were used for database interactions and transactions using JDBC code in EJB's.

Does Spring need application server?
How can Spring be used with application server?



Regards,
-Pankaj.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All spring needs is a web server. You can build a spring based web app and deploy into tomcat

At my last job, I had introduced Spring to the company, and one of the main selling points was that it doesn't need a container. What we had was we had this huge background processing job that would run on the cloud. Most of the code executed in this background job. There was some of this code that was shared with the front end. Before I joined, they had started implementing everything as EJBs. To run the background job, they deployed jboss on all the machines in the cloud, and would bring them up to execute the background job. Jboss was basically a glorified main method that could call EJBs

So, when we started switching over to Spring we could have the same services run on tomcat/simple java application/Hadoop, blah blah. By going with EJBs you are kind of tying yourself to an app server... Which might be perfectly fine if you are completely in an SOA mindset. If you are thinking of doing something different, spring gives you more flexibility.
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jayesh,

Web server comes into picture only when it is a web application.

Mine is desktop application, which used EJB and the application server JBOSS.

I wanted to show that the above same application, which is a desktop application was developed in Spring IOC and Spring AOP, instead of EJB and did not use EJB at all.

So, I need to prove the same, that my application used Spring IOC and Spring AOP instead of EJB?

How should I do this.?

Does Spring IOC and Spring AOP desktop application need an application server?


Regards,
-Pankaj.



 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, Spring does not need application server. You can use it for any kind of application.
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks a Lot for reply

but then how to handle transactions without the use of Application Server?

How can I prove the use of Spring IOC, Spring AOP and Spring JDBC?

When can I use Spring AOP for logging instead of other logging frameworks?

How can I prove the use of Spring instead of EJB?

Please help me for the same.

Regards,
-Pankaj.



 
Jayesh A Lalwani
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make a Proof Of Concept. Take one use case that is independent of other use cases and implement it in spring.

Spring can do transaction management and logging
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic