Announcement Announcement Module
Collapse
No announcement yet.
Help with using EJB and Spring's EJB implementation classes Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with using EJB and Spring's EJB implementation classes

    Hi,

    I read the documentation, the reference manual and the Javadocs, however, I am still having difficulty getting started with using Spring and its convenience EJB Implementation classes. I would like to create a stateless session bean and delegate to a POJO class (as described in 15.2) in the reference manual. I have created the classes; the interface, the POJO Impl, and the EJBImpl which extends AbstractStatelessSessionBean. Now how do I go about writing the correct spring.xml file to load and use my EJBImpl? Can someone provide a detailed example? Also, how do I deploy this stuff in an EJB container? I am using Sun's Java Application Server 8 (with J2EE 1.4) to try this out.

    Any help is appreciated.

    Thanks

  • #2
    First you should go through already answerd topics.

    Here are just a couple (that I know they are dealing with such stuff):
    - http://forum.springframework.org/showthread.php?t=11185
    - http://forum.springframework.org/showthread.php?t=11137

    All this brings me back to this (my) quote:
    But since you are looking for such 'global J2EE example' - how experienced with EJB are you (no offence meant)? Do you really need them - won't Spring be enough - with his great transaction and DAO coverage, well integrated AOP, scheduling, ...?
    Rgds, Ales
    Last edited by robyn; May 14th, 2006, 01:01 PM.

    Comment


    • #3
      Would appreciate an answer to question if possible

      Hi,

      I have been through a large number of the posts on the forum regarding this topic - there was one that was almost helpful w.r.t. describing how the spring.xml would look for another type of EJB (remote I think). Anyway, my question isn't whether or not I think I should use EJB or POJO's [personally, I would like to avoid using EJB]. However, I am required to learn more about how I can use Spring and EJB together.

      A lot of the documentation that comes with Spring is pretty good - Chapter 15 is a little too sparse, and the samples that come with Spring don't seem to have any examples of using EJB. I am not going to buy Rod's book and read chapter 11 (as suggested in the Javadocs) just to get some more info on this one topic either so please don't suggest I do so - I use many other features of Spring just fine by reading the Ref. manual, javadocs, and sample code.

      Also, the topics suggested below (and the quote) are not helpful at all as I am not looking for architectural opinions - rather, I am looking for a concrete usage example, instructions, or both.

      thanks.

      Comment


      • #4
        http://cvs.sourceforge.net/viewcvs.p.../apps/ejbtest/

        Maybe this?

        Rgds, Ales

        Comment


        • #5
          Thanks for posting the link to ejbtest!

          Comment


          • #6
            Originally posted by alesj
            http://cvs.sourceforge.net/viewcvs.py/springframework/spring/autobuilds/apps/ejbtest/

            Maybe this?

            Rgds, Ales
            I don't remember if Spring has a FAQ location, but this is the kind of thing that would make sense having in there.

            For example:
            "Is there an example that uses EJBs? No, but until there is, the ejbtest located at xxxxx implements an approach." My two cents.

            Comment


            • #7
              Really the solution is to bring out ejbtest or something like it as a sample. I keep wanting to do it but never have time. The original reason for ejbtest was to do integration style testing of some ejb related aspects that culdn't be tested in unit tests, but as a secondary role of a sample it's also pretty useful....

              Will get to it eventually...

              Comment

              Working...
              X