Results 1 to 7 of 7

Thread: Help with using EJB and Spring's EJB implementation classes

Hybrid View

  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default

    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 at 12:01 PM.

  3. #3
    Join Date
    Nov 2004
    Posts
    3

    Default 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.

  4. #4
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

  5. #5
    Join Date
    Nov 2004
    Posts
    3

    Default

    Thanks for posting the link to ejbtest!

  6. #6
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default

    Quote 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.

  7. #7
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    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...
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Posting Permissions

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