• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB CookBook... for beginners?

 
Tom Rodrigues
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi... I'm relatively new to Java, but am very interested in learning more about EJB. Would you consider this a good 'starter' book to get a better understanding and closer look at Enterprise Java Beans?
Cheers!
~Tom
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about being a good "first book" on EJB, but Ed Roman's stuff is all posted on his web sites for free, which is a good reason to at least look. Google on his name, maybe try TheServerSide.com. There are a couple editions of "Mastering EJB" and maybe some other of his things out there. I had Ed himself for a class, and thought he did a good job of coaxing a bunch of newbies into EJB.
 
Benjamin Sullins
Author
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tom,
This book is somewhat unique. We tried very hard to present as many topics of EJBs into single recipes. However, what we did not do was show the very basics of EJB development. For example, "how to construct a session bean" is not one of our recipes. On the other hand, our recipes are very focused to tasks that are encountered when using EJBs. So during development, if you need to know how to change your transaction level (simple) or send a JMS message, etc, you can immediately find your answer.
Each recipe references any other related recipes, and the index is quite thorough. While i don't think the EJB cookbook will teach you from step A to step Z about EJBs, I feel its an essential resource. Plus you will find a lot of unique problems in it that you may not find in a teaching book.
To round out the book, we showed how to use XDoclet, Ant, and Cactus to improve EJB development.
thanks,
Ben Sullins
 
Dave Woods
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm also both new to Java and interested in EJB. Considering the chapter on Beans only comes up near the end of my university text book, I would assume you would need a fair bit of experience in Java programming before getting onto beans, let alone Enterprise beans (which are somehow different, I take it). But it would seem that, to make a bean is no different to making a java class, except that you stick to a few simple rules (get & set etc.) - right? I figure one of the toughest jobs of Java programmers in future will be to know what beans are out there so one can make use of them instead of re-inventing the wheel; surely class libraries are not going to be adequate - there must be a kind of Internet search engine for beans which means people will have to document them properly (tch! metadata again!) if they want to share their beans.
Enough said. My question is: how different are Enterprise JBs from ordinary JBs?
 
David L Gilbert
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBs are very different from regular JBs. Regular JBs have the default constructor and getters and setters - EJBs are remote objects that behave differently based on how they are configured. EJBs live in an EJB container that provides a lot of functionality. EJBs can be thought of as components by themselves - they provide a service or represent an entity and are comprised of multiple classes/interfaces working together as a single entity. EJBs can be stateful (they hold data between method calls) or stateless (no data stored after the method executes) or they can represent a data entity. Database interaction can be managed by the EJB container or by an EJB class itself. As you can see, EJBs live in a diferent world from regular JBs. I recommend Ed Roman's Mastering EJBs as a great starting place for learning the basics and more.
 
Jon Poole
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to step in and ask something that my be a little off base. Isn't an EJB something like the Java version of a C++ Corba object?
 
Mark Whipple
Author
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could build and 'EJB-like' model in Corba, but it would require a lot of work.
EJBs are more than remote object invocations where Corba is primarily exposing and API remotely. EJBs also have inherent patterns that must be followed (such as stateless or stateful session beans, and entity beans).
Corba is intended to provide language independant integration via marshalling mechanisms, where EJBs are a Java solution. You can provide external marshalling with an EJB solution (such as JSPs over HTTP).
They each have some similarities such as security, but the implementation is different.
If you speculate on the intent, the purpose of EJBs is to present a mechanism for building business logic in a container neutral fashion. The business logic is developed using certain patterns. This logic can be applied easily and integrated with other business logic built using the same mechanism.
The intent of Corba is a bit different. It is to expose business in a language neutral fashion, but does not necessarily define patterns for deploying or building the business logic.
 
Jon Poole
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the explanation Mark. The more I learn about Java the better I like it!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!