This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB's are easy to build....are they? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB Watch "EJB New topic
Author

EJB's are easy to build....are they?

viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
Kathy,
I just wonder how far the above said statement is true? Dont you think we need to learn and memorize all of the following technologies:
J2SE 1.3
JNDI 1.2
JTA 1.01
JDBC 2.0
JMS 1.02
JAVAMAIL 1.1
And how many people have written Enterprise Beans that scaled to multiple containers??


Vishy
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

EJB are easy to write because you concentrate on writing business logic but assembling, deploying and writing vendor specific DD is a painful process, I feel.


Groovy
Brian Nice
Ranch Hand

Joined: Nov 02, 2000
Posts: 195
You don't really need to be an expert in all of those. Of course J2SE you need to know, but as far as Java Mail, JTA, and some of the others listed you can learn as you need to. For things like JNDI, just understanding the basic principles of doing is lookup is enough, and there are plenty of code samples in books and on the internet to help with that.
Brian
viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
not expert but atleast should be thorough enough about the said technologies. right?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

not expert but atleast should be thorough enough about the said technologies. right?

You cannot except someone who does not java to write EJBs.
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8879
    
    5
Hi Viswanadh,
Well I guess it's all relative EJB is a REALLY HARD way to write hello world. On the other hand, if I was going to create the website for Victoria's Secret (if Kathy would let me ), I think EJB would make it MUCH easier than most other technologies. Depending on your application I would guess that most of the APIs you mentioned would be used to some degree.


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Originally posted by viswanadh kasinadhuni:
Kathy,
I just wonder how far the above said statement is true? Dont you think we need to learn and memorize all of the following technologies:
J2SE 1.3
JNDI 1.2
JTA 1.01
JDBC 2.0
JMS 1.02
JAVAMAIL 1.1
And how many people have written Enterprise Beans that scaled to multiple containers??

OK, this is another really good question.
The only thing you MUST know, in order to do EJB, is a solid knowledge of the Java language. If you have passed SCJP, you have enough Java knowledge. Actually, *more* than enough, because you do not do threading in EJB, for example. You do not need to know many/most of the APIs in J2SE, other than those you'll be using. You'll do know file IO or AWT/Swing for example. No custom classloading.
As for the others, you do not need to know them unless you are going to be using them. You do not need to know JTA, but you DO need to know the javax.transaction,UserTransaction, which you'll learn as part of learning bean-managed transactions. (But even that, you will most likely NOT use BMT, in which case you wouldn't even use THAT).
You do NOT need to know most of JNDI, other than getting an initial context and navigating / doing lookups. Again, very simple, and only a very small part of JNDI. Your container is required to do the JNDI registration on your behalf, so the only JNDI you really need is what is in the spec, UNLESS you are also doing additional work with your company's naming & directory services. But just because you're doing EJB, does not mean you're responsible for managing/administering a company's naming services.
You do NOT need to know JDBC unless you're doing BMT, which very few people are with EJB 2.0 (if you are working with legacy EJB systems, then yes, you probably WILL need JDBC.) A large part of the POINT of EJB 2.0 was to prevent developers from having to be DBA's or know JDBC, since CMT will nearly always be faster and more efficient than using BMT.
JavaMail you would need only if you happen to be writing an application that uses it. Most won't. I would put that in the category of "just in time learning" -- wait until you need it, which you may never need.
JMS, I agree that you should have *some* familiarity, but other than understanding the purpose and how message-driven beans work, you can probably hold off learning much about JMS until you know for certain that you will need to use it, either because it's already a part of the enterprise system, or because you've identified it as a part of your design (so, if you're a designer or architect, you WILL need to know enough about JMS to know whether you should use it... but you certainly don't need to know much about the APIs.)
So, writing EJB's really *is* pretty easy. BUT... that doesn't mean assembling and deploying an application is easy. Not to mention administering it! In other words, if your job is simply to write business components, then, as others here mentioned, it is fairly straightforward and MUCH easier than if you had to write code for transactions and security and concurrency, etc.
But if your job is to build a complete application, whether from existing components or those you create (or more likely, a combination), you have a lot of choices to make. Still, the best way to make reusable applications in EJB is to use declarative transactions and security, and allow as much customization as possible to happen during DEPLOYMENT rather than during code development.
If you are writing for a clustered environment, the difficulty is *not* in how you write your components. If you have written components to the specification, they should be usable regardless of whether the server is clustered or not. In reality, of course, there are issues... but they are much more vendor-specific / Container-specific issues rather than strictly EJB issues. So I would say...
"Building EJB components is easy"
"Assembling and deploying an application can be a little harder" (sometimes a LOT harder, depending on the complexity of the app)
"Administering a large-scale clustered J2EE server is hard."
and finally...
"Architecting and designing a large-scale J2EE application can be challenging!"
If I were looking for a job, I'd be hoping for business component developer and I would run SCREAMING away from a job that required me to manage the server environment. But often, you don't get a choice. Especially these days.
So, the business component development (in other words, creating the EJB) is by far the easiest part, and requires only a basic level of Java knowledge. Crafting an application requires more sophisticated knowledge, since the application level can affect performance in profound ways... (like, choosing to make separate transactional calls to an entity bean rather than scoping three calls to the same bean in the same transaction, for example) or, using a multi-row finder when a home business method would be far more efficient... and of course transaction scope and security is in the application level as well.
And architecting and/or designing both the application and its deployment can be a Big Decision, not left to junior programmers, even though a fairly inexperienced programmer can write good beans, if they understand how EJB works, so that they know WHAT to put, for example, in each of the lifecycle methods.
cheers,
Kathy
viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
Thanks for an excellent reply kathy. Now the question is "Sun certified Business Componenet Developer"
means nothing but a person who possess the knowledge of just "writing EJB Components"...?
But as you said the reply "Business Component Development is by far the easiest part, and requires
only a basic level of java knowledge", means any SCJP (is by default) a SCBCD, then why take the
SCBCD? just to add a certification?
I am thinking that being an SCBCD you should do all the tasks you mentioned in the reply. Like
(a) Build EJB Components
(b) Assemble and Deploy it
(c) Administer it on a large-scale clustered J2EE Server
and you should be competent enough to
"Architect and design a large-scale J2EE application"
any takes??
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Howdy --
Even though the exam *is* named "Business Component Developer", it does cover these EJB roles:
* Bean Provider (the one who really does create the components... the programmer)
* Application Assembler (the one who assembles various components into an application (possibly creating new components and clients as well) and sets up transactions and security roles for the application
* Deployer (the one who takes the application and deploys it into some actual server in a real company, and does the final security mapping between the security roles defined in the application and *real* people (users and groups) in the company who will map to those roles defined by the assembler.
In reality, most of us will do all three of these things.
But server administration and architecture are not part of this -- that is going too far beyond the scope, and in most large enterprises, the bean provider is *not* the one responsible for server administration.
However, design *is* important, and even though it is not specifically covered in the exam, the assumption is that if you DO understand OO design, AND you have a very strong foundation of how EJB works, you have a better chance of making good design decisions, and often the EJB developer will also be responsible for design. Certainly, and application assembler is often the designer of the application, even if some of the beans were written by others.
Sun considers the role of architect to exist at a very different level, and that in fact architects may not always be Java coders. (Although in some parts of Sun, the architect is the person who is the BEST at creating the components and applications, and can build the most representative prototypes...)
People traditionally complain that there has been too much *code-level* knowledge in the SCEA, the only certification that does NOT require SCJP.
cheers,
Kathy
Kevin Cao
Ranch Hand

Joined: Jun 19, 2002
Posts: 55
Kathy,
Excellent point. Add my 2 cents: In real world, the most problems are not the technology itself, rather how we are going to implement the business logic into something like EJB. So I definitely agree that you DON'T have to be an expert on every field to write ejb.
Back to your book, there is a chapter about pattern and performance in EJB. Is this something like "best practice" or "design pattern" of ejb, and how much it is weighed in the exam?
Thanks,
Kevin Cao
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Howdy Kevin,
Actually, the patterns and performance chapter did *not* make it into the book because the book got too large (it is already 100 pages longer than expected), and because it is the ONLY part of the book that was not part of the exam. So, I was sad to see it go, but we are putting that info on the website instead as kind of a (free, of course) supplement. Mainly just tips, tricks, some best practices, and a summary of how to apply some of the most-common and helpful design patterns.
But NONE of the patterns and performance stuff is on the exam. The *real* final table of contents is the one on our ftp site. The patterns/performance stuff is more like, "OK, given that you now know THIS about how the Container works, doesn't it makes sense that you would choose XYZ when you need to do ABC?" Showing you how the way it works can be applied when you make design and implementation choices. Still, I'm sorry it didn't make it into the book. But they book is already heavy enough to be used as a dangerous weapon
An added bonus! It doubles as a self-defense tool!
cheers,
Kathy
Rishi Singh
Ranch Hand

Joined: Dec 09, 2000
Posts: 321
Hi All,
I think if one has passed SCJP with a thorough know how and not just cramming can very well write and understand EJB's and offcourse a little knowlwdge of patterns would certainly help in getting things easier.
Rishi
viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
kathy,
is there any chance that you give sample chapters of your "Head First Java" for download?
viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
Kathy,
why there is still "preorder this item" on the amazon?
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by viswanadh kasinadhuni:
kathy,
is there any chance that you give sample chapters of your "Head First Java" for download?

Here is the link to O'Reilly site, from which you can download the sample chapters...
http://www.oreilly.com/catalog/hfjava/chapter/index.html


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Originally posted by viswanadh kasinadhuni:
kathy,
is there any chance that you give sample chapters of your "Head First Java" for download?

Did you mean "Head First EJB"? If so, then the O'Reilly won't be any help for sample chapters, though I do like the "How to Talk About Jini, J2EE, and Web Services at a Cocktail Party" piece, also by Kathy and Bert.
I believe there's a link to the FTP section of wickedlysmart.com floating around here - and you can download a couple of sample chapters there.


SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Burk Hufnagel:

Did you mean "Head First EJB"? If so, then the O'Reilly won't be any help for sample chapters, though I do like the "How to Talk About Jini, J2EE, and Web Services at a Cocktail Party" piece, also by Kathy and Bert.
I believe there's a link to the FTP section of wickedlysmart.com floating around here - and you can download a couple of sample chapters there.

I think viswanadh has missed the following thread
http://www.coderanch.com/t/158071/java-EJB-SCBCD/certification/First-Chapter-Sample-Head-First
viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
no,
I am asking for another book by kathy...."Head First Java"
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by viswanadh kasinadhuni:
no,
I am asking for another book by kathy...."Head First Java"

So u got the link I have mentioned about, didn't you? There are two chapters available to download...
viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
you link has been removed by angelfire naing?
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by viswanadh kasinadhuni:
you link has been removed by angelfire naing?

Yeah, they didn't allow me to let others download just the files... It looks like I use their site for the storage, not for site promotion...
But I have put my files into my Yahoo Account... Have you tried it?
viswanadh kasinadhuni
Ranch Hand

Joined: Oct 14, 2003
Posts: 33
thanks naing
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB's are easy to build....are they?