Win a copy of Java Challengers this week in the Java in General forum!

Rajesh Chande

Greenhorn
+ Follow
since Jun 28, 2006
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 Rajesh Chande

Hello Guys,

- I started off with this forum and ended with javaranch forum. try to answer questions once you complete a topic. Helps a lot to know your strong and weak points.
- I started studying from HFEJB, but being honest the SPECS are the thing.. initially I found the language a bit tough, but I went through the specs almost each page many many times. On the final day, Specs started talking to me... , In short specs has almost everything, many questions are direct HITS from specs. so just read the specs by heart.
- HFEJB can be referred for topics, that you find difficult to understand from specs.
- Exams: I gave mocks of exam links from SCBCD forum, Whizlabs.

In short, if you can digest the 500 pages of Specs, 90+ will be a breeze, believe me.

Regards,
Rajesh.
14 years ago
Display name changed..

;-)
14 years ago
Hello All,

I have cleared scbcd with 91%.

Thanks to all.
14 years ago
So I can say that option B would have been correct in case of a Entity Bean with BMP.

right?
Which of the following methods must be implemented by an entity bean class with Container managed persistence?

Select 1 correct option.
A. At least one ejbCreate(...)
B. ejbFindByPrimaryKey(...)
C. At least one ejbSelect(...)
D. At least one ejbFindByXXX(...) (other than ejbFindByPrimaryey(...))
E. None of these.

I selected the option B. The spec also says the same thing on page 271. = "Every entity bean must define the ejbFindByPrimaryKey method."

The test exam says the correct option is E.

Any takers?
I have taken the following from the specification as-is:

- If two entity objects have the same home AND the same primary key, they are considered identical.
- A client can test whether two entity object references refer to the same entity object by using the isIdentical method. Alternatively, if a client obtains two entity object references from the same home, it can determine if they refer to the same entity by comparing their primary keys using the equals method.
-The result of comparing two object references using the Java programming language Object.equals(Object obj) method is unspecified. Therefore, a client should always use the isIdentical method to determine if two entity object references refer to the same entity object.

now considering all the above since the question says - select only 1 option, "c" would be my BEST bet, and if given to select 2nd option, that would be "a".

What say?
Hello Ashley,

I would go for "c".

By the way, it would be good to write your opinion along with and also mention your doubt at the first go... no?

Regards,
Tiro.
I am confused here..

At one place in the specification it says...
Pg: 385 section 19.1
==============
The EJB specification further constrains the Java RMI types that can be used by enterprise beans to be legal RMI-IIOP types [7]. This makes it possible for EJB Container implementors to use RMI-IIOP as the object distribution protocol.
==============

and at other place we have the above Note:
==============
Note: Programs using the cast operator for narrowing the remote and remote home interfaces are likely to fail if the Container implementation uses RMI-IIOP as the underlying communication transport.
==============

Is it not contradicting?
Hello,

After rethinking on it, I change my opinion to "d" and "e".

it was a good one... ;-)

Regards,
Tiro.
Hello Ashley,

I would normally opt for "a" and "c" on the following basis:

req. New supports
client ------> a.mA -------> b.mb
T1 T1
Sys Ex.

so - T1 marked for rollback.
- Client will get javax.ejb.TransactionRolledbackLocalException

Anybody.. correcting me?
I think Ameiya is trying to get the understanding for the following statement from specification Refer the "Note":

===========================

A client program that is intended to be interoperable with all compliant EJB Container implementations
must use the javax.rmi.PortableRemoteObject.narrow(...) method to perform
type-narrowing of the client-side representations of the remote home and remote interfaces.
Note: Programs using the cast operator for narrowing the remote and remote home interfaces are likely
to fail if the Container implementation uses RMI-IIOP as the underlying communication transport.

===========================

What does the Note imply?

Ameiya correct me, if I am wrong.
Hello Seema,

If I am already done with other certifications like, scjp, scwcd, scbcd and scea. Does it make any sense for me to take this exam?

Will it help me in any ways?

Regards,
Tiro
14 years ago
I just take this from the specs as is:

Pg: 364/572: section 17.6.5
The EJB specification does not prescribe how the Container should manage the execution of a method with an unspecified transaction context´┐Żthe transaction semantics are left to the Container implementation.

Regards,
Tiro.
Hello Vidya,

In case of stateful session beans there is no such thing as "pool", atleast this is whats clear from the lifecycle diagram of a stateful session bean. But yes in case of a stateless session bean, there is a "pool" of instances maintained.

And so, we can conclude that once a remove() is invoked on a steteful session bean, the bean instance goes to "does not exist" state.

Regards,
Tiro.
Hello Tejas,

May be teh specs are too boring to read all the 572 pages.. and HFEJB is written in some jazzy way.

Ideally what I would think specs are the source of everything, so should be referred couple of times atleast to get to the heart of a concept.

btw, HFEJB is also @ more than atleast 400+ pages, right?

Regards,
Tiro.