1Z0-895 Exam Questions
84 real 1Z0-895 exam questions with expert-verified answers and explanations. Page 2 of 2.
- Question #59
An enterprise bean has security permissions set up using declarative security features. Under which two conditions can a client be guaranteed to have permission to invoke a busines...
- Question #60
Given a session bean defines: 11. @Stateless (name = "MrBean") 12. public class source SecureBean implements local business, remoteBusiness { Where LocalBusiness is a local busines...
- Question #61Timer Service
Suppose a developer wants to create an automatic persistent timer that performs data validation every hour. Given the following stateless session bean: @Stateless Public class Orde...
automatic persistent timer@Schedulestateless session beantimer creation - Question #62Timer Service
A developer implements a stateless session bean as a timed object. The bean contains two local business methods with the transaction attribute REQUIRED. A client begins a UserTrans...
timer serviceREQUIRED transaction attributeUserTransaction rollbacktimed object - Question #63Timer Service
A developer wants to create an enterprise bean that uses the EJB Timer service. Which two are true? (Choose two.)
EJB Timer servicepersistent timerTimedObject interfacetransaction support - Question #64Timer Service
Suppose developer wants to create an EJB component that performs data validation every hour. Given the following Stateless session bean: What is the minimum modification you would...
TimerService@Timeouttimer notificationstateless session bean - Question #65
An enterprise developer needs to modify the order of interceptor method execution specified by the Bean Provider, but does NOT have access to the bean's source code. No deployment...
- Question #66EJB Module Packaging and Deployment
A developer wants to package an enterprise bean FooBean within a .war file: @Stateless public xlass FooBean { public void foo () {} } Which package approach is correct?
war packagingstateless session beandeployment structure - Question #67
A developer creates a stateless session bean, EmployeeServiceBean, and its interface, EmployeeService. The session bean uses two annotated entity classes, Employee.class and Depart...
- Question #68EJB Module Packaging and Deployment
Assume you have been tasked with building an ejb-jar containing an EJB application. The EJB application contains local, remote, and web service and-point EJBs that provide reusable...
ejb-jar packagingglobal JNDI namedeployment descriptorannotation configuration - Question #69
A developer writes a stateful session bean with local business interface Bar containing method test. Method test is implemented as: 11. @Remove 12. public void test () {} A busines...
- Question #70JMS and Message-Driven Beans
MyMsg is a JMS message-driven bean with container-managed transaction demarcation. FooBean is an EJB 3.x stateless session bean that sends message to the JMS destination with MyMsg...
message-driven beancontainer-managed transactionRuntimeException handlingREQUIRED attribute - Question #71
Given an JMS message-driven bean, which statement is true about its exception handling?
- Question #72Transactions
Which is a correct way to define a runtime exception as an EJB 3.x application exception?
application exception@ApplicationExceptionruntime exceptionEJB exception handling - Question #73
A developer writes a stateless session bean with one local business interface and with containermanaged transactions. All business methods have transaction attribute REQUIRED. The...
- Question #74EJB Lite
Which two are programming restrictions in the EJB specification? (Choose two.)
EJB programming restrictionsnative librarysecurity managercontainer constraints - Question #75EJB Lite
Which three methods can Bean Developer use in any EJB compliant container implementing the full Java EE6 product? (Choose three.)
allowed APIsbean developer restrictionscontainer complianceJava EE methods - Question #76Session Beans
Which two annotations can be applied at the class, method, and field levels? (Choose two.)
@EJB@Resourceinjection annotationsannotation targets - Question #79
Suppose an EJB component is named HelloWorldBean is deployed as a standalone ejb-jar. Assuming the HelloWorldBean is implemented as follows: Which types of clients are guaranteed t...
- Question #80Session Beans
Assume an EJB application is comprised of the following EJB fragment: You have been asked to convert the type of InventoryReportBean into a singleton session bean. How would you ac...
singleton session bean@Singletonejb-jar.xml overridebean type conversion - Question #81Session Beans
Given Singleton bean FooEJB: FooEJB is packaged as the only bean in an ejb-jar and deployed to a server instance. Which represents the output generated from FooEJB after the deploy...
singleton session bean@PostConstructstartup initializationbean lifecycle - Question #82Session Beans
A developer writes a stateless session bean FooBean and uses its deployment descriptor to declare a local ejb dependency on a stateful session bean in the same ejb-jar. Which envir...
@EJB annotationejb-local-refJNDI namedependency injection - Question #83Interceptors
A developer writes an interceptor class and a stateless session bean: A client acquires an EJB reference to the FooLocal business interface and invokes the foo() method one time. W...
interceptor orderingAroundInvokeclass-level interceptorsmethod-level interceptors - Question #85Transactions
While excepting a business method in a stateless session bean the container rolls back the method's transaction. Which three are possible causes for the container's behavior? (Choo...
CMT rollbacksetRollbackOnlyapplication exceptionssystem exceptions - Question #86Session Beans
A stateless session bean FooBean implements an asynchronous business method foo() on its bean class: @Asynchronous public void foo() ( ... ) The asynchronous business method is exp...
asynchronous methods@Asynchronousremote interfaceRemoteException - Question #87JMS and Message-Driven Beans
A developer impalements an asynchronous implementation for calculating insurance proposals. The input data for the calculations is made available on a single message queue. Two typ...
JMS message selectormessage filteringheader propertiesqueue consumer - Question #88JMS and Message-Driven Beans
Which two statements are true JMS message-driven beans? (Choose two.)
message-driven beansmessage selectoractivationConfigconcurrent processing - Question #89JMS and Message-Driven Beans
A developer wants to create a JMS message-driven bean that responds to javax.jms.TextMessage messages. Which two statements are true? (Choose two.)
message-driven beansTextMessageMessageListener interfacebusiness interface - Question #90JMS and Message-Driven Beans
A developer writes a stateful session bean called FooBean. Which code can be inserted before Line 11 of the FooBean class to define a TYPE-level environment dependency on a JMS Top...
@ResourceJMS Topictype-level injectionclass-level annotation - Question #91Interceptors
A developer writes an interceptor class containing an AroundInvoke method, and applies it to the local business interface method of a stateless session bean: 11. @Interceptors(FooI...
interceptor lifecyclestateless session beaninterceptor instancesAroundInvoke - Question #92Transactions
A developer implements a CMT session bean with a method storeBoth which inserts data both a related database and an LDAP server. The relational database supports transactions while...
CMT transaction attributeREQUIRED_NEWnon-transactional resourceLDAP compensation - Question #93EJB Module Packaging and Deployment
An enterprise developer has received ejb-jars from multiple Bean Provides and wants to combine them into a single ejb-jar as well as altering the method permissions on some of the...
Application Assemblerejb-jar assemblymethod permissionsdeployment roles - Question #94
A developer creates a stateless session bean. This session bean needs data from a remote system. Reading this data takes a long time. Assume that the data will NOT change during th...
- Question #95Session Beans
Assume a client will be accessing a Singleton bean. Which client views is a Singleton bean capable of exposing? (Choose two)
singleton session beanclient viewsweb service endpointmessage listener