• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mock questions (more...)

 
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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()
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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()
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic