aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Can you provide answers for some mock questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Can you provide answers for some mock questions" Watch "Can you provide answers for some mock questions" New topic
Author

Can you provide answers for some mock questions

hashmukh punamia
Greenhorn

Joined: Aug 14, 2007
Posts: 22
hi Ranchers,
Can you provide answers for the below mock questions with explanation.

1)Which Statement about the entity manager is true?

A) A container managed entity manager must be a JTA entity manager.
B) An entity manager injected session beans can use either JTA or resource local transaction control
C) An entity manager created by calling the EntityManagerFactory.createEntityManager method always uses JTA transaction control
D) An entity manager obtained thro resource injection in stateful session beans can use resource local Entity transaction for transaction control

my Answer: A

2)Which java persistence query uses the aggregate function correctly, assuming that the chairs field is of type int?
my Answer: B

3)Bean A is using bean managed transaction demarcation and has invoked the too method of the bean B. when the too method retuns, bean A needs to determine if the transaction has been set to rollback. Which must be true?
A) It is not possible for Bean A to determine if the transaction has been set to rollback
B) Bean A must invoke the getStatus method on UserTransaction that it begins
C)For this Bean b must also use bean managed transaction demarcation
D) Bean A must invoke the setRollbackOnly method on UserTransaction that it begins
E) Bean A must invoke the getRollbackOnly method on UserTransaction that it begins

my Answer: D

4)A developer wants to create a java persistence query that return the valid US phone number(formatted as "123-456-7890" or "800-RUN-EJB3") from the collection of differently formatted international phone numbers.The developer needs only those number which begin with 303. Which where clause is correct.


my Answer: B

5)A Reaser entity has one-to-many , bidir relnship wih a book entity.Two reader entity are persisted , each having two book entitied assiciated with them. For ex r1 has book a and book b. r2 has book c and book d.
Which query returns a collection of fewer than 4 elements?


my Answer: C

Thanks & regards,
Hashmukh
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Please quote your sources.


[My Blog]
All roads lead to JavaRanch
krishna bulusu
Ranch Hand

Joined: Aug 28, 2006
Posts: 185
Hi,
My Answers are as follows:
1)A
2)B
3)B
4)B
5)C


Thanks&Regards, Krishna.
SCJP1.4, SCWCD1.4, SCBCD 5.0
hashmukh punamia
Greenhorn

Joined: Aug 14, 2007
Posts: 22
Hi Chris,

I got the questions from Interactive testing Engine provided by unicert.
I am extremely sorry if this was not allowed to be posted.

Thanks & Regards,
Hashmukh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can you provide answers for some mock questions
 
Similar Threads
application managed EntityManagers
Difference between UserTransaction and EntityTransaction?
getTransaction() on transaction-scoped persistence context.
Question about bean-managed transactions
Passed SCBCD 5.0 :)