himanshu airon

Greenhorn
+ Follow
since Dec 10, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by himanshu airon

Hope this would answer your questions
JDO Vs EJB
Regards
Himanshu
>But in case of entity i created a row in the Database, now i want to (logoff) relieve the bean. i can not call the remove method in the eneity bean. if don't call then the bean instance for the particular user will be exists in the container.

Remember you are working directly on Entity Bean, It does not manage session for you. The Bean instance which you created by calling create() has created a row in the database. Your bean instance is mapped to this row and hence provide a view to this row.
>How long the instatnce will be exists in the container.
So as soon as it is dereferenced the container has the internal policy to Garbage Collect it or simply remove all data and send it to pool like stateless session bean.
Hi!
Well as per ejb specs 1.0 it was given in deployment descriptors but subsequently this was removed from the specification. Hence from EJB 1.1 onwards it depends upon, how the application server provides this facility. Thus if you want to find out time out than check your application server details e.g. if weblogic than check with BEA website, if websphere check with IBM etc.
Hi Henk
Try ArgoUML, you will find it on the site with same name, and it is a freeware.
Himanshu
Dear Howei
Realization is a semantic relationship between classifiers, wherein one classifier specifies a contract that another classifier guarantees to carry out. Graphically, a realization is rendered as across between a generalization and dependency relationship. Thus a dashed line with closed triangle. Realization is deliberately similar to generalization.It is permissible for one implementation class to realize another, this means that the realizing class must conform to the interface, but need not use inheritance.
Though in a specification model, there is no difference between realization and generalization, it is recommended to use the dashed line instead of solid line.
Himanshu
Hi!
Need some help on resources on part II and III. Please pass them on.
Himanshu
himanshu_airon@yahoo.com
Hi Howie
So when are you going for part II. I also need to go for part II. Have you found some links for info on part II & III. Please pass them on for me.
thankx
Himanshu Airon
himanshu_airon@yahoo.com
Hi!
I have passed part 1 and want your help for part II & III. Please inform me where can I get the relevant info and some links for study material. What was the design strategy for part II.
Himanshu Airon
himanshu_airon@yahoo.com
Thanks Howie
for additional reference in case of question 17 on CMP I miscquoted the question.
17. In CMP Entity Beans, which of the following statements is true?
a. The Entity Bean Class should not define any constructors
b. The Entity Bean class must define a no-argument constructor
obviously ejb does not allow constructors for bean class.
I should have thanked Sridhar earlier for all his labour for compiling all Q's & A's. I would take this opportunity to thank him again for his comments.
Sridhar, logically when ejbRemove() operation is invoked to release the resources container shall call ejbPassivate() but if we see server-side output even after putting a SOP in ejbPassivate() and ejbRemove(). When we call ejbRemove() there is no call to ejbPassivate() on the screen. So I conclude that on calling ejbRemove()
1. In case of Session Beans, bean instance is dereferenced and sources are released as the context object is released as per container internal commands. Bean Instance wait for garbage collection, or go to Method ready pool, as per container policy.
2. In case of Entity Beans, First record from database is deleted, unsetEntityContext() is called, with this container takes the responsibility for releasing of acquired resources, it is internally done by the container. The dereferenced bean Instance is garbage collected or move to instance pool as per container policy.
Check pg 232 & 254 of Mastering EJB by Ed Roman for Server Side output.
Himanshu Airon
himanshu_airon@yahoo.com
Thanks Howie
for additional reference in case of question 17 on CMP I miscquoted the question.
17. In CMP Entity Beans, which of the following statements is true?
a. The Entity Bean Class should not define any constructors
b. The Entity Bean class must define a no-argument constructor
obviously ejb does not allow constructors for bean class.
I should have thanked Sridhar earlier for all his labour for compiling all Q's & A's. I would take this opportunity to thank him again for his comments.
Sridhar, logically when ejbRemove() operation is invoked to release the resources container shall call ejbPassivate() but if we see server-side output even after putting a SOP in ejbPassivate() and ejbRemove(). When we call ejbRemove() there is no call to ejbPassivate() on the screen. So I conclude that on calling ejbRemove()
1. In case of Session Beans, bean instance is dereferenced and sources are released as the context object is released as per container internal commands. Bean Instance wait for garbage collection, or go to Method ready pool, as per container policy.
2. In case of Entity Beans, First record from database is deleted, unsetEntityContext() is called, with this container takes the responsibility for releasing of acquired resources, it is internally done by the container. The dereferenced bean Instance is garbage collected or move to instance pool as per container policy.
Check pg 232 & 254 of Mastering EJB by Ed Roman for Server Side output.
Himanshu Airon
himanshu_airon@yahoo.com
There are some problems with the answers. Please comment
17. In CMP Entity Beans, which of the following statements is true?
a. The Primary Key Class should not define any constructors
b. The primary key class must define a no-argument constructor

You have supplied answer (a)
As per EJB by Richard Monson-Haefel Pg 158 “The no-argument constructor is required for container-managed persistence”. So the answer (b) is correct option.
22. In EJB, What type of exception is thrown when a system error occurs ?
a. EJBException
b. RemoteException
c. Exception
d. BeanException
You have supplied answer (a)
As per EJB by Richard Monson-Haefel Pg 312 “System exception are RuntimeExceptions, RemoteExceptions, and their subtypes. The EJBException is a subclass of the RuntimeException, so it is considered a system exception"
So option (b) is also right. Since Exception class is the base class for all types of exceptions it may also be included in the right options. Please comment.
24. Is ejbPassivate() invoked by the container when ejbRemove() is invoked?
a. True
b. false
No Answer is supplied. It should be (b) because in ejb specification there is no mention of calling ejbPassivation() when ejbRemove() is called. If you see output in Mastering EJB by Ed Roman pg 128 there is no call of ejbPassivation() before ejbRemove().
27. In EJBs, Which two callback methods can be used for synchronizing the bean's state with the database
a. ejbStore() and ejbLoad()
b. ejbActivate() and ejbPassivate()
c. ejbStore() and ejbPasivate()
d. ejbLoad() and ejbActivate()
Answer supplied is (b).
It is essentially we are talking about Entity Bean Where ejbActivate() is used to reinitialize the non persistant fields in bean instance i.e. to remove dirty values not synchronizing with the database. As per EJB by Richard Monson-Haefel Pg 200 and ejb specifications the correct answer should be (a).

:roll: [/LIST] himanshu_airon@yahoo.com
Welcome Subbu
I have read your earlier books on J2EE server side programming. What is additional or different in your new book. When it is coming out? is there a soft copy available for reveiw.
Cheers
Himanshu