Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: I always wondered about this.

  1. #1

    Default I always wondered about this.

    Lot of us got out of EJB (includes all kinds). Can you guys pitch in on when and why? Please do not quote books, we all know those reasons. Give us some enlightening EJB hell (remember? DLL hell!) experiences.

  2. #2

    Default

    Wow! i thought I would hear many stories by now.

  3. #3
    Join Date
    Apr 2006
    Location
    Montreal, Canada
    Posts
    178

    Default

    Why force yourself to remember painful experiences?

  4. #4
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    I think its the part about not quoting books. Although I'm sure people have their own experiences, I found the arguments laid out in the books covered it pretty well.

    The other thing is I don't remember EJBs being "hell" (I never used entity beans). I just never realized how much time I was wasting with all of the descriptors and API specific classes because I didn't know any better. So Spring didn't save me from hell (especially since I use Spring with stateless EJBs sometimes) just brought me to a cleaner house.
    Bill

  5. #5

    Default

    Quote Originally Posted by wpoitras View Post
    I think its the part about not quoting books. Although I'm sure people have their own experiences, I found the arguments laid out in the books covered it pretty well.
    I think I posed my question wrong, I am more interested in to some kind of banchmark. Thats about it. Books are books are books, How many times have you seen people change their mind just because book says so and never reflect on both of their experiences? I have seen it happen many times.

    The other thing is I don't remember EJBs being "hell" (I never used entity beans). I just never realized how much time I was wasting with all of the descriptors and API specific classes because I didn't know any better. So Spring didn't save me from hell (especially since I use Spring with stateless EJBs sometimes) just brought me to a cleaner house.
    I have seen session beans being hell as well. On a side note, spring was not in subject here. One can write POJO code without using spring. This is more of an architectural question than anything else. Search the board and you will see how many people are misguided when it comes to architecture. People are using technologies where they shouldn't have, Making their code and architecture un-necessarily complex and increasing the cost of project. I don't know, May be I just don't understand. Or May be my foreign background is preventing me from understanding.
    Last edited by tatvamasi; Oct 19th, 2006 at 09:34 AM.

  6. #6

    Default

    Quote Originally Posted by spiff View Post
    Why force yourself to remember painful experiences?
    well don't you want to reflect on your experience both way and figure out which way was the better and why?

  7. #7
    Join Date
    Apr 2006
    Location
    Montreal, Canada
    Posts
    178

    Default

    Well, if you insist

    EJB wasn't entirely hell, once it was up and running. The main difficulties lied in deploying them, maintaining several descriptors and looking them up through JNDI. Of course, this required lots of hair-pulling at first, but then we could just forget about it.

    To me the biggest pain in using EJBs was exception handling wrt transaction management. The fact that the specs required the transaction to be rolled back only on RuntimeExceptions and EJBException, without it being configurable, was a huge constraint. So I've seen lots of session EJB methods simply delegating their work to a "local facade", catching the eventual application exception and setting the context rollback attribute to true. Lots of useless code for something that could've been easily configured, as it is with Spring's transaction annotations and attributes.

    And as with wpoitras, I've never used the old entity beans so I guess I was spared the biggest part of hell you're talking about

  8. #8
    Join Date
    Mar 2006
    Location
    A place to call home
    Posts
    76

    Default

    Quote Originally Posted by spiff View Post
    EJB wasn't entirely hell, once it was up and running.
    The main difficulties lied in deploying them, maintaining several descriptors and looking them up through JNDI. Of course, this required lots of hair-pulling at first, but then we could just forget about it.
    I fully agree. Xdoclet helped a lot though. Especially when we had to refactor stuff...
    We really had no bigger problems with session beans.

    Quote Originally Posted by spiff View Post
    To me the biggest pain in using EJBs was exception handling wrt transaction management. The fact that the specs required the transaction to be rolled back only on RuntimeExceptions and EJBException, without it being configurable, was a huge constraint. So I've seen lots of session EJB methods simply delegating their work to a "local facade", catching the eventual application exception and setting the context rollback attribute to true. Lots of useless code for something that could've been easily configured, as it is with Spring's transaction annotations and attributes.
    Been there, done that, got the T-sh... headache.

    Quote Originally Posted by spiff View Post
    And as with wpoitras, I've never used the old entity beans so I guess I was spared the biggest part of hell you're talking about
    Well, I have and it wasn't an every day walk in the park, trust me!
    If you have simple entities with "simple" relations, Xdoclet and some common sense speeded up the development. The problem is, (2.1) entity beans "have" to be stupid.
    Antoher problem is, of course, performance. You just have to write DAO's for a lot of stuff.
    Inheritance, don't even get me started on that...

    After all this rambling I have to say that EJB3 looks a lot better.
    I've worked (as a consultant) for a big goverment authority and the only framework allowed there is EJB so I really hope, for their sake, that EJB3 is up to the challenge.

  9. #9

    Default

    The biggest pain except deployement and all the necessary plumbing was that you couldn't extend the "aspects" applied on a EJB. For instance, the container manager security was never good enough to me so I had to use all sort of proprietary hacks to make it works.

  10. #10
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Quote Originally Posted by tatvamasi View Post
    I have seen session beans being hell as well. On a side note, spring was not in subject here. One can write POJO code without using spring. This is more of an architectural question than anything else. Search the board and you will see how many people are misguided when it comes to architecture. People are using technologies where they shouldn't have, Making their code and architecture un-necessarily complex and increasing the cost of project. I don't know, May be I just don't understand. Or May be my foreign background is preventing me from understanding.
    The biggest HELL when it comes to EJB that I know of were companies that were doing what you've described. People had used EJB before or heard about it so every project was an EJB product. It was a silver bullet to solve every problem. Instead of a few simple POJOs it was un-necessarily complex for absolutely no gain. This isn't just constrained to EJB as you point out though its still going on now. Every project doesn't need a DTO layer, remoting, ORM etc..... but it does happen.

Posting Permissions

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