Want to pass your Java Enterprise Edition 5 Business Component Developer Certified Professional 1Z0-860 exam in the very first attempt? Try Pass2lead! It is equally effective for both starters and IT professionals.
VCE
Given :
I. public class MyExceplion extends Exception {}
The remote business interface Foo declares a method workQ:
5. public void work0 throws MyException;
The bean class FooBean contains the following:
10.©Stateless
II. @Remote(Foo.class)
12.
public class FooBean {
13.
public void workQ throws MyException {
14.
throw new MyException0;
15.}
Which exception can be received in the client as a result of invoking the work method?
A. a MyException
B. ajavax.ejb.ConcurrentAccessException
C. a javax. ejb. EJBException that wraps an instance of MyException as the rootcause
D. aJava.rmi. RemoteExceptionthatwraps an instance ofMyExceptionas the root cause
A session bean's business method throws an exception during execution. Which two are responsibilities of the Bean Provider when throwing the exception? (Choose two.)
A. For application exceptions, ensure that if the current transaction commits there will be no loss of data integrity.
B. For application exceptions, ensurethatthe current transaction will commit.
C. For system errors, when the client is remote, throw a java.rmi.RemoteException that wraps the original exception.
D. For checked exceptions from which the bean cannot recover, throw an EJBException that wraps the original exception.
A developer creates a stateful session bean that is used by many concurrent clients. The clients are written by other development teams and it is assumed that these clients might not remove the bean when ending their session. The number of concurrent sessions will be greater than the defined bean cache size. The developer must consider that the state of the session bean can be influenced by either passivation or timeout. Which three actions should the developer take to make the bean behave correctly in passivation and timeout situations? (Choose three.)
A. Release references to resources ina@Removeannotated method.
B. Re-establish references to resources in an @lnit annotated method.
C. Release references to resources ina@PreDestroy annotated method.
D. Release references to resources in a @PrePassivate annotated method.
E. Re-establish referencestoresources ina (©PostActivate annotatedmethod.