java beans are completely different from EJB's. Java Beans are classes having get and set methods and are reusable software components. Also, one cannot deploy a java bean, rather they are development components and so java beans do not live in runtime environment and since they are just java classes we dont need an application server to instantiate, destroy and provide Middleware services to them. All the things said above which cannot be done by java beans are done by EJB - server side components. Check Mastering EJB - ED. Roman.
Even I wonder why they were called as EJBs. A lot of people use JavaBeans in their enterprise applications. for examples, in JSPs etc.. To separate from the regular Javabeans, I would have called them as Enterprise Java Potatos or Carrots or something like that.. I like Richard's defn. "Enterprise JavaBeans is a standard server-side component model for component transaction monitors." What it means is that EJB is a standard to develop server-side java components running in a separate environment offering the foll. benefits of security, resource-pooling, persistence, concurrency and transactional integrity..... I assume you know about "javabeans".
Originally posted by Vish Kumar: Even I wonder why they were called as EJBs. A lot of people use JavaBeans in their enterprise applications. for examples, in JSPs etc.. To separate from the regular Javabeans, I would have called them as Enterprise Java Potatos or Carrots or something like that..
Yeah, Vish... You got a really good sense of humor... I agree that it should be some kinda Enterprise Java Potatos or Carrots or maybe peanuts...
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
I think Viswanadh gave a good description, so I'll just add a couple more thoughts... The whole "javabeans" name is kind of funny -- we think the marketing people at Sun just loved the name... but it has caused a lot of confusion, especially when EJB was first introduced. I used to hear people say, "Javabeans are for the client, Enterprise Javabeans are for the server". That's not necessarily true, because although EJB is *definitely* for the server, as some of you pointed out, plain old non-enterprise javabeans could be used on the server as well, although they are most often used as GUI components. The reason that BOTH types of *things* are called javabeans, is because 'javabean' means "a reusable component". And that's where the similarity ends -- both javabeans and EJB are 'reusable component' models, but javabeans are all about DEVELOPMENT / APPLICATION ASSEMBLY time, and at runtime are simply plain old Java classes (but with an enforced naming convention), while EJB doesn't care how you develop, and the callbacks are used at RUNTIME. cheers, Kathy
Cowgirl and Author
posted 16 years ago
Howdy Hanna, Hmmmm... you asked about the best book to get you started on EJB, well, I think I'm going to have to recommend, um, MINE (We're in the middle of book promotion week for the book, so I'm taking full advantage of it). Actually, it depends on your goal. If you really are JUST getting started, then we believe our book (Head First EJB) will be a MUCH friendlier, easier way to *really* learn and understand the core concepts, deeply. And if you're planning on possibly taking the exam, our book is also an exam study guide for SCBCD. However, if you already have some knowledge and are developing EJBs, I would recommend using both the spec, and getting the Richard Monson-Haefel book (also from O'Reilly) rather than ours. His book covers more advanced topics -- but I don't recommend it as the first book to start with if you're just beginning and planning to take the exam. There are many good EJB books out there, which is surprising, since some other topics don't have many good books. But you really won't find one that will help you understand the difficult topics in the shortest period of time (and with the least amount of pain). We believe that your life is stressful enough and that learning a new tough technical topic shouldn't be one more painful thing to do! We guarantee that you'll at least *enjoy* yourself more than with any other EJB book. But before you get our book, you should look at the Head First Java book, or the samples that have been posted, and see if the style works for you. Many people love it, but a few people *really* hate it. If you like to just read text, then our book won't be a good choice. Glad you asked! cheers, Kathy
hi kathy i m not convinced with this "resuablility of EJB". Well kathy i believe itz always your coding that can make EJB as reusable component otherwise they dont have this characteristic with them. Ofcourse they can be reusable from concept of shifting them from one verdor specific container to another vendor specific container.
Originally posted by Kathy Sierra:
The reason that BOTH types of *things* are called javabeans, is because 'javabean' means "a reusable component". And that's where the similarity ends -- both javabeans and EJB are 'reusable component' models, cheers, Kathy
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
Devious Experiments for a Truly Passive Greenhouse!