I work as a Java Developer in a small mnc. I have done SCJP & my project was based on Core-java only . But yesterday I have given a new project on EJB . I dont know anything on EJB and I have just 3 days time to learn it . I have some generalized knowledge on Jsp/servet but no exp on EJB . plz help me with some good links & suggestions ................
how to start? how to end ? I dont know. 3 days only otherwise I
You've only been given 3 days to learn EJB? I'd go to your manager and suggest that is not enough time. If you look at the usual basic EJB courses offered by people like IBM or BEA, they all tend to be 5 days and are just introductions.
Prasanna, 3 days may not enough but still you can work. Just try know why EJB came into picture, what are the types of EJBs, and how you will use EJB. Remaining things you can learn while you work. good luck
ya ,, studying HF as mush as I can , but can anybody here please post me an ebook ? I am not telling about illegal one but which r free ,, if any good ebook, study-material pdf anybody have please send me at once
Be sure you get a good IDE. This can save you hours of banging your head against the wall. Also, with a good IDE, you do not have to know everything about EJBs to get started. Then keep your HF book ready for any questions you might have. You will learn more this way than trying to read a book from cover to cover.
A good IDE means you only have to write the business logic in the session beans and add business and create methods to your entity beans.
Also, try to use CMPs for your entity beans. Using CMP you can pump out 20 beans a day and never look back. Then most of your time will be spent writing business logic to use the entities in the session beans. This will reduce pain.
If you can do that, most of the issues will be in configuring your IDE and the beans.
First write your entity beans. Then front your entity beans with session beans (facade). Keep your beans small and focused to their job. Then write the classes that will use the session beans.
When choosing which type of bean to use, use entities similar to a regular JavaBeans (DAO). CMPs make it as easy as using regular JavaBeans. But CMPs are like JavaBeans on steriods; it persists the data to your data store automatically for you. But as far as usage it is still just setters and getters. Try really hard to use CMP entities if you can before going to BMP.
Session beans are for business logic. For session beans, start out with stateless and only go to statefull if you need the bean to retain data over multiple method calls. Using a stateless session bean is like using a static method in a util class, but again on steriods.
If you build them this way, the only difference you will notice in usage is you have to look up the home interface and call a find or create method on it before you can start using it.
Sun has a tutorial that might help, but it is for their IDE. I think you can get a demo version.