wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes mock questions (more...) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "mock questions (more...)" Watch "mock questions (more...)" New topic
Author

mock questions (more...)

Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
Q. What message-bean deployment configuration is the message-bean container required to support?
A. a single MDB associated with two different JMS queues
B. a single MDB associated with a JMS durable subscription
C. two MDBs in different applications associated with same JMS queue
D. two different MDBs in same application associated with the same JMS queue.


Q. For a session bean that implements SessionSynchronization, which methods are called with an unspecified txn context? (Choose three)
A. constructor
B. afterBegin
C. afterCompletion
D. beforeCompletion

I believe only two options - A and C are correct.


Q. Given these methods: setSessionContext, ejbCreate, ejbRemove, afterBegin
Which operations are allowed in ALL of these methods, given a SFSB with CMT? (Choose two)

A. Access to an enterprise bean
B. JNDI access to environment entries
C. a call to context.getEJBHome()
D. a call to context.isCallerInRole()
Rahul Mishra
Ranch Hand

Joined: Jan 22, 2006
Posts: 211
Q. What message-bean deployment configuration is the message-bean container required to support?
A. a single MDB associated with two different JMS queues
B. a single MDB associated with a JMS durable subscription Yes
C. two MDBs in different applications associated with same JMS queue
JMS says in such a scenario behavior is undefined
D. two different MDBs in same application associated with the same JMS queue.
JMS says in such a scenario behavior is undefined


Q. For a session bean that implements SessionSynchronization, which methods are called with an unspecified txn context? (Choose three)
A. constructor Yes
B. afterBegin No
C. afterCompletion Yes
D. beforeCompletion No

I believe only two options - A and C are correct.


Q. Given these methods: setSessionContext, ejbCreate, ejbRemove, afterBegin
Which operations are allowed in ALL of these methods, given a SFSB with CMT? (Choose two)

A. Access to an enterprise bean
B. JNDI access to environment entries Yes
C. a call to context.getEJBHome() Yes
D. a call to context.isCallerInRole()


OCMJEA/SCEA, SCDJWS, SCBCD 1.3, SCJP 1.4
My SCEA experience:http://javalogue.blogspot.com/
Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
Hi Rahul,

For the Q1, can you please give me the reference where I can see such JMS scenarios defined? I thought the option A should also be valid.

Also, for the Q3, can the bean access only the JNDI env entries OR it can access other things through JNDI env like
context.lookup("java:comp/env/jdbc/orders")
Rahul Mishra
Ranch Hand

Joined: Jan 22, 2006
Posts: 211
i dont think you will find it in EJB Specs..but look at HFEJB..

The authors..say something like "But please dont ask us..what happens if you put two Beans on a Queue...please dont..ok if you insist we will tell you..the answer is we dont know..because JMS doesnt"..

The answer to the second Question is only the basic JNDI Env..See sometimes..when differences become thin..do a best choice approach...that will clearly weed out other choices..
Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
For the scenario when - if you put two Beans on a Queue - it's probably even logical that the behavior might not be guaranteed.

But the option A of Q1 is the scenario when - one MDB is associated with two different JMS queues. Logically I thought this should be possible. What about this option?

I am in office right now and don't have the HFEJB copy to refer to... will check it out once I reach home.
Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
Ok, I checked HFEJB and specs ... the scenario - multiple MDBs associating with single JMS destination - is described, the behavior is not guaranteed.

But the other scenario - one MDB associating with two different JMS queues is not defined. Now, logically thinking it looks this should be possible:
- Message in each JMS quuee is going to be consumed by only one MDB type
- For each bean deployment there can be many instances of the bean in the pool, so the many instances should be able to get message from two differrent JMS queues.

Can someone please comment on this?
 
Don't get me started about those stupid light bulbs.
 
subject: mock questions (more...)
 
Similar Threads
Test 484 ... LONG POST
message driven beans
Answers of Sun's Free Proficiency Assessment
Why CMT SFSB ejbCreate can access other bean ?
287 Pre-assessment test questions - Please answer