Announcement Announcement Module
No announcement yet.
Integrating Spring DAO/ORM with J2EE (WebLogic/SLSB) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Integrating Spring DAO/ORM with J2EE (WebLogic/SLSB)

    Moving this thread from Architecture to here to see if I can get a response.

    I would really like to utilize the robust functionality of the Spring framework inregards to the DAO and ORM modules. My application is pretty simple in respects to a Struts front-end posting to Actions that contact SLSB (Session Facade) that manages transactions and calls DAOs that utilize JDBC to query the database. If I wanted to utilize the DAO and ORM modules in the Data layer are there any other modules I need for Spring to work with J2EE CMT and EJB? Is it fairly simple to use DAO and ORM modules while allowing my SLSB to use CMT for managing transactions?

    Could I also utilize the AOP framework inside my WebLogic 8.1 container with Spring?


    Jay Blanton
    Edit/Delete Message

  • #2
    I don't see any issue with you being able utilize DAO/ORM/AOP in your EJBs. However, I'm wondering: do you need to use EJB? You can use DAO/ORM/CMT/AOP in non-EJB objects without EJB. You only need EJB if you are calling the data layer on a separate server than the web layer. Although usually there isn't much reason to do that.


    • #3
      Thank you very much for your response.

      Unfortunately, inregards to EJB, I work in a shop that is composed of mostly what I call (Java Spec Developers). These are the new COBOL programmers, the kinda developer that laughed at you when you were reading the first editions of Java books because they felt nothing would be better than COBOL development. These Java Spec Developers only code to the spec and never continue their Java education passed the Sams J2EE in 21 Days book, so they frown at better concepts such as Spring or Hibernate or iBatis.

      So I am trying to slowly introduce smarter concepts like the JdbcTemplate class (that has similarities to DBUtils QueryRunner). It only takes coding a few DAO classes to see the repetitive code and need for a Template pattern. So I am trying to ease in the Jdbc Module of Spring...then hopefully AOP or ORM. One step at a time.

      Thanks again for some of your input because most of their questions are going to be based around how to use Spring and continue to let the SessionFacade layer be the wrapper for J2EE transactions and security. That is all we really us it for because our application is not trully distributed in the sense that the SessionFacade is really remote to the code that calls it.



      • #4
        I competely understand. I've been there. And yes, JdbcTemplate is the best place to introduce this. The JDBC abstraction was the first place I introduced Spring.


        • #5
          I have a very similar design to you that the SLSB call the DAO with using JDBCTemplate. However, i need to implement the transaction control in SLSB. However i not able to rollback the database when trigger a transaction rollback. May i know you face similar problem as well?