Oracle 1Z0-895 guide torrent and study material online courses (Jun 2016)
Oracle Other Oracle Certification 1Z0-895 pack exam questions and answers update freely inside of 120 days. Your Oracle dumps analyze engine software will check along with download the updated Other Oracle Certification review materials immediately for you. Our own professionals renovate the Oracle Other Oracle Certification braindumps usually and upgrade the actual 1Z0-895 pack exam questions and answers instantly any time new questions included with the Other Oracle Certification genuine exam. You will find virtually any Other Oracle Certification practice questions in our demos.

Renew 1Z0-895 Simple Questions Latest Practice Test Questions VCE PDF Dumps
Qustion No. 1
A stateless session bean FooBean implements an asynchronous business method foo() on its bean class:
@Asynchronous
public void foo() ( … )
The asynchronous business method is exposed through a remote business interface FooRemote. A caller acquires an EJB reference to this bean and invokes it as follows:
100. fooRemoteRef.foo();
Which exception can result from the invocation on line 100?
A. java.rmi.RemoteException
B. java.util.concurrent.ExecutionException
C. javax.ejb.EJBException
D. java.lang.IllegalArgumentException
Answer: A
Explanation:
Note:
* RemoteRef represents the handle for a remote object. A RemoteStub uses a remote reference to carry out a remote method invocation to a remote object.
* invoke
public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception Invoke a method. This form of delegating method invocation to the reference allows the reference to take care of setting up the connection to the remote host, marshaling some representation for the method and parameters, then communicating the method invocation to the remote host. This method either returns the result of a method invocation on the remote object which resides on the remote host or throws a RemoteException if the call failed or an application-level exception if the remote invocation throws an exception. Parameters:
Qustion No. 2
A developer examines a list of potential enterprise applications and selects the most appropriate technologies to use for each application.
For which two applications is EJB an appropriate solution? (Choose two.)
A. To render a GUI for mobile clients.
B. As a container for web-tier components including JSP.
C. As a Web service endpoint accessed by non-Java clients.
D. To receive and respond to HTTP Post requests directly from a web browser.
E. As an online shopping cart which can persist across multiple sessions with a single client.
Answer: CE
Qustion No. 3
A developer implements a system in which transfers of goods are monitored. Each transfer needs a unique ID for tracking purposes. The unique ID is generated by an existing system which is also used by other applications. For performance reasons, the transaction that gets the unique ID should be as short as possible. The scenario is implemented in four steps which are implemented in four business methods in a CMT session bean:
These methods are called by the addTransfer method of a second CMT session bean in the following order:
checkGooods, getUniqueId, checkAmount, storeTranfer
Assuming no other transaction-related metadata, which is the correct set of transaction attributes for the methods in the session beans?
A. 0.addTransferREQUIRED
1.checkGoodsREQUIRED
2.getUnigueIdREQUIRES_NEW
3.checkAmountsNOT_SUPPORTED
4.storeTransferMANDATORY
B. 0.addTransferREQUIRED
1.checkGoodsREQUIRED
2.getUnigueIdREQUIRED
3.checkAmountsREQUIRED
4.storeTransferREQUIRED
C. 0.addTransferREQUIRED
1.checkGoodsREQUIRED
2.getUnigueIdREQUIRES_NEW
3.checkAmountsNEVER
4.storeTransferMANDATORY
D. 0.addTransferNOT_SUPPORTED
1.checkGoodsREQUIRED
2.getUnigueIdREQUIRES_NEW
3.checkAmountsNOT_SUPPORTED
4.storeTransferMANDATORY
Answer: A
Explanation:
Step 2: Must start a new transaction. use REQUIRES_NEW
Step 3: No need for this step: use Not Supported
Use the.NotSupported.attribute for methods that don’t need transactions. Because transactions involve overhead, this attribute may improve performance.
Step 4: Use Mandatory:
Use the Mandatory attribute if the enterprise bean’s method must use the transaction of the client.
Note:
* In an enterprise bean with container-managed transaction (CMT) demarcation, the EJB container sets the boundaries of the transactions. You can use container-managed transactions with any type of enterprise bean: session, or message-driven. Container-managed transactions simplify development because the enterprise bean code does not explicitly mark the transaction’s boundaries. The code does not include statements that begin and end the transaction.
* A transaction attribute can have one of the following values:
Required RequiresNew Mandatory NotSupported Supports Never
* Required Attribute If the client is running within a transaction and invokes the enterprise bean’s method, the method executes within the client’s transaction. If the client is not associated with a transaction, the container starts a new transaction before running the method.
The Required attribute is the implicit transaction attribute for all enterprise bean methods running with container-managed transaction demarcation. You typically do not set the Required attribute unless you need to override another transaction attribute. Because transaction attributes are declarative, you can easily change them later.
* RequiresNew Attribute If the client is running within a transaction and invokes the enterprise bean’s method, the container takes the following steps:
Suspends the client’s transaction Starts a new transaction Delegates the call to the method Resumes the client’s transaction after the method completes If the client is not associated with a transaction, the container starts a new transaction before running the method.
You should use the RequiresNew attribute when you want to ensure that the method always runs within a new transaction.
* Mandatory Attribute
If the client is running within a transaction and invokes the enterprise bean’s method, the method executes within the client’s transaction. If the client is not associated with a transaction, the container throws the TransactionRequiredException.
Use the Mandatory attribute if the enterprise bean’s method must use the transaction of the client.
* NotSupported Attribute If the client is running within a transaction and invokes the enterprise bean’s method, the container suspends the client’s transaction before invoking the method. After the method has completed, the container resumes the client’s transaction.
If the client is not associated with a transaction, the container does not start a new transaction before running the method.
Use the NotSupported attribute for methods that don’t need transactions. Because transactions involve overhead, this attribute may improve performance.
Reference: The Java EE 5 Tutorial, Container-Managed Transactions
Qustion No. 4
Given the stateful session bean:
Assuming no other transaction-related metadata, which is true?
A. methodB and methodC have transaction attribute SUPPORTS, which methodD has transaction attribute REQUIRED.
B. methodA and methodC have transaction attribute REQUIRES_NEW, while methodB has transaction attribute SUPPORTS.
C. methodC, methodD, and methodA have transaction attribute REQUIRED, and methodB has transaction attribute SUPPORTS.
D. methodB has transaction attribute SUPPORTS, methodD has transaction attribute REQUIRED, and methodA and methodC have transaction attribute REQUIRES_NEW.
Answer: C
Qustion No. 5
Which two are true about the client view of a message-driven bean? (Choose two.)
A. References to message destinations can be infected.
B. References to message destinations cannot be looked up in the client's JNDI namespace.
C. Clients of a message destination need to know that the destination is listened to by a pool of message consumers,
D. Clients of a message destination do NOT need to know that the destination is listened to by a message-driven bean.
Answer: BC
Explanation: Client components do not locate message-driven beans and invoke methods directly on them. Instead, a client accesses a message-driven bean through, for example, JMS by sending messages to the message destination for which the message-driven bean class is the MessageListener.
Reference: The Java EE 6 Tutorial, What is a Message-Driven Bean?
Oracle Other Oracle Certification 1Z0-895 pack online dumps contain best quality exam questions along with answers. We promise that buyer will pass the actual real Other Oracle Certification exam inside first try out. We offer you free updated practice questions, and you had greater visit our website frequently in order to check out when we have virtually any updated materials. Our own experts are absorbed in the coming of all kinds of Other Oracle Certification 1Z0-895 dumps coaching tests. We make certain that each and every coin of cash you spend is worthy. Our own chief objective is to cause you to pass the Other Oracle Certification exam. Your own can claim total money back if you fail in order to pass the 1Z0-895 pack exam on the first try out. We have any guarantee policy in order to clear the doubt.
Authored By pdfcertify.net
Post Your Ad Here

Comments