David O'Brien

+ Follow
since Mar 08, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David O'Brien

(as I was syaing before I accidently presses the Reply button)
- if the container rollbacks back a transaction it started
(Required and RequiresNew) it throws RemoteException
OK so TransactionRolledbackException is a subclass of
RemoteException so (polymorphically) in both cases a
'RemoteException' is returned but there is extra detail in
the TransactionRolledbackException.
Basically I don'u understand the question but perhaps it's not me
I wonder if the question is referring to the discusion
in 18.3.1 of the spec where the exception thrown depends
on whether the transaction was started by the client or
the container
- if the client started the transaction (Required, Mandatory, Supports)
the container marks the client's transaction as rolled back
and throws the TransactionRolledback exception
as I understand it the spec says the container must
throw a FinderException if a single object finder
returns multiple objects ( or if a single
object select return multiple objects (
I tested this point on the Sun 1.4 RI and omitting
the CreateException on ejbCreate gives a deploy error
to that effect. HoweverI'm not downloading 1.3 just
to confirm.
I guess the point is to regard the Spec as the definitive
statement even if it seems odd or contradicts other sources.
It would be pleasing to have this paticular discrepancy
between the spec and the Head First EJB text confirmed.
Ordinarily there seems little point in raising a simple
typo where there is no risk of misunderstanding e.g on p304
the call to ejbSelectGetAllMovies has no argument but the
corresponding EJB QL uses a parameter.
However compilers of mock, and perhaps real, exam questions
seem, for some reason, to be very keen on the exceptions raised
by methods and their optionality e.g p290 Q10, p363 Q5, Q6
Hi fellow nitpickers. Agreed it's pretty trival and,
honestly, I've searched this forum and the errata but..
-the EJB 2.0 Spec (Final Release Aug 14 2001) states
in section 10.6.4 ejbCreate<METHOD> methods (for CMP that)
'The throws clause *must* define the javax.ejb.CreateException.'
- Head First EJB (Oct 2003 First Ed) says on p333 Rules for ejbCreate
'You *may* declare a throws clause with CreateException'
The code examples on pp316,318,331,335 have no such exception.
Presumably the Spec is the definitive answer but is one really
expected to know such details for the exam? Frightening.