Results 1 to 10 of 14

Thread: Spring and JBoss

Hybrid View

  1. #1

    Default Spring and JBoss

    Hi, I've been doing some research on application servers (specifically JBoss since I have used it in the past) and I'm wondering why I would want to use the overhead of a heavyweight application server, such as JBoss, when I can simply use a lightweight container like spring and use tomcat for my JSPs. It seems like (in one way or another) Spring offers the major features of an app server, such as transactions and database layers.

    Is there a reason for a large scale application, such as a banking application, I would use an app server instead? Thanks.

    Jeff

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Spring offers a lot but it doesn´t replace an application server, it works very well with it. Especially if you are in the realm of distributed transactions (JTA), container managed DataSources etc. If you don't have need for all that stuff you might be satisfied by Tomcat (I used it for a few products and it works great).

    Also most application servers provide an implementation of the full J2EE specifications, whereas tomcat 'only' implements the Servlet and Jsp specifications.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jul 2005
    Location
    Geneva (Switzerland)
    Posts
    304

    Default

    Clustering and a good management console is also a place where Tomcat doesnt do as well as other big players ...

  4. #4

    Default

    Thanks for the responses! I have a couple of follow-up questions to that:

    In terms of container managed data sources, doesn't Spring have support for that (at least for configuring a database and connecting to it via Hibernate)?

    Also, is it common to use an app server such as JBoss AND Spring so you have the ability to configure your POJOs in XML, rather than using EJB3 and annotations? Or even using a combination of spring beans and EJBs (maybe using entity beans and JBoss data source management)?

    Thanks again,
    Jeff

  5. #5
    Join Date
    Jul 2005
    Location
    Geneva (Switzerland)
    Posts
    304

    Default

    It is very common to use Spring and jboss. In my last project, it was Spring and WebLogic. Personally, I am not a big fan of EJB, so I tend to use Spring with Hibernate and annotations (or iBatis). But I would still use the container to manage the database connections pool.

    It is of course possible to use Spring and EJB, or Spring and "almost any imaginable persistence layer".

  6. #6

    Default

    Thanks again. I only keep referencing JBoss since that's really the only app server I have used before (aside from Tomcat). In terms of using WebLogic, does WebLogic have the concept of an entity bean? If so, is it just a POJO (that can be constructed in Spring and then configured to be an entity through some WebLogic config files) or does it work some other way? Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •