Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!

Micheal Jacob

Ranch Hand
+ Follow
since Nov 25, 2002
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 Micheal Jacob

Hi,
Thanks for your wishes.

I think, until you assign the T1.setMovie() to some other movie,
T1.getMovie() will return M1.

Micheal.
Hi Sathish,Mikalai,Kengkaj

Thanks for your wishes.

Micheal.
Hello Ranchers,

I cleared SCBCD today with 100%

I would like to thank everyone in this forum who have helped me to get my EJB concepts straight.

My preparation methodology :

On & Off for last 2 months and vigorous for last 2 weeks (3 hrs daily & atleast 8 hours in weekends)

Followed HFEJB. Excellent book. And also did not forget to refer to EJB specification whenever there is a indication/link/page no in HFEJB. (Especially all mock questions after each chapter which contains the page no of supporting page in EJB spec.)

Valentine's cheat sheet was also very helpful in remembering the "bean things".

Last but not least, this forum always rocks!!!

Micheal
46. What is true about entity bean's primary type ?

a. Primary key fields must be cmp-fields.
b. setter methods for fields associated with a primary key must not be exposed through a client view
c. if two entity objects have the same home and same primary key, they are considered identical
d. the getPrimaryKey() method can be invoked on references to only remote home interfaces, not local home interfaces.

Ans : b, c

Why option a is not correct ?
My understanding is, even it is a compound key, the primary key's should be among cmp fields.

Any suggestion is appreciated.

Micheal.
Hi,

Is CMR field not persistent ?
or
Can we consider CMR field also as CMP field ?

Coffee Cram mock exam
---------------------

55. When creating an entity bean using container managed persistence, which can be accessed through the bean's remote component interface ?

A. Accessor methods for the relationship fields
b. The local interface of the entity bean
c. The bean's business methods
d. The collection classes used for container managed relationships
e. Accessor methods for the persistent fields.

Ans. C & E.


If CMR is also a CMP, then option e should not be correct ?

Any suggestions, pls ?

Micheal.
Hi,

PK cannot be primitive type.
Anyway you can use wrapper classes.

Micheal.
Hi,

To make a relationship, we need entity beans with local relationship.
So you cannot pass local interface to clients through remote interface. (i.e) remote clients cannot get local component interface

So CMR field should not be exposed to client in remote component interface.
Hope it helps.

Micheal.
Hi,

I think, ejbHome methods CAN be used to return component interface.
But practically, bean provider may not use this method to return component interface. (Because he could very well define find method, which means less source code)

Regarding returning component interface, ejbHome method can return component interface, but until any method gets called in that EJBObject, container may not assign any entity object.

But still the bean which is used to execute ejbHome method is in pooled state. (i.e.) not attached to any entity.

Any help is much appreciated, to clear this out.

Micheal.
Hi Sagar,

Excellent.
Nice shot.

Micheal
Hi,

ejbSelect can return a remote/local component interface.
So why can't we call ejbSelect inside ejbHome method and return the same thing.

Micheal
Above para from Spec applicable for stateful bean also....

Micheal.
Hi,

EJB Spec. 91

"Accessing resource managers and enterprise beans are not allowed in the session bean methods for which the container does not have a meaningful transaction context or client security context."

In stateless session beans, Bean provider doesn't have any control on ejbCreate method. (i.e) Independent of client.

Micheal.
Ya, as you all say, i too think "int" is the trick here...

Anyway, thanks arun, sagar.

Micheal
Hi Sagar,

Return type should be void for session bean, but for entity bean, it should be PK.

And my question was related to entity bean.

Micheal.