Javacexam IT Certification Prep, 100% Guaranteed Pass - Javacexam.com

Pass your next Citrix, Microsoft MCITP, Oracle, PMI certification exam using guaranteed training questions from Javacexam - Verified by Javacexam experts

Oracle 1Z0-863 Exam, Valid and updated Oracle 1Z0-863 Dump Online Store

100% latest and accurate Oracle 1Z0-863 exam dumps.Flydumps.com ensures that you are equipped with the latest questions and answers, which give you a better chance of passing the Oracle 1Z0-863 exam. Also free sharing Oracle 1Z0-863 VCE test engine and PDF.

QUESTION NO: 25
Which three statements about parsers are true? (Choose three.)
A. SAX and StAX are bi-directional.
B. DOM and StAX are bi-directional.
C. StAX is a push API, whereas SAX is pull.
D. SAX is a push API, whereas StAX is pull.
E. SAX and StAX are read-only.
F. SAX and DOM can write XML documents.
G. StAX and DOM can write XML documents.
Answer: B,D,G

QUESTION NO: 26
A developer who recently added message optimization support to the company’s Web services is tasked with explaining how the next crop of WSIT client applications will use the feature. Which statement is true?
A. Client developers should have experience with the SAAJ and MIME types to use MTOM with the service.
B. The clients should use the service WSDL to discover and satisfy the interoperability requirements.
C. Adding message optimization is a manual step when the WSDL is available on HTTPS.
D. The encryption for optimization requires a client keystore.

Answer: B
QUESTION NO: 27
A developer is analyzing an existing Web service with performance problems. The analysis reveals the service employs SOAP over HTTP. When the size of the encoded binary files grew with changing business requirements, the service slowed. What are two effective solutions for this problem? (Choose two.)
A. Separating the XML and binary content with WS-Filtering implemented in WSIT will improve efficiency.
B. XML documents larger than 1 KB with binary encoding should be optimized.
C. WS-Addressing can ease congestion by routing messages over other protocols.
D. For existing services, the most effective solution is to increase the available bandwidth.
E. MTOM can reduce both processing and bandwidth required by SOAP with attachments.
Answer: B,E
QUESTION NO: 28
Given:
1.
try { // Call Web service Operation

2.
org.me.calculator.client.CalculatorWS port =

3.
service.getCalculatorWSPort();

4.
// TODO initialize WS operation arguments here

5.
int i = 3;

6.
int j = 4;

7.
// TODO process result here

8.
int result = port.add(i, j);

9.
out.println(“<p>Result: ” + result);

10.

11.
} catch (Exception ex) {

12.
out.println(“<p>Exception: ” + ex);

13.
}
Assume Reliable Messaging is used and the code is correct except for what is missing at line 10.
Which code fragment must be placed at line 10?
A. Close the port object with ((Closeable)port).close(); after testing result is positive.
B. Close the port with port.close();
C. Closing the port object is optional, but port.close(); will work.
D. Close the port object with ((Closeable)port).close();

Answer: D
QUESTION NO: 29
Given the Java fragment and schema:
1.
//– Java code fragment

2.
public class PurchaseOrder{

3.
public javax.xml.datatype.XMLGregorianCalendar orderDate;

4.
}

5.
//– Schema fragment

6.
<xs:complexType name=”purchaseOrder”>

7.
<xs:sequence>

8.
<xs:element name=”orderDate” type=”xs:anySimpleType”

9.
minOccurs=”0″/>

10.
</xs:sequence>

11.
</xs:complexType>
Which two statements are true about .Net and WCF interoperability for this data? (Choose two.)
A. The GregorianCalendar maps to an equivalent date type in both Java and .Net.
B. .Net will generate code with the calendar as a string that functions as well as a date.
C. .Net will generate code with the calendar as a string that is not type equivalent.
D. Use of the @XmlSchemaType annotation causes .Net to properly map to a date.
E. Casting in the case of WSIT services is an effective approach for the WCF client.
Answer: C,D
QUESTION NO: 30
A purchase order Web service is designed to be synchronous, request-response, and HTTP- based. The existing service processes the request immediately. Because of new business requirements, the service can take up to ten days to perform a credit check before processing the order. Which two design changes need to be made? (Choose two.)
A. The client needs to use dynamic proxies instead of stubs.
B. The client needs to develop and deploy a Web service to accept callbacks.
C. The service only needs to change the WSDL from rpc-literal to document-literal.
D. The client and the service need to establish a mechanism to correlate the messages.
E. Given delays of up to ten days, a polling strategy is more efficient than callback.
Answer: B,D

QUESTION NO: 31
A developer is writing a Web service method that needs to accept multiple types of requests. Based on the request’s content, the service performs time-consuming steps, such as verifying the user’s account, checking credit ratings, and building a list of offers. Which two approaches are appropriate to use in this situation? (Choose two.)
A. a synchronous, document-style approach
B. a synchronous, procedure-style approach
C. an asynchronous, document-style approach
D. an asynchronous, procedure-style approach
E. HTTP and HTTPS
F. SMTP or other asynchronous protocol
Answer: C,F

QUESTION NO: 32
Based on separation of concerns, which two are correctly implemented in the processing layer of a Web service? (Choose two.)
A. validation of XML documents
B. saving document contents in a database table
C. application of the business logic to the XML document
D. translation of incoming XML documents to their internal XML representations
E. a new SOAP message for exceptions during validation of XML
Answer: B,C

QUESTION NO: 33
Which situation requires the client to use the Dispatch interface to access the Web service?
A. The client and the server are on different platforms.
B. The client has access to the portable artifacts, but not to the WSDL.
C. The client has access to the WSDL, but not to the portable artifacts.
D. The client will access a REST-based service.
Answer: D
QUESTION NO: 34
Which statement is true about the SOAP 1.1 actor attribute?
A. It is ignored for HTTP.
B. It indicates the recipient of a header block.
C. It indicates the final recipient of the message.
D. It indicates which recipient processes the Body element.
E. SOAP 1.1 does not use the actor attribute.
Answer: B
QUESTION NO: 35
Given:
1.
<?xml version=”1.0″ encoding=”UTF-8″?>

2.
<soapenv:Envelope>

3.
<soapenv:Body xmlns:ns2=”urn:examples”>

4.
<ns2:name>Sun Solaris</ns2:name>

5.
<ns2:price >99.99</ns2:price>

6.
<ns2:description>

7.
Solaris for Intel

8.
</ns2:description>

9.
<ns2:ID>A358185</ns2:ID>

10.
</soapenv:Body>

11.
</soapenv:Envelope>
Which statement is correct?
A. The message is SOAP-encoded because the encoding style is implied.
B. The message is RPC-encoded because in the absence of other specifiers, this is the WS-I default.
C. The message is document literal with type encoding, based on the schema provided.
D. The message is document literal wrapped because there is no encoded type information.
Answer: C
QUESTION NO: 36
An organization has business logic implemented in EJB components. Current clients use container-managed, role-based security to access the business logic using RMI. Management has determined that the business logic must be made available to non-RMI clients using a Web service. Which container-managed Web service security mechanism must the development team use to allow Web service clients to use the current security model?
A. XKMS
B. XACML
C. XML Digital Signature
D. HTTP Basic Authentication
E. annotations mapped to the JAX-WS runtime
Answer: D
QUESTION NO: 37
Which three techniques can be used to apply XML Digital Signatures to an XML document? (Choose three.)
A. use detached signatures, where the digital signature covers sibling elements or external data
B. use enveloping signatures, where the digital signature element encloses the data to be signed
C. use enveloping signatures, where the digital signature is a child element of the data to be signed
D. use enveloped signatures, where the digital signature is a child element of the data to be signed
E. use enveloping signatures, where the digital signature element is a child element of the data to be signed
Answer: A,B,D

QUESTION NO: 38
Which three security technologies are included in WS-Security? (Choose three.)
A. security pattern injection
B. encryption
C. single sign-on
D. security tokens
E. digital signatures
Answer: B,D,E
QUESTION NO: 39
Two companies communicate using Web services in a business transaction. Which mechanism is designed to ensure that business data CANNOT be renounced, or a transaction denied, by either one?
A. integrity provided by public key certificates and digital signatures
B. confidentiality provided by asymmetric or symmetric cryptography
C. identity management provided by private keys and certificate authorities
D. non-repudiation provided though public key cryptography by digital signing

Answer: D
QUESTION NO: 40
What are two features of a WSDL 1.1 document? (Choose two.)
A. Service defines a collection of related endpoints.
B. Service describes the message’s payload using XML.
C. Service assigns an Internet address to a specific binding.
D. Porttype declares complex data types and elements used elsewhere.
E. Porttype elements are used to group a set of abstract operations.
F. Porttype defines a concrete protocol and data format specification.
Answer: A,E
QUESTION NO: 41
According to the WS-I Basic Profile 1.1, which two statements are true about the targetNamespace attribute for xsd:schema elements that are children of WSDL 1.1 type element? (Choose two.)
A. Its value must be valid unless it has xsd:import, xsd:annotation, or both as its only child elements.

The FLYDUMPS Oracle 1Z0-863 study materials is the most thorough, accurate, and up-to-date practice test you will find on the market today. Pass4itSure Oracle 1Z0-863 study materials are 100% verified realistic Oracle 1Z0-863 exam questions and Oracle 1Z0-863 exam answers. It provides people the mandatory product in plethora however, if you are always parched to learn far more next Oracle 1Z0-863 is your own beck and also necessitate Oracle 1Z0-863. There’s reasonable articles designed for us in the world of net but a majority of individuals don’t like to keep online for a while so they can purchase textbooks regarding Oracle 1Z0-863 from their own closest publication shop.

Welcome to download the newest Examwind 220-010 dumps: http://www.examwind.com/220-010.html

EC-COUNCIL EC1-349 Practice Test, Most Important EC-COUNCIL EC1-349 Practise Questions UP To 50% Off

Oracle 1Z0-860 Exam, Latest Updated Oracle 1Z0-860 PDF Is Your Best Choice

Most accurate Oracle 1Z0-860 practice test for you to free download. Flydumps.com is also an authenticated IT certifications site that offer all the new questions and answers timely.Visit the site Flydumps.com to get free Oracle 1Z0-860 VCE test engine and PDF.

QUESTION: 71
Given the following client-side code that makes use of the session bean Foo:

10.
@EJB Foo beanl;

11.
@EJB Foo bean2; //more code here
20.
booleantestl = beanl.equals(beanl);

21.
booleantest2 = beanl.equals(bean2); Which two statements are true? (Choose two)

A. If Foo is stateful, testl is true, and test2 is true,
B. If Foo is stateful, testl is true, and test2 is false,
C. If Foo is stateless, testl is true, and test2 is true.
D. If Foo is stateful, testl is false, and test2 is false,
E. If Foo is stateless, testl is true, and test2 is false.
F. If Foo is stateless, testl is false, and test2 is false.

Answer: B, C
QUESTION: 72 A developer implements a session bean with a method doStuff which behaves differently depending on the caller’s security role. Only users in security roles “ADMIN” and “USER” are allowed to call the method. Assume that there is no security-related metadata in the deployment descriptor. Which two, taken in combination, are appropriate to accomplish this? (Choose two.)
A. Annotate method doStuff with @PermitAII.
B. AnnotatemethoddoStuff [email protected]({“ADMIN”,”USER”})
C. If EJBContext.getCallerPrincipal returns role “ADMIN”, implement thebehaviorfor users in role ADMIN.
D. If EJBContext.isCallerlnRole(“ADMIN”) returns true, implement the behavior defined for users in role “ADMIN”.

Answer: B, D
QUESTION: 73 You have been asked to develop business methods for an enterprise bean to fulfill the following objective: If the JDBC connection is NOT available, the current state of the shopping cart session must be serialized. A serialized state must be written to a text file using a java.io.PrintWriter. Data must be shared with a Web services end point. Logging information must be displayed in ajavax.swing.JPanel component. Which is true?
A. The requirements can be fullfilled only in sessionbeans.
B. Therequirementscan befulfilled only in message-driven beans.
C. Allof the requirements can be fulfilled using either session beans or message-driven beans.

D. None of the requirements can be fulfilled using either session beans or message-driven
beans.
E. Bothsession beansandmessage-driven beans canfulfillsomebutnotalloftherequirements.

Answer: E
QUESTION: 74 A developer is creating an entity which is mapped to a table that has a primary key constraint defined on two character columns and would like to use mapping defaults as much as possible to simplify the code Which two mapping options can be chosen? (Choose two.)
A. Use an @ld property that constructs a private field as a concatenation of two columns.
B. Use a separate class to map those two columns and use an @ldClass annotation to denote the primary key field or property in the entity.
C. Use a separate @Embeddable class to map those two columns and use an @Embeddedld annotation to denote a single primary key field or property in the entity.
D. Use a separate @Embeddable class to map those two columns and add two fields or properties to the entity, each marked as @ld, that correspond to the fields or properties in the embeddable class.
E. Use a separate class to map those two columns. Specify that class using @ldClass annotation on the entity class. Add two fields or properties to the entity, each marked as @ld, that correspond to the fields or properties in that separate class.

Answer: C, E
QUESTION: 75 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.
Answer: A, D
QUESTION: 76 A developer creates the following session bean: 10..Stateless
11.
@RolesAllowed(“SECRET”)
12.
public class MyBean implements Mylnterface
13.
public void methodAOJ}
14.
@PermitAII
15.
public void methodB0 {}
16.
@DenyAII
17.
public void methodC0 {}
18.}
No deployment descriptor is supplied. Which two statements are true? (Choose two.)

A. A user in the role “SECRET” will be able to access all of the methods.

B. A user in the role “FOO” will be able to access methodA and methodB.

C. A user without any role will be able to access methodB but NOT methodA.

D. A user in the role “SECRET” will be able to access methodA and methodB.

E. A user in the role “SYSADM” will be able to access methodA, methodB, and
methodC.
Answer: C, D
QUESTION: 77 Given a stateless session bean with container-managed transaction demarcation, from which two methods can a developer access another enterprise bean? (Choose two.
A. beanconstructor
B. Timeout callback method
C. PreDestroy lifecycle callback method
D. PostConstruct lifecycle callback method
E. businessmethod fromthebusiness interface
Answer: B, E

QUESTION: 78
Which statement about entity manager is true?

A. A container-managed entity manager must be a JTA entity manager.
B. An entity manager injected into session beans can use either JTA or resource-local transaction control.
C. An entity manager created by calling the EntityManagerFactory.createEntityManager method always uses JTA transaction control.
D. An entity manager obtained through resource injection in a stateful session bean can use a resource-local EntityTransaction for transaction control

Answer: A
QUESTION: 79 Which two statements about the EJBContext. isCallerlnRole method are correct? (Choose two.)
A. Message-drivenbeans must NOT call the isCallerlnRole method.
B. The isCallerlnRole method may be called in a session bean constructor.
C. The isCallerlnRole method can be called in any business method of a stateless or a stateful session bean.
D. The isCallerlnRole method can be called in the PostConstruct and PreDestroy lifecycle callback methods of a stateless session bean.

Answer: A, C
QUESTION: 80
According to the Java Persistence API, a managed entity instance X becomes removed by
invoking the remove method on it or when it is a target of a cascaded remove operation.
Which statement is true?

A. After an entity has been removed its state will be restored to the Java defaults.
B. If a detached entity Y references Xthe HlegalStateException will be thrown.
C. If X is a new entity the remove operation is cascaded to entities referenced by X.
D. A removed entity X will be guaranteed to be removed from the database when the remove method returns.
Answer: C
QUESTION: 81
Given the following client-side code that makes use of the session bean Foo:

10.
@EJB Foo beanl;

11.
@EJB Foo bean2; //more code here
20.
booleantestl = beanl.equals(beanl);

21.
booleantest2 = beanl.equals(bean2); Which two statements are true? (Choose two)
A. A. IfFoo is stateful, testl is true, and test2 is true,
B. If Foo is stateful, testl is true, and test2 is false,
C. If Foo is stateless, testl is true, and test2 is true.
D. If Foo is stateful, testl is false, and test2 is false,
E. If Foo is stateless, testl is true, and test2 is false.
F. If Foo is stateless, testl is false, and test2 is false

Answer: B, C
QUESTION: 82
Given two entities with a many-to-many bidirectional association between them:

11.
@Entity public class Employee!
12.
Collection projects;
13.
// more code here
14.}
and
11..Entity public class Project!

12.
Set<Employee> emps;
13.
// more code here
14.}
What set of annotations correctly defines the association?

A. @ManyToMany on the projects field, @ManyToMany(mappedBy=”projects”) on the
emps field

B. @ManyToMany(mappedBy=”emps”) on the projects field, @ManyToMany on the
emps field

C. @ManyToMany(targetEntity=Project.class) on the projects field,
@ManyToMany(mappedBy=”projects”) on the emps field
D. @ManyToMany(targetEntity=Project.class) on the projects field, @ManyToMany on the emps field

Answer: C
QUESTION: 83 A developer wants to perform programmatic access control inside EJB 3.0 session beans. This is needed because some permissions can be determined only at application runtime. Which method achieves this goal?
A. javax.ejb.EJBContext.getRollbackOnlyO
B. java.lang.SecurityManager.checkAccess(Thread t)
C. javax. interceptor. InvocationContext. getTargetO
D. javax. ejb. SessionContext.isCallerlnRole(String roleName)
E. javax. servlet. http. HttpServletRequest. getUserPrincipalQ

Answer: D
QUESTION: 84 A business method of a stateless session bean with a transaction attribute REQUIRED executes a Java Persistence query on a container-managed persistence context. Under which two conditions can the developer expect the persistence provider to ensure that all changes made to the persistence context in the transaction are visible to the processing of the query? (Choose two.
A. Theflushmode is NOT explicitly set.
B. Theflushmodeon the Query object is set toCOMMIT.
C. The refresh method on the EntityManager is called.
D. The flush mode on the persistence context issetto AUTO but is NOT specified for the Query object.
Answer: A, D
QUESTION: 85

A session bean calls the setRollbackOnly method on the EJBContext interface within a business method with an active transaction. Which two are correct? (Choose two.)
A. The transaction timeout is immediately disabled.
B. The container will ensure that the transaction will never commit.
C. The bean must have started the current transaction for this to be legal.
D. The bean must have bean-managed transaction demarcation for this to be legal.
E. Thebean must have container-managed transaction demarcation for this to be legal.

Answer: B, E
QUESTION: 86 A session bean’s business method invokes UserTransaction.setRollbackOnly and receives an HlegalStateException. Under which circumstance canthis happen?
A. The bean is using bean-managed transactions regardless of whether there is an active transaction.
B. There is no circumstance that would cause setRollbackOnly to throw an HlegalStateException.
C. The bean is using bean-managed transaction demarcation, and UserTransaction.begin has NOT been invoked.
D. The setRollbackOnly method is invoked within a bean-managed transaction, and UserTransaction.commit has NOT been invoked.

Answer: C
QUESTION: 87
Given the following entity class:

11.
@Entity public class Customer)
12.
@ld private int id;
13.
private transient String name;
14.
private Jav

a.
math. BigDecimal grossAmmount;
15.}
Which mapping annotation can be added to the fields of this entity?
A.
@Columntothe name field
B.
@Embeddedldto theid field

C.
@Basictothe grossAmmountfield

D.
@JoinColumnstothe grossAmmount field
Answer: C
QUESTION: 88
Which two statements are true about EJB 3.0 JMS message-driven beans? (Choose two.)

A. The developer can use JMS messageselector declarationsto restrict the messages that the bean receives.
B. The developer can associate the bean with a specific queue or topic using the resource-ref element of the deployment descriptor.
C. To achieve concurrent processing of more than one message at a time, more than one bean class must be associated with the same JMS queue.
D. The developer can usetheactivationConfigelementoftheMessageDrivenannotationto specify whether the bean should be associated with a queue or a topic.

Answer: A, D
QUESTION: 89 A developer wants to create a Java Persistence query that returns valid U.S. phone numbers (formatted as “123-456-7890” or “800-RUN-EJB3”) from a collection of differently formatted international phone numbers. The developer needs only those numbers that begin with 303. Which WHERE clause is correct?
A. WHEREaddr. phone LIKE 303J
B. WHERE addr. phone LIKE 303%’
C. WHEREaddr. phone LIKE303-_-_’
D. WHEREaddr.phone LIKE 303-%-%’
E. WHEREaddr. phoneLIKE 303–‘
F. WHERE addr. phone LIKE 303-%%%-%%%%’
Answer: E
QUESTION: 90

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.

Answer: A, D
QUESTION: 91 Given: 10..Stateless
11.
@RunAs(“X”)
12.
public class SecureBeanOl implements SecureOl {
13.
@EJB Secure02 secure02;

23.
@RolesAllowed(“A”)
24.
public void methodA0 {
25.
secureO2.methodB0;
26.}
10..Stateless

11. public void SecureBean02 implements Secure02{

23.
@RolesAllowed(“A”)
24.
public void methodB0 {
A user who is only in role A invokes SecureOl. method . Assuming NO other
security-related metadata, what is the expected result?

A. An exception is thrown at Line 25.

B. Anexceptionisthrown at Line 13.

C. methodA cannot beinvokedbythis user.

D. The codeexecutes without raising an exception.

Answer: A
QUESTION: 92

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 [email protected] method.
B. Re-establish references to resources in an @lnit annotated method.
C. Release references to resources [email protected] annotated method.
D. Release references to resources in a @PrePassivate annotated method.
E. Re-establish referencestoresources ina (.PostActivate annotatedmethod.

Answer: C, D, E
QUESTION: 93 A developer is writing a stateless session bean that is obtaining a transaction-scoped entity manager using injection and assumes the application defines one persistence unit. Which declaration is correct?
A. .ResourceEntityManagerem;
B. @PersistenceUnit EntityManager em;
C. @PersistenceContext EntityManager em;
D. @PersistenceUnit(“TransactionScoped”) EntityManager em;

Answer: C
QUESTION: 94 The Java Persistent API defines certain rules for persistent entities. These rules are required by the persistent provider to manage entities at runtime. Which statement is correct, assuming NO mapping descriptor is used?
A. Entitiesmust extenda persistent base class.
B. Entities must implement the interface PersistentEntityto bemanaged bythepersistent provider.

C. Afield withoutatransient modifier mustbeannotated as.Persistent tobe stored in the
database.
D. A field without a transient modifier must be annotated as (.Transient to NOT be stored in the database.

Answer: D
QUESTION: 95
Which statement is correct about the Java Persistence API support for the SQL queries?

A. SQL queries are NOT allowed to use parameters.
B. The result of an SQL query is not limited to entities.
C. Only SELECT SQL queries are required to be supported.
D. SQL queries are expected to be portable across databases.

Answer: B
QUESTION: 96
Which two are restrictions of beans with bean-managed transactions? (Choose two.)

A. The NONSUPPORTED transaction attribute must be chosen.
B. Clients calling with a transactional context are prohibited and will result in an exception.
C. A stateful session bean must commit a started transaction before a business method returns.
D. A bean that starts a transaction must complete the transaction before it starts a new transaction.
E. A message-driven bean instance must commit a transaction before the onMessage method returns.

Answer: D, E
QUESTION: 97
Given two entities with a many-to-many bidirectional association between them:

11.
@Entity public class Employee!

12.
Collection projects;

13.
// more code here
14.}
and
11..Entity public class Project!
12.
Set<Employee> emps;
13.
// more code here
14.}
What set of annotations correctly defines the association?

A. @ManyToMany on the projects field,
@ManyToMany(mappedBy=”projects”) on the emps field

B. @ManyToMany(mappedBy=”emps”) on the projects field,
@ManyToMany on the emps field

C. @ManyToMany(targetEntity=Project.class) on the projects field,
@ManyToMany(mappedBy=”projects”) on the emps field

D. @ManyToMany(targetEntity=Project.class) on the projects field,
@ManyToMany on the emps field
Answer: C
QUESTION: 98 A developer is implementing an EJB 3.0 message-driven bean that will be associated with a JMS topic. The bean must NOT miss any messages published to the topic, even if the EJB server is down for some time. Which is correct?
A. The developershouldset the activation config properly subscriptionDurabilitytovalueDurable.
B. The developer should set the activation config property subscriptionDurability to value NonDurable.
C. Clients must take care of resending messages to the topic in case of missing message acknowledgements.
D. The developer does NOT need to do anything, because as long as the EJB server is down no client can publish messages to the topic.
Answer: A
QUESTION: 99

Which two can be specified by both the Bean Provider and the Application Assembler?
(Choose two.)
A. security roles
B. enterprise bean type
C. transaction attributes
D. session bean’s state-management type
E. enterprise bean’s remote home interface
F. enterprise bean’s local business interface

Answer: A, C
QUESTION: 100 A developer writes a stateless session bean with one local business interface and with containermanaged transactions. All business methods have transaction attribute REQUIRED. The bean has an injected field sessionCtx of the type SessionContext. Which two operations are allowed in a business method of the bean? (Choose two.)
A. sessionCtx. getEJBObject
B. sessionCtx.setRollbackOnly
C. sessionCtx. getMessageContext
D. sessionCtx. getBusinessObject
E. sessionCtx. getEJBLocalObject

Answer: B, D
QUESTION: 101
A User entity is in a one-to-many relationship with a Book entity. A developer writes a
query to delete users that have a first name of Fred1or ‘Ginger’, and writes the following
Java Persistence query language statement:
DELETE FROM User u WHERE u.name IN (Fred’, “Ginger)
If the query fails with a PersistenceException, what can be the cause?

A. The syntax of the query is NOT correct.
B. Thequerycauses a foreign key integrity constrainttobe violated.
C. The database doesNOThave any userswith thenameFred’or ‘Ginger’.

D. Theentities corresponding to the userswiththe nameFred’or’Ginger’ arealreadybeing managedbythe persistencecontext.

Answer: B
QUESTION: 102
Given :
public class MyException extends Exception {}
The business interface Foo declares a method work0: I.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.
//do some work not shown here
15.
throw new MyException0;
16.}
Assuming there is no deployment descriptor, which statement is true when the workQ
method is invoked by a client with an existing transaction context and execution reaches
Line 15?

A. The container does notroll back thetransaction.

B. The clientreceives javax.ejb.EJBTransactionRequiredException.

C. The clientreceivesjavax.ejb.EJBTransactionRolledbackException.

D. Thecontainer marks the transactionforrollback by calling the EJBContext.setRollbackOnly
method.
Answer: A
QUESTION: 103
Which statement is true about the use of a persist operation in a transaction?

A. If a user persists a detached object it always becomes managed.
B. The persist operation on an entity always cascades to its related entities.
C. If a user persists a new entity with an existing primary key the transaction will fail.
D. If a user persists a managed entity an exception may be thrown by the persist operation.
Answer: C
QUESTION: 104 A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of business logic has been implemented and tested in these EJB 2.1 session beans. Some EJB 3.0 session beans need to access this business logic. Which design approach can achieve this requirement?
A. Add adapted home interfaces to EJB 3.0 session beans to make EJB 3.0 and EJB 2.1 session beans interoperable.
B. Add EJB 3.0 business interfaces to existing EJB 2.1 session beans and inject references to these business interfaces into EJB 3.0 session beans.
C. No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a reference to the EJB 2.1 home interface into the EJB 3.0 bean class.
D. No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a reference to the EJB 2.1 component interface into the EJB 3.0 bean class.

Answer: C
QUESTION: 105 A Java Persistence application wants to use optimistic locking. Which statement that describes the functionality of optimistic locking is correct?
A. The Version attribute of an entity using optimistic locking can be mapped to a secondary table.
B. Optimistic locking can be used by Java Persistence applications to set optimistic locks on tables in the database.
C. The Version attribute of an entity using optimistic locking is verified each time the instance is loaded from the database.
D. Optimistic locking ensures that updates or deletes are consistent with the current state of the database and that intervening updates are not lost.
Answer: D
QUESTION: 106

The Oracle 1Z0-860 study materials tend to be unequalled in high-quality and they are 100% certain to make you go ones exam questions. You are not about to purchase a disposable product at Killtest. Regardless of how soon you decide to take the actual Oracle 1Z0-860 certification examination, you will be able to walk into the testing room as confident as the Certification Administrator.  Pass4itSure Oracle 1Z0-860 study materials provide you everything you will need to take Oracle 1Z0-860 examination. Whether or not you decide to make use of each of our Oracle 1Z0-860 study materials or even the Oracle 1Z0-860 practice exam it is possible to feel comfortable knowing that you could have the ultimate throughout offline and online instruction.

Welcome to download the newest Examwind 1Z0-052 dumps: http://www.examwind.com/1Z0-052.html

EC-COUNCIL EC0-479 Exam Questions, Most Popular EC-COUNCIL EC0-479 Preparation Materials Is What You Need To Take

Oracle 1Z0-860 Dumps, Most Popular Oracle 1Z0-860 Certification Are Based On The Real Exam

Welcome to download the newest Examwind C_HANATEC151 dumps:

Good News!who Want to get Oracle 1Z0-860 Certified? We know that the Oracle 1Z0-860 certification exam is challenging, but with the new version Oracle 1Z0-860 exam dumps, you will pass the exam easily and quickly.Free download the VCE and PDF files on Flydumps.com

QUESTION: 26 A developer is writing implementation code for an EJB 3.0 message-driven bean class that processes booking requests. Within the business logic of the onMessage method, a temporary problem can occur. In that case the developer wants to make sure that the booking request is processed again in 30 minutes. Which two can the developer select? (Choose two.)
A. Throwa runtimeexception torollbackthetransaction.
B. Call setRollbackOnly on the MessageDrivenContext interface.
C. Makeuseof the TimerService, and implement the TimedObject interface.
D. Make use of the TimerService,implement areprocess method, and annotate it with @Timeout.
E. Throw an application exception, and addtheretry-after attribute to the deployment descriptor.
Answer: C, D
QUESTION: 27

Given a set of CMT bean methods with the following transaction attributes: Method
M1=SUPPORTS Method M2=REQUIRED Method M3=NOT_SUPPORTED Method M4=REQUIRES_NEW And the following method invocation sequence: Method M1 invokes Method M2 Method M2 invokes Method M3 Method M1 invokes Method M4 If Method M1 is invoked by a method that does NOT have a transaction context, which describes a possible scenario?
A. Method M1notransaction MethodM2new transaction Method M3no transaction MethodM4newtransaction
B. Method M1notransaction Method M2Container throws EJBTransactionRequiredException
C. MethodM1new transaction Method M2runs in same transaction as M1 Method M3Container throws TransactionNotSupportedException
D. Method M1no transaction Method M2new transaction Method M3Container throws TransactionNotSupportedException

Answer: A
QUESTION: 28 OldBarBean is a stateless session bean written to the EJB 2.1 API with remote home interface. OldBarHome and remote component interface OldBar. FooBean is a stateless session bean written to the EJB 3.0 API. OldBarBean and FooBean are the only EJBs packaged in the ejb-jar. The FooBean portion of the ejb-jar. xml also declares an ejb-ref whose ejb-ref-name is ejb/oldBar. The ejb-ref is linked to OldBarBean. There are no other ejb dependencies defined. A business method foo in FooBean needs to access OldBarBean. Which is portable code to achieve this goal?
A. .Remote
private OldBar oldBar;

B. public void fooQ { try {
InitialContext ic = new InitialContextO; Object obj = ic.lookup(“ejb/oldBar”);
OldBarHome OldBarHome =
(OldBarHome) PortableRemoteObject.narrow(obj, OldBarHome.class);
OldBar oldBar = oldBarHome.createO;

C. @EJB private OldBarHome OldBarHome;
public void fooQ {
try {
OldBar oldBar = oldBarHome.createQ;

D. public void fooQ {
try {
InitialContext ic = new InitialContextO; OldBarHome OldBarHome =
(OldBarHome) ic.lookup(“ejb/oldBar”); OldBar oldBar = oldBarHome.createQ;
Answer: C
QUESTION: 29 DRAG DROP Click the Task button. A Department entity is in a one-to-many relationship with an Employee entity. A developer has been asked to write a Java Persistence query to update the set of employees who are in the department ‘HR’ by setting their department to null. Construct a query using the Java Persistence query language to perform this task. Construct a valid Java Persistence query by dragging and dropping the syntax fragements.

Answer: C
QUESTION: 30 A developer implemented a Java class called Store. The class is annotated correctly to act as an entity. The developer created a stateless session bean to create, lookup, and remove Store objects. This session bean has a container-managed entity manager injected into field em and a removeStore method with transaction attribute REQUIRED. Given the following code :
32.
public void re move St ore (St ore store) {
33.
em.remove(store); 34.}
What is a possible reason that an HlegalArgumentException is thrown at Line 33
when the removeStore method is called by a remote client?

A. Thepassedobject is NOT serializable.

B. Thepassed object is NOT found inthedatabase.

C. The passed object is NOT managed by the entity manager.

D. There is no active transaction to manage the database removal.
Answer: C
QUESTION: 31 A developer is designing a Java Persistence application that is mapped to a set of existing tables. This set includes table EMPLOYEE, DEPARTMENT, and PROJECT. Tables EMPLOYEE and DEPARTMENT do NOT define any foreign key constraints to table PROJECT. Table PROJECT defines foreign key constraints with references to tables EMPLOYEE and DEPARTMENT and an extra column called COST. The table EMPLOYEE is mapped to an entity Employee and the table DEPARTMENT to an entity Department. How can the table PROJECT be mapped so the persistence application can be portable?

A. Such sets of tables cannotbemappedandkeep the application portable.
B. Map thetablePROJECT asasecondary table for either the Employee or Departmententity.
C. Map the table PROJECT to bidirectional many-to-many relationships between the Employeeand Departmentusing a Java. util.Mapas the type ofthefield or property.
D. Mapthe tablePROJECT to an entity Projectwith afield or property cost mappedto thecolumn COST and one-to-many relationshipstothis entity in the Employee and the Department.

Answer: D
QUESTION: 32 A CMT session bean named MrBean contains a method storeStuff which is annotated as follows:
22.
@TransactionAttributeO”ransactionAttributeType.REQUIRES_NEW)
23.
public void storeStuffO {
All other methods of this bean have no transaction annotations. Given the following part
of an ejbjar.
xml:

23.
<container-transaction>
24.
<method>
25.
<ejb-name>MrBean</ejb-name>
26.
<method-name>*</method-name>
27.
</method>
28.
<transaction-attribute>NotSupported</transaction-attribute>
29.
</container-transaction>
Which statement is correct about the methods in MrBean?

A. Allmethods of MrBean have transaction attribute REQUIRED.

B. All methodsofMrBean have transactionattribute NONSUPPORTED.

C. MethodstoreStuffhastransactionattributeREQUIRES_NEWandthe other methods have
transaction attribute REQUIRED.

D. Method storeStuff has transaction attribute NONSUPPORTED and the other
methods have transaction attribute REQUIRED.

E. Method storeStuff has transaction attribute REQUIRES NEWandthe other
methodshavetransaction attribute NOT SUPPORTTED.

Answer: B

QUESTION: 33 A developer writes an interceptor class called Foolnterceptor containing the following Aroundlnvoke method:
11.
@Aroundlnvoke
12.
public Object intercept(lnvocationContext ctx) {
13.
return “intercepted”; 14.}
Foolnterceptor is applied to a business method in a stateless session bean:

11.
@lnterceptors(Foolnterceptor.class)
12.
public String testzero(int i) {
13.
return (i == 0) ? “zero””not zero”;
14.
}
Which describes the result when a client invokes the testzero method with a value of 1?

A. The intercept method is NEVER invoked.

B. The clientreceivesareturnvalueof “zero”.

C. The client receivesa returnvalue of “not zero”.

D. The client receivesareturn value of “intercepted”.
Answer: D
QUESTION: 34 A developer implements a session bean which acts as a session facade for an application. This means that clients will only see this session bean’s interface which offers the application interface. There are three distinct roles known at development time”user”, “admin”, and “guest”. The majority of the methods will be used by role “user”. All methods must have role permissions active and roles may be added or changed in the future. Which two scenarios are correct? (Choose two.)
A. The developer annotates the bean class with @PermitAII and annotates the methods used by role”guest” or “admin” individually.
B. The developer annotates the bean class with @DenyAII and annotates the methods used by role”user”, “guest”, or “admin” individually.
C. The developer defines individual method permissions for the methods used by roles “user”,”guest”, and “admin” in the deployment descriptor.
D. The developer annotates the bean class with @RolesAllowed(“user”) and annotates the methods used by role “guest” or “admin” individually.
E. Thedeveloper defines a method permission with method name “*” and role “user” and adds individual method permissions for the methods used by roles “guest” and “admin” in the deployment descriptor.
Answer: D, E
QUESTION: 35 A User entity is in a one-to-many relationship with a Book entity. Assume that a developer has a function fetchBook(String title) that fetches a Book entity with the given title title. Also assume that the developer has an entity manager em. Which query can be used to return the user that holds the book titled “Java”?
A. em.createQueryfSELECT u FROM User u where :great IN u.books.title”).setParameter(“great”,”Java”)
B. em.createQuery(“SELECT u FROM User u where :great IN
C. books”). setParameter(“great”,fetchBook(“Java”))
D. em.createQuery(“SELECT u FROM User u where :great MEMBER OF
E. books.title”). setParameter(“great” .”Java”)
F. em.createQuery(“SELECT u FROM User u where :great MEMBER OF
G. books”). setParameter(“great”,fetchBook(“Java”))

Answer: D
QUESTION: 36 Given: A session bean Foo uses container-managed transactions The container throws a javax.transaction.TransactionRolledBackException when the doStuff method runs. Which transaction attribute can the doStuff method have for this to occur?
A. NEVER
B. MANDATORY
C. REQUIRES_NEW
D. NOT SUPPORTED

Answer: B
QUESTION: 37 Within a Java EE environment, which annotation can be used to inject an entity manager factory?

A. .Entity
B. .Factory
C. @JTAFactory
D. @PersistenceUnit
E. .PersistenceContext

Answer: D
QUESTION: 38
Given this code snippet from a JMS message-driven bean class X:

11.
public XQ { System, out. print(“1 “); }
12.
public void onMessagefMessage m) throws Java. rmi. RemoteException
13.
try {
14.
TextMessage tm = (TextMessage) m;
15.
String text = tm.getText0;
16.
System, out. print(“2 “);
17.
} catch (JMSException e) {
18.
throw new java. rmi. RemoteExceptionQ; 19.}
20.}
When this bean class handles a message, which is correct?

A. After a messagedelivery theresultis1.

B. Aftera message delivery the resultis2.

C. Aftera message delivery the result is12.

D. Afteramessage delivery an exception isthrown.

E. After a message delivery the resultisunpredictable.

F. This isNOTanEJB3.0 compliant bean.
Answer: F
QUESTION: 39
Which statement is true about the primary key of a Java Persistence entity?

A. The primary key cannot be overriden by a mapping descriptor.
B. The location of the primary key defines the topmost entity class in the hierarchy.

C. If property-based access is used, the properties of the primary key class must be public or protected.
D. At least part of a primary key must be defined in the class that is the topmost class of an entity which is defined by a hierarchy of classes.

Answer: C
QUESTION: 40 A session bean calls the setRollbackOnly method on the EJBContext interface within a business method with an active transaction. Which two are correct? (Choose two.)
A. The transaction timeout is immediately disabled.
B. The container will ensure that the transaction will never commit.
C. The bean must have started the current transaction for this to be legal.
D. The bean must have bean-managed transaction demarcation for this to be legal.
E. Thebean must have container-managed transaction demarcation for this to be legal.

Answer: B, E
QUESTION: 41
Which statement about entity manager is true?

A. A container-managed entity manager must be a JTA entity manager.
B. An entity manager injected into session beans can use either JTA or resource-local transaction control.
C. An entity manager created by calling the EntityManagerFactory.createEntityManager method always uses JTA transaction control.
D. An entity manager obtained through resource injection in a stateful session bean can use a resource-local EntityTransaction for transaction control

Answer: A
QUESTION: 42
A Java Persistence application uses a Version attribute to manage concurrent updates.
Which is true?
A. The Version attribute must have a public access type.
B. The Version attribute is used by the persistence provider.
C. A separate Version attribute must be specified for each class in the inheritance hierarchy.
D. A separate Version column must be specified for each table mapped to the entity.

Answer: B
QUESTION: 43 A developer writes a stateful session bean FooBarBean with two local business interfaces Foo and Bar. The developer wants to write a business method called getBarfor interface Foo that returns a Bar reference to the same session bean identity on which the client invokes getBar. Which code, when inserted on Line 12 below, implements the getBar method with the wanted behavior? 10..Resource SessionContext sessionCtx;
11.
public BargetBarOJ
12.

13.}
A. return(Bar)this;

B. return(Bar) new FooBarBeanQ;

C. return (Bar) sessionCtx.lookup(“FooBarBean”)

D. return (Bar) sessionCtx.getBusinessObject(Bar.class);

E. InitialContextic= new InitialContextQ;
return (Bar) ic.lookup(“java:comp/env/ejb/FooBarBean”);
Answer: D
QUESTION: 44 Which statement about the combination of mapping defaults, annotations, and XML descriptors is correct?
A. All mapping annotations must always be processed by the persistence provider.
B. Some annotations, like the @Entity annotation, must always be processed by the persistence provider.
C. The mapping information for an entity class specified by annotations and in XML
descriptors must be distinct.

D. If multiple entity listeners are defined, the order in which they are invoked can be
defined or overwritten in the XML descriptor.

Answer: D
QUESTION: 45 A developer wants to release resources within a stateless session bean class. The cleanup method should be executed by the container before an instance of the class is removed. The deployment descriptor is NOT used. Which three statements are correct? (Choose three.)
A. The cleanup method may declare checked exceptions.
B. The cleanupmethodmusthave noarguments andreturn void.
C. The cleanup method isexecuted inan unspecifiedtransactionand security context.
D. The developer should mark the cleanup methodwiththe @PreDestroy annotation.
E. The developershouldmark thecleanupmethodwiththe @PostDestroy annotation.
F. Thecleanup method is executed inthetransactionandsecurity context ofthelast business method invocation.

Answer: B, C, D
QUESTION: 46
Given code snippets from two files:

7.
public class Dog {
8.
public void onMessage(Message m) { System, out. print(“1 “);
9.
1
And
10.
@MessageDriven
11.
class MessageDog extends Dog implements MessageDrivenBean
12.
MessageDog(Message m){ System, out. print(“2 “); }
13.}
Which four code changes, when used together, create a valid JMS message-driven bean?
(Choose four.

A. Make class MessageDog public.

B. Make the MessageDog constructor no-arg.

C. Make the MessageDog constructor public.

D. Move the onMessage method to class MessageDog.
E. Change MessageDog so that it is NOT a subclass of Dog.
F. Make class MessageDog implement MessageListener instead of MessageDrivenBean.
Answer: A, B, C, F
QUESTION: 47 A developer writes a stateless session bean FooBean with one remote business interface FooRemote containing one business method foo. Method foo takes a single parameter of application-defined type MyData.
11.
public class MyData implements Java. io.Serializablej
12.
int a; 13.}
Method foo is implemented within the FooBean class as:

11.
public void foo(MyData data) {
12.
data.a = 2; 13.}
Another session bean within the same application has a reference to FooRemote in
variable fooRef and calls method foo with the following code:

11.
MyData data = new MyDatafJ;
12.
data.a = 1;
13.
fooRef.foo(data);
14.
System, out. println(data. a);
What is the value of data, a when control reaches Line 14 of the client ?

A. 0

B. 1

C. 2

D. either1or 2
Answer: B
QUESTION: 48
EJB 3.0 containers must provide a specific subset of which two APIs? (Choose two.

A. JSP APIs
B. JavaMailAPIs
C. JAX-WS APIs
D. Java CardAPIs
E. Sun Studio APIs
Answer: B, C
QUESTION: 49
Given the following code in an EJB 3.0 session bean:

10.
@Resource(name=”jdbc/employeeDB”)
11.
private DataSource dataSource;
12.
13.
public void lookupEmployee(String id) {
14.
InitialContext ic = new InitialContextO;
15.
// insert code here
16.
DataSource ds = (DataSource) obj;
17.}
Which code, inserted at Line 15, portably looks up the injected resource?

A. Object obj = ic.lookup(“employeeDB”);

B. Object obj = ic.lookup(“dataSource”);

C. Object obj = ic.lookup(“jdbc/employeeDB”);

D. Object obj = ic.lookup(“javacomp/env/employeeDB”);

E. Object obj = ic.lookup(“java:comp/env/jdbc/employeeDB”);
Answer: E
QUESTION: 50 Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?
A. SELECT ANY(r. chairs) FROM Room r
B. SELECT NEW Integer(MAX(r. chairs)) FROM Room r
C. SELECT r FROM Room r WHERE r.chairs > AVG(r.chairs)
D. SELECT c FROM Chair c WHERE LOCATE (c.type, lazyboy) > -1
Answer: B
QUESTION: 51

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.

Answer: A, D
QUESTION: 52 A developer creates the following session bean: 10..Stateless
11.
@RolesAllowed(“SECRET”)

12.
public class MyBean implements Mylnterface {

13.
public void methodAOJ}

14.
@PermitAII

15.
public void methodB0 {}

16.
@DenyAII

17.
public void methodC0 {}

18.
} No deployment descriptor is supplied. Which two statements are true? (Choose two.)
A. Auserin the role “SECRET” will be able to accessallof the methods.
B. A user inthe role”FOO” will be able to accessmethodAandmethodB.
C. A user withoutanyrolewill beable to accessmethodBbut NOTmethodA.
D. A user in the role “SECRET”willbe able to accessmethodA andmethodB.
E. A userintherole “SYSADM” will be abletoaccessmethodA,methodB, and methodC.
Answer: C, D
QUESTION: 53

A developer wants to create a Java Persistence query to perform a bulk update operation on five different entity classes. All of these classes have a field called name. These classes have the following relationships: Harrier extends Dog and Dog extends Animal Vet extends Doctor What is the minimum possible number of operations required to change the value of the name field for all of the entities in all five classes?
A. 1
B. 2
C. 3
D. 4
E. 5
Answer: B

QUESTION: 54
A developer writes an enterprise application and packages it into an .ear file. The application contains two persistence units defined at the .ear level with persistence unit names FooPU and BarPU. The application also contains an ejb-jar with one stateless session bean. Which code, when added to the stateless session bean class, injects an EntityManagerFactory at runtime?
A. PersistenceUnit private EntityManagerFactory emf; B. PersistenceContext private EntityManagerFactory emf;
C. PersistenceUnit(unitName=”BarPU”) private EntityManagerFactory emf;
D. Resource(name=”BarPU”, type=EntityManagerFactory.class) private EntityManagerFactory emf;

Answer: C
QUESTION: 55 A developer is working on a user registration application using EJB 3.0. A business method registerUser in stateless session bean RegistrationBean performs the user registration. The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes

registerUser again with corrected data using the same transaction. Which design can
meet this requirement?
A. Have registerUser method call EJBContext.setRollbackOnlyOmethodafter registration fails.
B. Have registerUser method throw javax.ejb.EJBTransactionRequiredExceptionafterregistration fails.
C. HaveregisterUser method throw EJBException without marking the transaction for rollback, after registration fails.
D. Create an application exception withtherollbackattributeset to falseandhave registerUser method throwit afterregistration fails.

Answer: D
QUESTION: 56
Which statement is true about the Timer service in an EJB 3.0 stateless session bean?

A. The timeout callback method contains the business logic that handles the timeout event.
B. The timeout callback method must be declared as a business method in business interfaces.
C. The timeout callback method can throw application exceptions to report business logic failures.
D. A bean class can implement multiple timeout callback methods, each associated with a different timer.

Answer: A
QUESTION: 57 A developer wants to create a portable EJB 3.0 application that includes the following class definition for the Entity Account: 11..Entity
12.
@Entityl_isteners(com. acme.AlertMonitor. class)

13.
public class Account {

14.
// more code here

15.
@PrePersist

16.
protected void validateCreate0 {/* more code here */} 17.}

Which statement is correct?
A. The validateCreate method may NOT throwruntimeexceptions.
B. ThevalidateCreate method can invoke the EntityManager.flush operation.
C. Methods oftheclass com.acme.AlertMonitor annotatedwithcallback annotationsmusttake an Object or Account instance astheonly argument.
D. The above class definition is NOT correct. An entity cannot defineacallback methodlike PrePersistand use the EntityListeners annotationatthe same time.

Answer: C
QUESTION: 58
Given this code snippet from a JMS message-driven bean class X:

11.
public XQ { System, out. print(“1 “); }
12.
public void onMessagefMessage m) throws Java. rmi. RemoteException
13.
try {
14.
TextMessage tm = (TextMessage) m;
15.
String text = tm.getText0;
16.
System, out. print(“2 “);
17.
} catch (JMSException e) {
18.
throw new java. rmi. RemoteExceptionQ;
19.}
20.}
When this bean class handles a message, which is correct?

A. After a messagedelivery theresultis1.

B. Aftera message delivery the resultis2.

C. Aftera message delivery the result is12.

D. Afteramessage delivery an exception isthrown.

E. After a message delivery the resultisunpredictable.

F. This isNOTanEJB3.0 compliant bean.
Answer: F
QUESTION: 59 FooBean is an EJB 3.0 session bean that can make valid use of UserTransaction. Which is guaranteed to work in an EJB container for FooBean to obtain the UserTransaclion object?

A. Invoke a method on a SessionContext that returns a UserTransaction object.
B. Perform JNDI lookup with name “java:/UserTransaction” on an InitialContext.
C. Perform JNDI lookup with the name “jdbc/UserTransaction” on an InitialContext.
D. Use the @TransactionManagement annotation to inject an instance variable of type UserTransaction in a bean class.

Answer: A
QUESTION: 60
An Application Assembler is given the following stateless session bean:
10..Stateless public class MyBean implements Mylnt {

11.
@RolesAllowed(“SECRET”)
12.
public void methodA(int x) {}
13.
public void methodA(String y) {}
14.
public void methodB(String z) {}
15.
}
A deployment descriptor is also supplied, a portion of which reads as follows:

20.
<method-permission>
21.
<role-name>AGENT</role-name>
22.
<method>
23.
<ejb-name>MyBean</ejb-name>
24.
<method-name>methodA</method-name>
25.
</method>
26.
</method-permission> Which statement is true?

A. A client in any rolewill beabletoaccess anyof themethods.

B. Aclient inthe role “AGENT” willbeable to access any ofthemethods.

C. A client in therole”SECRET” will be able to access any of the methods.

D. A client in the role “AGENT” will be abletoaccess methodB and
methodA(String), but not methodA(int).

E. Aclient in the role “SECRET” will beableto access methodA(int) and methodB,
but NOT methodA(String).
Answer: B
QUESTION: 61
A deployer is given the following session bean:
10..Stateless
11.
@RolesAllowed(“BATH”)

12.
@DeclareRoles(“SOAP”)

13.
public class ShowerBean implements Shower {

14.
public void plugO {} 15.}
and the following associated excerpt from the ejb-jar.xml descriptor file:

20.
<assembly-descriptor>
21.
<security-role>
22.
<role-name>TOWEL</role-name>
23.
</security-role>
24.
</assembly-descriptor>
Which roles is the deployer expected to map to users or user groups?

A. TOWEL

B. BATHandSOAP

C. BATH and TOWEL

D. BATH and SOAP and TOWEL
Answer: D
QUESTION: 62 A developer wants to release resources within a stateless session bean class. The cleanup method should be executed by the container before an instance of the class is removed. The deployment descriptor is NOT used. Which three statements are correct? (Choose three.)
A. The cleanup method may declare checked exceptions.
B. The cleanupmethodmusthave noarguments andreturn void.
C. The cleanup method isexecuted inan unspecifiedtransactionand security context.
D. The developer should mark the cleanup methodwiththe @PreDestroy annotation.
E. The developershouldmark thecleanupmethodwiththe @PostDestroy annotation.
F. Thecleanup method is executed inthetransactionandsecurity context ofthelast business method invocation.

Answer: B, C, D
QUESTION: 63
Which statement is true about the Timer service in an EJB 3.0 stateless session bean?
A. The timeout callback method contains the business logic that handles the timeout event.
B. The timeout callback method must be declared as a business method in business interfaces.
C. The timeout callback method can throw application exceptions to report business logic failures.
D. A bean class can implement multiple timeout callback methods, each associated with a different timer.

Answer: A
QUESTION: 64 Which is a valid way of injecting a container-managed transaction-scoped persistence context into an EJB 3.0 session bean assuming the application contains only one persistence unit?
A. @PersistenceUnit public EntityManager em;
B. @PersistenceContext private EntityManager em;
C. @TransactionManagement(TransactionManagementType. CONTAINER) public EntityManager em;
D. @Resource(name=”persistence/em”, authenticationType=AuthenticationType. CONTAINER) protected EntityManager em;

Answer: B
QUESTION: 65 A developer wants to perform programmatic access control inside EJB 3.0 session beans. This is needed because some permissions can be determined only at application runtime. Which method achieves this goal?
A. javax.ejb.EJBContext.getRollbackOnlyO
B. java.lang.SecurityManager.checkAccess(Thread t)
C. javax. interceptor. InvocationContext. getTargetO
D. javax. ejb. SessionContext.isCallerlnRole(String roleName)
E. javax. servlet. http. HttpServletRequest. getUserPrincipalQ
Answer: D
QUESTION: 66
Given the following entity class:

11.
@Entity public class Customer)
12.
@ld private int id;
13.
private transient String name;
14.
private Java. math. BigDecimal grossAmmount;
15.}
Which mapping annotation can be added to the fields of this entity?

A. @Columntothe name field

B. @Embeddedldto theid field

C. @Basictothe grossAmmountfield

D. @JoinColumnstothe grossAmmount field
Answer: C
QUESTION: 67 A developer writes a stateless session bean FooBean with one remote business interface FooRemote containing one business method foo. Method foo takes a single parameter of application-defined type MyData.
11.
public class MyData implements Java. io.Serializablej
12.
int a;
13.}
Method foo is implemented within the FooBean class as:

11.
public void foo(MyData data) {
12.
data.a = 2;
13.}
Another session bean within the same application has a reference to FooRemote in
variable fooRef and calls method foo with the following code:

11.
MyData data = new MyDatafJ;
12.
data.a = 1;
13.
fooRef.foo(data);
14.
System, out. println(data. a);
What is the value of data, a when control reaches Line 14 of the client ?

A. 0
B. 1
C. 2
D. either1or 2

Answer: B
QUESTION: 68 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
Answer: A
QUESTION: 69 A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of business logic has been implemented and tested in these EJB 2.1 session beans. Some EJB 3.0 session beans need to access this business logic. Which design approach can achieve this requirement?
A. Add adapted home interfaces to EJB 3.0 session beans to make EJB 3.0 and EJB 2.1 session beans interoperable.
B. Add EJB 3.0 business interfaces to existing EJB 2.1 session beans and inject references to these business interfaces into EJB 3.0 session beans.

C. No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject
a reference to the EJB 2.1 home interface into the EJB 3.0 bean class.
D. No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a reference to the EJB 2.1 component interface into the EJB 3.0 bean class.

Answer: C
QUESTION: 70 A developer wants to implement a relationship between Company and Department entity classes. Every department belongs to one company, and one company has several departments. In this application it is essential to quickly determine which company a department belongs to and to also easily access all departments of a given company. Which two declarations provide a solution to these requirements? (Choose two.)
A. In class Department
@ManyToOne
private Company company;

B. In class Department
@OneToMany private
Company company;

C. In class Department:
@OneToMany(mappedBy=”department”) private Collection<Company> companies;

D. In class Company:
@ManyToOne(mappedBy=”company”)
private Collection<Department> departments;

E. In class Company:
@OneToMany(mappedBy=”company”)
private Collection<Department> departments;
Answer: A, E

Get certified Oracle 1Z0-860 is a guaranteed way to succeed with IT careers.We help you do exactly that with our high quality Oracle 1Z0-860 Certification Certified Information Systems Security Professional training materials.

Welcome to download the newest Examwind C_HANATEC151 dumps: http://www.examwind.com/C_HANATEC151.html

EMC E20-598 Exams, Recenty Updated EMC E20-598 Study Guide Book Online

Oracle 1Z0-879 Cert Exam, Most Important Oracle 1Z0-879 Demo Free Download With New Discount

Important Info: These new valid Microsoft 70-659 exam questions were updated in recent days by Flydumps,please visit our website to get the full version of new Microsoft 70-659  exam dumps with free version of new VCE Player,you can pass the exam easily by training it!

QUESTION 1
Your x86-based server will not boot Solaris 10 OS. You discover that you need to restore your pboot and boot block on the / (root) slice located on disk c0d0. You first boot off of the CD-ROM or DVD into single user mode. What commands should you run to restore the pboot and boot block on the slice?
A. # cd /usr/lib/ufs# installboot /dev/rdsk/c0d0s0
B. # cd /usr/platform/`uname -m`/lib/fs/ufs # install -bootblock -pboot /dev/rdsk/c0d0s0
C. # cd /usr/platform/`uname -m`/lib/# install-pboot /dev/rdsk/c0d0s2 -b bootblock /dev/rdsk/c0d0s2
D. # cd /usr/platform/`uname -m`/lib/fs/ufs # installboot /usr/platform/`uname -i`/lib/fs/ufs/pboot \/usr/ platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0d0s2
Correct Answer: D
QUESTION 2
A snapshot of the /export/project file system has been taken. Prior to backing up the file system, you need to check to see if certain files are on the snapshot. The snapshot needs to be mounted to check for these files. Which command will mount the snapshot?
A. mount -F ufs -o ro /dev/fssnap/0 /check
B. mount -F ufs -o rw /dev/fssnap/0 /check
C. mount -F ufs -o ro /export/project /check
D. mount -F ufs -o rw /export/project /check
Correct Answer: A
QUESTION 3
You created a snapshot of the /data2 filesystem as follows:
# fssnap -F ufs -o bs=/data2/snap /data2
But, the system responds with the following error:
snapshot error: Invalid backing file path
What is the problem?

A. The /data filesystem does not exist.
B. This message indicates that the /data2/snap directory does not exist.
C. The name of the Backing Store is incorrect, it should be /dev/fssnap/0
D. This message indicates that you cannot have the backing store file on the same filesystem as the filesystem being snapped.
Correct Answer: D
QUESTION 4
The /export/home file system is running out of space on c0t0d0s7. You added a new disk to the system and it is named c1t1d0. You need to move the /export/home file system to slice 7 on the new disk. Which command is used to move the data from /export/home to the new disk after booting the server to the single-user milestone?
A. mount /dev/dsk/c1t1d0s7 /mnt ; ufsdump 0ucf – \ /dev/rdsk/c0t0d0s7 | (cd /mnt; ufsrestore xf – )
B. ufsdump 0ucf – /dev/rdsk/c0t0d0s7 | ufsrestore xf – \ /dev/rdsk/c1t1d0s7
C. ufsdump 0ucf – /dev/rdsk/c0t0d0s7| ufsrestore xf – \ /dev/rdsk/c1t1d0s7
D. mount /export/home; ufsdump 0ucf – /export/home | \ ufsrestore xf – /dev/dsk/c1t1d0s7
Correct Answer: A
QUESTION 5
You need to restore some files from a file system. The file system was backed up from a snapshot. Which command will correctly restore these files?
A. fssnap -i
B. fssnap -r
C. ufsrestore -i
D. snaprestore -i
Correct Answer: C
QUESTION 6
After you back up /export using a file system snapshot, and you have removed the snapshot, you also need to remove the backing store. If the snapshot was created with: # mkdir /var/tmp/backup-snaps # fssnap -o bs=/var/tmp/backup-snaps /export
Which file do you need to remove?
A. /var/tmp/backup-snaps
B. /var/tmp/backup-snaps/0
C. /var/tmp/backup-snaps/snapshot
D. /var/tmp/backup-snaps/snapshot0
Correct Answer: D
QUESTION 7
When using the Preboot Execution Environment to boot and install the OS over the network on x86 / x64 based systems, which of the following are required? (Choose three.)
A. A DHCP server.
B. PXE network adapter.
C. An install server which must be x86-based.
D. A boot server supporting ARP and RARP services.
E. An install server which can be SPARC or x86-based.
F. PXE network boot must be supported in the BIOS of the x86-based system.
Correct Answer: ABE
QUESTION 8
A corrupted file system is now repaired and back in use. Some, but not all of the files within the file systems have been deleted. The only backup of this file system is a month-old tar archive. This archive will need to be restored as root. Which two statements correctly describe the effects of the restore operation? (Choose two.)
A. Files found in the file system that are also on tape will NOT be overwritten.
B. The missing files, present on the backup tape, are restored to the file system with the data as it was when the backup was taken.
C. The access times are preserved by tar and will reflect the time when a user last accessed the data.
D. The modification time on the files restored by tar will be preserved and will reflect the time the file was last modified before the backup, NOT the time of the restore operation.
Correct Answer: BD
QUESTION 9
A file system has been corrupted and needs to be restored. Which file contains the ufsdump levels for this file system?
A. /etc/backup
B. /etc/ufsdump
C. /etc/dumpdates
D. /etc/fsdumpdates
Correct Answer: C
QUESTION 10
While selecting files during an interactive restore with ufsrestore, you are interrupted by a junior administrator before you can complete the file selection process and start the restore. After answering the administrator’s question, you realize that you have forgotten which files you had already selected for the restore. How can you determine which files are already marked for extraction and restore?
A. You can use the ls subcommand of ufsrestore.
B. You can use the add subcommand of ufsrestore.
C. You can use the select subcommand of ufsrestore.
D. You can view the selected files as they are marked with a plus sign (+) in the list that is permanently displayed in the upper half of the interactiveufsrestore screen view.
Correct Answer: A
QUESTION 11
You need to change the hostname and IP address of a server. Without manually editing all of the required files, which command can be run to restore a system configuration to an unconfigured state, ready to be reconfigured again restore a system configuration to an unconfigured state, ready to be reconfigured again?
A. /usr/sbin/sys-unconfig
B. /usr/sbin/unconfig
C. /sbin/ipconfig
D. /usr/sbin/set_parms initial
Correct Answer: A
QUESTION 12
A host named client12 is having difficulty communicating with a heavily used server named server14. The server14 server has the ce0, ce1, ce4, and qfe4 interfaces active. The client12, admin6, and appserv5 hosts are all on a private network and access the ce4 interface on server14 exclusively and cannot access other network interfaces on server14. The appserv5 and admin6 hosts are currently generating heavy traffic to server14 due to a running batch process. Which two commands can you run on server14 to look at the network traffic generated between only client12 and server14 to assist in troubleshooting the communication issue? (Choose two.)
A. snoop !admin6
B. snoop -d client12
C. snoop -d ce server14
D. snoop -d ce4 client12
E. snoop -d ce4 client12 server14
F. snoop -i ce4 server14 client12
Correct Answer: DE
QUESTION 13
To save time configuring some custom network facilities, a junior administrator in your company attempts to copy some entries from the /etc/inetd.conf file on a Solaris 8 OS server into the /etc/inetd.conf on a Solaris 10 OS server. The junior administrator is unable to determine why services do not start. Which two commands can you run on the Solaris 10 OS server to start the services? (Choose two.)
A. inetconv -f
B. inetcfg -i /etc/inetd.conf
C. inetcfg -o /etc/inetd.conf
D. inetconv -f -i /etc/inetd.conf
E. inetconv -forceimport -o /etc/inetd.conf
Correct Answer: AD QUESTION 14
When your Solaris system is booted, a startup script initializes the rpcbind service. Which script is it?
A. /lib/svc/method/net-physical
B. /etc/rcS.d/S30network
C. svc:/network/rpc/bind:default
D. /lib/svc/method/rpc-bind

Correct Answer: D QUESTION 15
You need to register your x86-based system on a JumpStart server. Which option specifies that this x86 system is a DHCP client?
A. -d
B. -e
C. -c
D. -p

Correct Answer: A QUESTION 16
You have just configured the network interface on systemA. The following information is displayed pertaining to the network interface on systemA:

From systemB, you test the network connectivity by sending ICMP ECHO_REQUEST packets to systemA.
The following message is displayed:
no answer from systemA
What is most likely the problem?

A. The interface is not plumbed.
B. The interface is not configured.
C. The interface does not have valid routes configured.
D. The interface is not marked as

Correct Answer: D
QUESTION 17
Youe just configured the network interface on You?e just configured the network interface on systemA and the following information is displayed pertaining to systemA’s network interface:

You have been instructed to change the name of this system to systemB. Which four files need to be modified to change the name of this system from systemA to systemB? (Choose four)
A. /etc/nodename
B. /etc/hostname.rtls0
C. /etc/hostname
D. /etc/inet/hosts
E. /etc/domainname
F. /etc/inet/ipnodes
G. /etc/inetd.conf

Correct Answer: ABDF
QUESTION 18
Your company security policy does not allow you to connect your servers directly to the internet. You would like to utilize some of theYour company? security policy does not allow you to connect your servers directly to the internet. You would like to utilize some of the functionality in Solaris 10 to analyze your systems for available OS updates, and also download and install those updates from Sun Microsystems. Which answer describes how to utilize this functionality to analyze your systems for available OS updates, and also download and install those updates without connecting your server directly to the internet?
A. Get the patches on DVD and use Solaris 10 patch manager tools to analyze your server against the updates on the DVD.
B. Connect your server via sftp only when you need to analyze your server for updates.
C. Use the update manager proxy software and re-direct the client to look for updates on the proxy server.
D. You will not be able to use the update utility to automatically search for updates at Sun Microsystems because the utility requires connecting to a Sun server over the internet.

Correct Answer: C
QUESTION 19
In Solaris 10, this tool provides an automated and proactive approach to patch management. It provides a graphical user interface as well as a command line interface. Which tool is it?
A. smpatch
B. Patchtool
C. Update manager
D. Patch manager

Correct Answer: C
QUESTION 20
You need to quickly obtain the physical and logical device names for the disks attached to the server. Which command achieves this?
A. config
B. format
C. devices
D. prtconf | grep name

Correct Answer: B

Acquiring Oracle 1Z0-879 certifications are becoming a huge task in the field of I.T. More over these exams like Oracle 1Z0-879 exam are now continuously updating and accepting this challenge is itself a task.This Oracle 1Z0-879 practice test is an important part of Microsoft certifications and at Oracle 1Z0-879 certification Flydumps we have the resources to prepare you for this.The Oracle 1Z0-879 exam is essential and core part of Oracle 1Z0-879 certifications and once you clear the exam you will be able to solve the real time problems yourself.

Oracle 1Z0-872 PDF-Answers, Money Back Guarantee Oracle 1Z0-872 Demo Free Download For Sale

New VCE and PDF– You can prepare Oracle 1Z0-872 exam in an easy way with Flydumps Oracle 1Z0-872 questions and answers.By training our vce dumps with all Oracle 1Z0-872 the latest questions,you can pass the exam in the first attempt.

QUESTION: 1 When executing multi-row operations, what should be the first thing you look for to see if anything unexpected happened?
A. Warning/Error Count.
B. Warning/Error Codes.
C. Warning/Error messages.
Answer: A
QUESTION: 2 Which of the following is a valid method to restrict the amount of records returned from SHOW WARNINGS?
A. SHOW WARNINGS LIMIT
B. SHOW WARNINGS LIMIT
C. limit can not be used with show warnings

Answer: A,B
QUESTION: 3 Consider the following statement: show COUNT (*) warnings what would be the result of executing this statement?
A. An error would be returned, as this is not valid syntax.
B. The number of current warnings would be returned.
C. The total number of warnings server-wide would be returned

Answer: B
QUESTION: 4
Which of the following describe situations when MySQL generates warnings?

A. When it is not able to completely fulfill a request.
B. When a system-level error occurs.
C. When an action has possible unintended side-effects.

Answer: A,C
QUESTION: 5
Which of the following statements are true?

A. The MylSAM storage engine should be preferred when you expect many reads and few updates to occur
B. The MylSAM storage engine should be preferred when you expect a mix of many reads and many updates to occur
C. The InnoDB storage engine should be preferred when you expect many reads and few updates to occur
D. The InnoDB storage engine should be preferred when you expect a mix of many reads and many updates to occur

Answer: A,D
QUESTION: 6 For maximum efficiency in join operations of one column from each of two tables, which of the following statements regarding indexes are true?
A. In a LEFT JOIN such as table1 LEFT JOIN table2 ON table1 .a = table2.b, the column b in table2 should always be indexed
B. A LEFT JOIN would not benefit from either of the participating columns being indexed
C. In an INNER JOIN, either, but not both, columns participating in the join should be indexed
D. In an INNER JOIN, both columns participating in the join should be indexed
E. An INNER JOIN would not benefit from either of the participating columns being indexed F. In a LEFT JOIN such as table 1 LEFT JOIN table2 ON table 1 .a = table2.b, the column a in table 1should always be indexed

Answer: A,D
QUESTION: 7
Which of the following are valid optimization techniques?

A. Rewrite queries to use indexes
B. Use EXPLAIN

C. Use ORDER BY

Answer: A,B
QUESTION: 8
Which of the following best describes the major trade-offs for MylSAM fixed-length types vs.
variable-length types, respectively?

A. Fixed-length are slower, but require less disk space, as variable-length are faster, but require more disk space.
B. Fixed-length are faster and require less disk space, as variable-length are slower and require more disk space.
C. Fixed-length are faster, but require more disk space, as variable-length are slower, but require less disk space.
D. Fixed-length are slower and require more disk space, as variable-length are faster and require less disk space.

Answer: C
QUESTION: 9 Which of the following best describes how a column prefix index works and why its an advantage?
A. A Column prefix allows for a shorter index, making it read less from disk,
B. A Column prefix allows for a shorter index name, making less code to be written.
C. A Column prefix is another name for a left-most prefix, which is usefully with multi- column indexes.

Answer: A
QUESTION: 10 Using column prefix indexing helps reduce
A. The amount of time to write a query
B. The number of results returned
C. The amount of disk I/O needed
D. The amount of disk space needed

Answer: C,D QUESTION: 11

Assuming you want to add an index on the isofficial  column, which of the following statements are true?
A. A SELECT query with WHERE lsOfficial=’T’ will perform much faster with the index because there aren’t many rows with that value.
B. A SELECT query with WHERE IsOfficial-‘F’ will perform much faster with the index because there are many rows with that value.
C. A SELECT query with a WHERE condition on the IsOfficial column won’t perform much faster because there are only few distinct values.
D. Each UPDATE or INSERT statement will take longer because the additional index needs to be maintained.
E. You cannot add an index on ENUM columns.

Answer: C,D
QUESTION: 12 When performing a select for a value that is in an index
A. the row may be used exclusively to return the data
B. the index may be used exclusively to return the data
C. both the row and the index are always used to return the data

Answer: B
QUESTION: 13
You have a view person age which contains these rows:

If the view definition includes where age >= 17 with check option what will happen when the following statement is executed? UPDATE person_age SET age = 16
A. No rows will be changed because with check option prevents changing rows to values less than 17.
B. The age in all rows will be changed to 16 and with check option will cause all rows to become invisible within the view because all now have an age less than 17.
C. The age in all rows will be changed to 16 and with check option will keep all rows visible in the view because they started in it.

Answer: A
QUESTION: 14
Consider the following statement:
TER VIEW v_USCity AS
SELECT Name FROM City WHERE CountryCode = ‘USA’
What would be the result if the above statement was issued and the view v_uscity did not
previously exist?

A. The view v_uscity would be created.
B. An error would be issued that the view v_uscity does not exist.
C. A warning would be issued that the view v_uscity does not exist, then it would create it.
D. The query would appear to have executed, but no action on that view would occur.
Answer: B

QUESTION: 15
Consider the following statement:
ALTER VIEW v_city AS SELECT Name FROM City WHERE CountryCode
Which of the following statements are equivalent to the above example?

A. mysql> DROP VIEW v_city;
mysql> CREATE VIEW v_city AS
-> SELECT Name FROM City WHERE CountryCode = ‘FIN’;

B. mysql> CHANGE VIEW v_city AS
-> SELECT Name FROM City WHERE CountryCode = ‘FIN1;

C. mysql> DROP VIEW v_city;
mysql> ALTER VIEW v_city AS
-> SELECT Name FROM City WHERE CountryCode = ‘FIN’;

D. mysql> DROP VIEW IF EXISTS v_city; mysql> CREATE VIEW v_city AS -> SELECT
Name FROM City WHERE CountryCode = ‘FIN’;

Answer: A
QUESTION: 16 Consider the following statement: DROP VIEW CityPop, CountryCodes, StatePop All three views exist at the time the statement is executed. Which of the following results should be expected when executing the statement?
A. An error message  will be issued  for  trying to drop more than one view in a single statement.
B. A warning message is issued for trying to drop more than one view in a single statement.
C. All the views will be successfully destroyed.
D. The first view will be destroyed if it is not dependent on the following two views.

Answer: C
QUESTION: 17
Is the following statement true or false?
“All tables referenced by the underlying SELECT of a view must exist at its creation time.”

A. true

B. false

Answer: A
QUESTION: 18 For which of the following create view statements will MySQL elect to use the temptable algorithm? Assume each select is syntactically correct.
A. CREATE VIEW spanishCountries AS SELECT Country.Name   FROM Country,
CountryLanguage
WHERE Country.Code = CountryLanguage.CountryCode AND C o unt r yL
anguage.Language =
‘Spanish’

B. CREATE VIEW spanishCount AS SELECT COUNT(*) as count FROM
CountryLanguage
WHERE Language = ‘Spanish’

C. CREATE VIEW officialLanguages AS SELECT DISTINCT Language FROM
CountryLanguage
WHERE IsOfficial = ‘T’

D. CREATE VIEW lowestLanguages AS
SELECT Language, MIN(Percentage) as  lowest  FROM Country Language GROUP BY
Language

Answer: B,C,D
QUESTION: 19
Which of the following statements are true?

A. A view created with the temptable algorithm is not updatable.
B. A view containing a group BY clause is not updatable.
C. A view containing a where clause is not updatable.
D. A view containing a having clause is not updatable.

Answer: A,B,D
QUESTION: 20 mysql> SELECT * FROM friends; The following select statement will return the id, username, friend’s name and birthdate of any user that is also a friend whose birthday falls in the current month. SELECT users.id, users.name, friends.name, friends.birthdate FROM users JOIN friends ON users.id = friends.userid WHERE MONTH{friends.birthdate} = MONTH{CURDATE}} Will the following create view statement successfully create a view of this select? If not, why? CREATE VIEW currentBirthdays AS SELECT users.id, users.name, friends.name, friends.birthdate WHERE MONTH(friends.birthdate J = MONTH(CURDATE()}

A. Yes.
B. No; all column names within a view must be unique.
C. No; the syntax is incorrect.
D. No; functions with variable output like curdate may not be used with views.
Answer: B
QUESTION: 21

With the products Oracle 1Z0-872 for training and preparation of testing you would not only significantly reduce your fees, but pass your exam. We obtain our products from Authorities experts from test center.We give you the best path to successful completion of your exam to the real and original exam questions and answers for Oracle 1Z0-872 .

Oracle 1Z0-863 Exam Test Questions, Help To Pass Oracle 1Z0-863 Dump Test Will Be More Popular

Free Sharing Flydumps Oracle 1Z0-863 exam questions and answers are constantly being revised and updated for relevance and accuracy.Many candidates has passed the Oracle 1Z0-863 exam easily by training the new version.100% pass rate.

QUESTION NO: 1
Which two statements are true about JAXR support for XML registries? (Choose two.)
A. The CapabilityProfile tells a client the capability level of a registry.
B. UDDI registries must support ebXML to be compatible with JAXR.
C. The UnsupportedCapabilityException is processed for errors from non-Java providers.
D. The JAXR API declares methods as level 0 or level 1.
E. JAXR registry clients present an XML schema that defines the infomodel for the provider.
Answer: A,D
QUESTION NO: 2
Which two statements are true about the interaction between a JAXR 1.0 client and a UDDI registry? (Choose two.)
A. A JAXR client can delete an organization that it published.
B. A JAXR client CANNOT delete any of the entries in a UDDI registry.
C. A JAXR client must use HTTPS for updating the information in a UDDI registry.
D. A JAXR client can query and update the information in a UDDI registry using HTTP.
E. A JAXR client can delete an organization that it published only if the protect property is set to False.
Answer: A,C

QUESTION NO: 3
Which JAXR interface allows querying a business registry using SQL commands?
A. javax.xml.registry.Connection at level 0
B. javax.xml.registry.FederatedConnection at Level 1
C. javax.xml.registry.BusinessQueryManager at level 0
D. javax.xml.registry.DeclarativeQueryManager at level 1
E. javax.xml.registry.BusinessQueryManager at level 1
F. javax.xml.registry.DeclarativeQueryManager at level 0
Answer: D QUESTION NO: 4

Which two statements are true about the interoperability of Web services developed using the Java EE 5 platform? (Choose two.)
A. Interoperability is improved by restricting access only to Java clients.
B. EJB-based endpoints are more difficult for .NET clients to access.
C. Only servlet-based endpoints are used when exposing services to non-Java clients.
D. Exposure is limited to simple arrays of concrete types as the signature of Web service methods.
E. The service must be published in both the .NET and Java UDDIs.
F. Testing for WS-I Profile conformance improves interoperability.
Answer: D,F
QUESTION NO: 5
A company needs to process DOM documents received from its customers through an EJB3 endpoint. Which two APIs will a developer need to invoke to process these DOM documents? (Choose two.)
A. UDDI
B. JAXR
C. JAXP
D. JAX-WS
E. JAXB
F. StAX
Answer: C,F

QUESTION NO: 6
What are two valid facts about WS-I? (Choose two.)
A. The I-Stack is a great development tool.
B. The WS-I promotes and supports generic protocols for the interoperable exchange of messages.
C. The WS-I governs languages and protocols such as SOAP, WSDL, and UDDI.
D. The WS-I specifies specific rules that address either weaknesses in component specifications or issues of how to combine the collected technology.
E. The WS-I has been a guiding force in creating StAX.
Answer: B,D
QUESTION NO: 7
A company is building a Java EE 5 purchase order processing system. This system will integrate with an external invoicing system as part of the purchase order approval process. A developer created a new client application to access the invoicing system using request-response, but a new service call is receiving errors every time it invokes the necessary Web service.
Which statement is true about the Body element of the SOAP reply message?
A. It must NOT contain any fault elements.
B. It will contain a fault element for each error.
C. It will contain exactly one fault element.
D. It must contain zero or one fault element.
E. It must contain an array of fault elements.

Answer: D

QUESTION NO: 8
A company is building a customer relationship management system that is to be deployed on a customer’s network, and they want software functions to be reused and combined in different modules in the system. The Director of Technology has determined that the new system should utilize both Web services and a Service Oriented Architecture (SOA). Which two statements about Web services in an SOA are correct? (Choose two.)
A. A Web service must be discovered from a UDDI registry in an SOA.
B. SOA and Web services both use the HTTP protocol at the transport layer.
C. A Web service must publish itself to a UDDI registry to become part of an SOA.
D. SOA is a way to design a system and Web services are a possible implementation.
E. SOA is used for stateless invocations, and Web services for stateful invocations.
F. SOA emphasizes the concept of service encapsulation and Web services fulfill a service contract.
Answer: D,F
QUESTION NO: 9
A company’s new investment management Java application and a legacy stock trader application need to communicate, but they use different JMS implementations. A developer decides to implement a JMS bridge to solve the problem. Which two advantages does this pattern provide? (Choose two.)
A. It converts the interface of a class into another interface that clients expect.
B. It decouples an abstraction from its implementation so that the two can vary independently.
C. It dynamically attaches additional responsibilities to an object.
D. It optimizes network traffic.
E. It is vendor independent.
Answer: B,E

QUESTION NO: 10
Which two statements are true about the Web services? (Choose two.)
A. SOAP messages are compressed during transport.
B. You must implement session tracking via HTTP cookies.
C. The WSDL defines services as collections of network endpoints.
D. All data shared between Java and non-Java components must be in XML format.
E. Data interchange is standardized in XML.
F. Stateful Web services must be implemented in a heterogeneous environment.
Answer: C,E
QUESTION NO: 11
A team of developers is describing a set of endpoints in their new SOA application.
Given the WSDL extract:
<service name=”InventoryServices”>
<port name=”PurchaseOrder” binding=”tns:POBinding”>
<soap:address location=”http://192.168.0.2:8080/inventory”/>
</port>
<port name=”Invoice” binding=”tns:InvoiceBinding”>
<soap:address location=”http://192.168.0.2:8080/inventory”/>
</port>
</service>
Which statement is true about this WSDL extract?
A. The extract is WS-I Basic Profile 1.1 compliant because both port element names are different.
B. The extract is NOT WS-I Basic Profile 1.1 compliant because both port elements point to the same location.
C. The extract is WS-I Basic Profile 1.1 compliant because both port elements point to different binding elements.
D. The extract is NOT WS-I Basic Profile 1.1 compliant because it contains two port elements in the same service.
E. The extract is WS-I Basic Profile 1.1 conformant because both port element names are different.
F. The extract is WS-I Basic Profile 1.1 conformant because the port, binding, and service element combinations are unique.
Answer: B

QUESTION NO: 12
Which two statements are true about the role of XML schemas in Web services? (Choose two.)
A. DTDs provide stricter data typing than XML schemas.
B. XML schemas can be used to validate the organization of XML documents.
C. XML schemas contain a vocabulary, content model and data types.
D. DTDs are easier to map to Java than XML schemas, and so remain more popular.
E. The W3C recommends that XML schemas be referred to as XSD.
F. The W3C has designated that XML schemas be referred to as WXS.
Answer: B,C
QUESTION NO: 13
A developer must modify an existing Web service client program. XML used by the service must be updated and archived for use in other systems. The developer chooses the Dispatch API. Which two statements are true about this approach? (Choose two.)
A. Dispatch is generic and can be instantiated for use with XML or SOAP.
B. The Web service can be either SOAP or REST-based.
C. The Dispatch instance must be created in Service.Mode.PAYLOAD mode in order to use SOAP.
D. Instantiating Dispatch Service.Mode.MESSAGE mode allows you to work directly with the XML message.
E. It is unnecessary to use JAXB with the Dispatch API.
Answer: A,B

QUESTION NO: 14
Which two statements are true about JAX-WS support for data bindings? (Choose two.)
A. Data binding is performed with only generated classes to reduce errors and hide complexity.
B. JAXB 2.0 is preferred.
C. Inline binding declarations with XML Schema are NOT supported for JAXB 2.0.
D. SAAJ 1.3 is supported for data binding with SOAP.
E. JAX-RPC data binding is recommended for cross-platform interoperability.
Answer: B,D

QUESTION NO: 15
A developer needs to write a Web service that supports user sessions that timeout after 120 seconds. Which configuration file is correct for the developer use?
A. web.xml
B. server.xml
C. ejb-jar.xml
D. service-config.xml

Answer: A

QUESTION NO: 16
Which two statements are true about the I-Stack and annotations technologies? (Choose two.)
A. With 64-bit Java, JAXB compatible parameters are preferred for performance.
B. @WebMethod is required for private methods, but public methods are exposed in any service automatically.
C. Declaring business methods final is a good way to protect the integrity of the implementation class.
D. Method parameters and return types must be compatible with the JAXB 2.0.
E. JAX-WS uses annotations to invoke Web service requests at runtime.
Answer: D,E
QUESTION NO: 17
Which two statements are true about creating a Web service with JAX-WS? (Choose two.)
A. Stateless Web services must be created with HTTP servlet endpoints.
B. Creating the portable artifacts by hand is slow, but makes a service easier to maintain.
C. All Java-based endpoints share a common packaging model.
D. EJBs can serve as endpoints if hosted in a container with runtime and service support.
E. JAX-WS supports creating services from source and compiled code without a WSDL.
Answer: D,E

QUESTION NO: 18
A developer is asked to consult on a Web services project and assist the team with a good design approach on a new project. The team members disagree on whether to use WSDL or Java first.
Several members are skilled with XML and see a schema and WSDL as the correct place to start. The team has also learned the deadline for this project has been moved up and another team plans to reuse their code. Which statement is true about the proper course of action to take in this situation?
A. Java should be used first because it is a strongly typed language and will result in a robust WSDL.
B. WSDL should be used first because it will make the code easier to reuse for the other team.
C. Java should be used first because it is often the fastest and easiest approach.
D. WSDL should be used first because the team knows XML Schema.

Answer: C

QUESTION NO: 19
Which statement is true about JAX-WS dynamic invocation?
A. Dynamic invocation clients use RPC typed interfaces to invoke the Web service.
B. Dynamic invocation lets clients access a Web service without a WSDL.
C. Dynamic invocation clients are bound at design-time to a single Web service.
D. Dynamic invocation requires the client to statically configure the Web service proxy.
E. The dynamic proxies provide dynamic invocation in JAX-WS.
Answer: B

QUESTION NO: 20
Which three can an EJB-based endpoint use? (Choose three.)
A. HTTP sessions
B. Java EE 5 declarative security
C. Java EE 5 programmatic security
D. client-demarcated transactions
E. container-managed transactions
Answer: B,C,E

The Cisco contains more than 400 practice questions for the Oracle 1Z0-863 exams,including simulation-based questions.Also contains hands-on exercises and a customized copy of the Oracle 1Z0-863 exams network simulation software.

Oracle 1Z0-860 Self Study, 100% Success Rate Oracle 1Z0-860 Practice Questions With Accurate Answers

Now,Flydumps has publised the new version of Oracle 1Z0-860 exam dumps with new added exam questions.Also the latest Oracle 1Z0-860 PDF and VCE dumps with VCE test engine for free download,and the new Oracle 1Z0-860 practice tests ensure your exam 100% pass.Visit www.Flydumps.com to get more exam dumps!

QUESTION: 1
Given the following stateful session bean:

10.
@Stateful

11.
@TransactionAttributefJransactionAttributeType. SUPPORTS)

12.
public class VideoBean implements Video {

13.
// insert code here

14.
public void methodAO {}
15.}
Assuming no other transaction-related metadata, which code can be added at Line 13 to
guarantee that business method methodA will execute only if invoked with an active
transaction?

A. @TransactionAttributefJ

B. @TransactionManagement(TransactionAttributeType. CONTAINER)

C. @TransactionAttribute(TransactionAttributeType.MANDATORY)

D. @TransactionAttributeO”ransactionAttributeType.REQUIRES_NEW)

Answer: C
QUESTION: 2
Given the following client-side code that makes use of the session bean Foo:

10.
@EJB Foo beanl;

11.
@EJB Foo bean2; //more code here

20.
booleantestl = beanl.equals(beanl);

21.
booleantest2 = beanl.equals(bean2); Which two statements are true? (Choose two.)

A. If Foo isstateful,testlistrue, and test2 is true.
B. IfFoo is stateful, testlis true,andtest2isfalse.
C. IfFoo is stateless, testl is true, and test2 is true.
D. IfFoois stateful, testl is false, and test2 is false.
E. If Foo isstateless, testl istrue,and test2 is false.
F. If Fooisstateless, testl is false, andtest2is false.

Answer: B, C
QUESTION: 3
Which statement about entity manager is true?

A. A container-managed entity manager must be a JTA entity manager.
B. An entity manager injected into session beans can use either JTA or resource-local transaction control.
C. An entity manager created by calling the EntityManagerFactory.createEntityManager method always uses JTA transaction control.
D. An entity manager obtained through resource injection in a stateful session bean can use a resource-local EntityTransaction for transaction control

Answer: A
QUESTION: 4
Which statement is true about the use of a persist operation in a transaction?

A. If a user persists a detached object it always becomes managed.
B. The persist operation on an entity always cascades to its related entities.
C. If a user persists a new entity with an existing primary key the transaction will fail.
D.  If a user  persists a  managed entity an  exception  may be thrown by the  persist operation.

Answer: C
QUESTION: 5 A developer writes a stateless session bean with one local business interface and with container- managed transactions. All business methods have transaction attribute REQUIRED. The bean has an injected field sessionCtx of the type SessionContext. Which two operations are allowed in a business method of the bean? (Choose two.)
A. sessionCtx. getEJBObject
B. sessionCtx.setRollbackOnly
C. sessionCtx. getMessageContext
D. sessionCtx. getBusinessObject
E. sessionCtx. getEJBLocalObject
Answer: B, D

QUESTION: 6 A developer implements a session bean with a method doStuff which behaves differently depending on the caller’s  security role. Only  users  in security  roles  “ADMIN” and “USER” are allowed to call the method. Assume that there is no security-related metadata in the  deployment descriptor. Which two, taken in  combination, are appropriate to accomplish this? (Choose two.)
A. Annotate method doStuff with @PermitAII.
B. AnnotatemethoddoStuff [email protected]({“ADMIN”,”USER”})
C. If EJBContext.getCallerPrincipal returns role “ADMIN”, implement thebehaviorfor users in role ADMIN.
D. If EJBContext.isCallerlnRole(“ADMIN”) returns true, implement the behavior defined for users in role “ADMIN”.

Answer: B, D
QUESTION: 7 Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?
A. SELECT ANY(r. chairs) FROM Room r
B. SELECT NEW Integer(MAX(r. chairs)) FROM Room r
C. SELECT r FROM Room r WHERE r.chairs > AVG(r.chairs)
D. SELECT c FROM Chair c WHERE LOCATE (c.type, lazyboy) > -1

Answer: B
QUESTION: 8
Given:
11..Entity public class X{

12.
@ld int id;

13.
Y y;
14.}
A public class Y with NO Java Persistence annotations is defined  in the same
package. Which statement  is correct  about these  classes  if NO other annotations
and mapping  descriptors are provided?

A. Class Y must be serializable.
B. ClassYmust be marked as an entity.
C. The entity X is notdefinedcorrectly.The field y must be marked as @Lob.
D. ClassY must be accessedbyapersistenceapplication throughapublicinterface.

Answer: A
QUESTION: 9 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 the lifetime of the bean and that the information to connect to the remote system is defined in JNDI. Which statement describes how to manage the data correctly?
A. Readthe datain the bean’s constructor.
B. The datacan only bereadinthebean’s business methods.
C. Read thedatain a method which is annotated [email protected]
D. Read the data in a method which is annotated with @Post Activate.
E. Readthedata ina methodwhich is annotated with (5)PostConstruct.

Answer: E
QUESTION: 10
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
business method on the enterprise bean? (Choose two.)

A. The Application Assembler has marked the enterprise bean methodasunchecked.
B. The client’s principalhas beenassigned  a securityrolewithpermissionto  invokethe method.
C. The Application Assembler has set the security-identity deployment descriptor to run- as.
D. TheApplicationAssemblerhas mapped all security role references using the role-link element.
Answer: A, B

QUESTION: 11 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 descriptor was provided  in the ejb-jar  delivered by the Bean  Provider. Which represents the solution to this problem?
A. No solution is possible under these conditions.
B. TheDeployer canadd metadataannotations totheejb-jar.
C. The Application Assembler can add metadata annotations to the ejb-jar.
D. TheSystem Administrator can addinterceptorbinding informationatruntime, using vendorspecific tools.
E. TheApplication Assembler canaddadeployment descriptor totheejb-jarthat includesinterceptor binding information.

Answer: E
QUESTION: 12 A developer writes a session bean which uses several configurable constants. The constants are all defined  as String types in JNDI. This cannot be changed because existing code is using the same JNDI information. One of the constants is a date, represented in string format. This date constant is used in multiple business methods of this session bean, actually as a Date object.  Converting strings to dates is an expensive operation; therefore, the developer wants to do as little converting as possible. Which two scenarios can be  used to prevent  converting from String to Date in every business method? (Choose two.)
A. Loadthe date string in an instance Date type variablebyannotation of the instance variable and let the container autoconvert it to a Datetypeautomatically.
B. Load thedate string in an instance String type variablebyannotation of this instance variableandconvertitto aDatetype object in the beans constructor.
C. Load thedatestringinaninstanceString  typevariableby  annotationof this instance variable and convert it to aDate typeobjectin [email protected]
D. Load the date string in an instance Date typevariableby annotation ofasetter method that takes a String and which carries out the conversion and assigns the value totheinstance variable.
Answer: C, D

QUESTION: 13
Which is a valid PostConstruct method in a message-driven bean class?

A. .PostConstruct
public boolean initQ {return true; }

B. .PostConstruct private static void init0 {}

C. .PostConstruct private void init0 {}

D. .PostConstruct public static void initQ {}

Answer: C
QUESTION: 14 A developer wants to create a JMS message-driven   bean that responds to javax.jms.TextMessage messages. Which two statements are true? (Choose two.)
A. The developer must implement the ejbCreate method.
B. The developer does NOT need to create a business interface for the bean.
C. The developer must implement a method that declares javax.jms.TextMessage as an argument.
D. The message-driven bean class must implement methods of the javax.jms.MessageListener interface.
E. The message-driven bean class must  implement methods of the javax. ejb. MessageDnvenBean interface.

Answer: B, D
QUESTION: 15 A Reader entity has a one-to-many, bidirectional relationship with a Book entity. Two Reader entities are persisted, each having two Book entities associated with them. For example, readeM has booka and bookb, while reader2 has bookc and bookd. Which query returns a Collection of fewer than four elements?
A. SELECT b.reader FROM Book b
B. SELECT r FROM BookbINNER JOINb.readerr
C. SELECTrFROM Reader r INNER JOIN r.booksb
D. SELECTrfrom BookbLEFT JOIN b.readerr LEFTJOINFETCHr.books

Answer: C
QUESTION: 16 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.

Answer: A, D
QUESTION: 17
The ejb-jar file format is a contract between which two EJB role pairs? (Choose two.)

A. Deployer and System Administrator
B. Application Assembler and Deployer
C. Bean Provider and Application Assembler
D. Bean Provider and EJB Container Provider
E. EJB Server Provider and EJB Container Provider
F. Application Assembler and EJB Container Provider

Answer: B, C
QUESTION: 18 Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?
A. SELECT ANY(r. chairs) FROM Room r

B. SELECT NEW Integer(MAX(r. chairs)) FROM Room r
C. SELECT r FROM Room r WHERE r.chairs > AVG(r.chairs)
D. SELECT c FROM Chair c WHERE LOCATE (c.type, lazyboy) > -1

Answer: B
QUESTION: 19 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 Topic?
11.
public class FooBean {

12.

13.
public void fooQ {}

14.
15.}

A. @Resource(type=Topic. class)
B. @Resource(name=”topicRef) private static Topic topic;
C. .ResourceprivateTopic topic;
D. @Resource(name=”topicRef’, type=Topic. class)

Answer: D
QUESTION: 20 A developer has created an application-managed entity manager. Which statement is correct?
A. A new persistence context begins when the entity manager is created.
B. A new persistence context begins when a new JTA transaction begins.
C. A new persistence context begins when the entity manager is invoked in the context of a JTA transaction.
D. A new persistence context begins  when the  entity manager is invoked in the context of a resource-local transaction.
Answer: A

QUESTION: 21
Given this Java EE application that uses a JTA application-managed entity manager:

20.
UserTransaction utx = …;

21.
utx.beginQ;

22.
// insert code here

23.
utx.commitQ;
Which two code fragments can be used on Line 22 to persist  an order instance assuming
that all references are properly initialized? (Choose two.

A. em.merge(order); em.flushQ;

B. em.persist(order); em.flushO;

C. em.joinTransactionO; em.persist(order);

D. em = emfcreateEntityManagerQ; em.persist(order);

Answer: C, D
QUESTION: 22 A developer writes two session beans which cooperate. The first session bean, ShoppingCart, collects  orders and is implemented  as a stateful session bean. The second session bean, CalculateDiscount,  is implemented  as a stateless session bean and runs on a different  server. ShoppingCart contains the method getTotalPrice, which calculates the total price of the order in the ShoppingCart, including discounts.
Discounts  are  calculated  by  CalculateDiscount  using  the information  on the
ShoppingCart bean, combi ned  with  data  from a database.   Which   scenario  can
accomplish this?

A. The CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean passing the this reference.
B. The CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean. CalculateDiscount accesses the ShoppingCart instance by JNDI lookup.
C. The CalculateDiscount offers a method  calculate which  is invoked  by the ShoppingCart bean passing its reference obtained from the SessionContext.getBusinessObject method.
D. The CalculateDiscount offers a method calculate which is invoked by the ShoppingCart bean. CalculateDiscount accesses the state of ShoppingCart by dependency injection.

Answer: C

QUESTION: 23
A CMT session bean named MrBean is annotated as follows :

21.
@Stateless(name=”MrBean”)

22.
@TransactionAttribute0″ransactionAttributeType.NOT_SUPPORTED)

23.
public class MrBean {

24.
public void storeStuffQ {}

25.
There are no transaction annotations at the method level. Given the following snippet
of an ejb-jar.xml:

23.
<container-transaction>

24.
<method>

25.
<ejb-name>MrBean</ejb-name>

26.
<method-name>storeStuff</method-name>

27.
</method>

28.
<transaction-attribute>Mandatory</transaction-attribute>

29.
</container-transaction>
Which statement is correct about the business methods in MrBean?

A. All methods have transactionattributeREQUIRED.

B. All methodshavetransaction attributeMANDATORY.

C. All methodshavetransaction attribute NONSUPPORTED.

D. Methods with name store Stuff have transaction attributeMANDATORYand all other
methods have transaction attribute REQUIRED.

E. MethodswithnamestoreStuffhavetransaction attribute MANDATORY andall
othermethods have transaction attribute NONSUPPORTED.

F. Methodswithname store  Stuff haveatransaction attribute REQUIRED  andallother
methods have transaction attribute NOT SUPPORTED.

Answer: E
QUESTION: 24
Which four are defined in the EJB specification as a standard EJB role? (Choose four.

A. End Point Provider
B. Persistence Provider
C. NameSpace Provider
D. JSF Interface Provider
E. ApplicationAssembler
F. EJBContainerProvider

G. EnterpriseBeanProvider
Answer: B, E, F, G
QUESTION: 25 The syntax of the ORDER BY clause is defined in the Java Persistence API asorderby_clause ::=ORDER BY orderbyjtem {, orderbyjtem}* Which statement is correct about the use of ORDER BY clauses?
A. Only literals can be specified as an orderbyjtem.
B. Fields or properties of any type can be specified as an orderbyjtem.
C. The ordering must be specified if two or more orderbyjtem methods are provided.
D. If two orderbyjtem methods  are provided  the left orderbyjtem has  the higher precedence.

Answer: D
QUESTION: 26 A developer is writing implementation code for an EJB 3.0 message-driven bean class that processes booking requests. Within  the business logic of the onMessage  method, a temporary problem can occur. In that case the developer wants to make sure that the booking request is processed again in 30 minutes. Which two can the developer select? (Choose two.)
A. Throwa runtimeexception torollbackthetransaction.
B. Call setRollbackOnly on the MessageDrivenContext interface.
C. Makeuseof the TimerService, and implement the TimedObject interface.
D. Make use of the TimerService,implement areprocess method, and annotate it with @Timeout.
E. Throw an application exception, and addtheretry-after attribute to the deployment descriptor.
Answer: C, D
QUESTION: 27

Given a set of CMT bean methods with the following transaction attributes: Method
M1=SUPPORTS Method M2=REQUIRED Method M3=NOT_SUPPORTED Method M4=REQUIRES_NEW And the following method invocation sequence: Method M1 invokes Method M2 Method M2 invokes Method M3 Method M1 invokes Method M4 If Method M1 is invoked by a method that does NOT have a transaction context, which describes a possible scenario?
A. Method M1notransaction MethodM2new transaction Method M3no transaction MethodM4newtransaction
B. Method M1notransaction Method M2Container throws EJBTransactionRequiredException
C. MethodM1new transaction Method M2runs in same transaction as M1 Method M3Container throws TransactionNotSupportedException
D. Method M1no transaction Method M2new transaction Method M3Container throws TransactionNotSupportedException

Answer: A
QUESTION: 28 OldBarBean is a  stateless session bean written to the EJB 2.1 API with remote home interface. OldBarHome and remote component interface OldBar. FooBean is a stateless session bean written to the EJB 3.0 API. OldBarBean and FooBean are the only EJBs packaged in the ejb-jar. The FooBean portion of the ejb-jar. xml also declares an ejb-ref whose ejb-ref-name is ejb/oldBar. The ejb-ref is linked to OldBarBean. There are no other ejb dependencies defined. A business method foo in FooBean needs to access OldBarBean. Which is portable code to achieve this goal?
A. .Remote
private OldBar oldBar;

B. public void fooQ { try {
InitialContext ic = new InitialContextO; Object obj = ic.lookup(“ejb/oldBar”);
OldBarHome OldBarHome =
(OldBarHome) PortableRemoteObject.narrow(obj, OldBarHome.class);
OldBar oldBar = oldBarHome.createO;

C. @EJB private OldBarHome OldBarHome;

public void fooQ {
try {
OldBar oldBar = oldBarHome.createQ;

D. public void fooQ {
try {
InitialContext ic = new InitialContextO; OldBarHome OldBarHome =
(OldBarHome) ic.lookup(“ejb/oldBar”); OldBar oldBar = oldBarHome.createQ;

Answer: C
QUESTION: 29 DRAG DROP Click the Task button. A Department entity is in a one-to-many relationship with an Employee entity. A developer has been asked to write a Java Persistence query to update the set of employees who are in the department ‘HR’ by setting their department to null. Construct a query using the Java Persistence query language to perform this task. Construct a valid Java Persistence query by dragging and dropping the syntax fragements.

Answer: C

QUESTION: 30 A developer implemented a Java class called Store. The class is  annotated correctly  to act as an entity. The developer created a stateless session bean to create, lookup, and remove Store objects. This session bean has a container-managed entity manager injected into field em and a removeStore method with transaction attribute REQUIRED. Given the following code :
32.
public void re move St ore (St ore store) {

33.
em.remove(store); 34.}
What is  a possible  reason that  an HlegalArgumentException  is thrown  at Line  33
when the removeStore method is called by a remote client?

A. Thepassedobject is NOT serializable.

B. Thepassed object is NOT found inthedatabase.

C. The passed object is NOT managed by the entity manager.

D. There is no active transaction to manage the database removal.

Answer: C
QUESTION: 31 A developer is designing a Java Persistence application that is mapped to a set of existing tables. This set includes table EMPLOYEE, DEPARTMENT, and PROJECT. Tables EMPLOYEE and DEPARTMENT do NOT  define any  foreign  key constraints to table PROJECT. Table PROJECT  defines foreign  key constraints with references to tables EMPLOYEE and DEPARTMENT and an extra column called COST. The  table EMPLOYEE is mapped to an entity  Employee and  the table DEPARTMENT to an entity Department.  How can the table PROJECT  be mapped  so the persistence application can be portable?

A. Such sets of tables cannotbemappedandkeep the application portable.
B. Map thetablePROJECT asasecondary table for either the Employee or Departmententity.
C. Map the table PROJECT to bidirectional many-to-many relationships between the Employeeand Departmentusing a Java. util.Mapas the type ofthefield or property.
D. Mapthe tablePROJECT to an entity Projectwith afield or property cost mappedto thecolumn COST and one-to-many relationshipstothis entity in the Employee and the Department.

Answer: D
QUESTION: 32 A CMT session bean named MrBean contains a method storeStuff which is annotated as follows:
22.
@TransactionAttributeO”ransactionAttributeType.REQUIRES_NEW)

23.
public void storeStuffO {
All other methods of this bean have no transaction annotations. Given the following part
of an ejbjar.
xml:

23.
<container-transaction>

24.
<method>

25.
<ejb-name>MrBean</ejb-name>

26.
<method-name>*</method-name>

27.
</method>

28.
<transaction-attribute>NotSupported</transaction-attribute>

29.
</container-transaction>
Which statement is correct about the methods in MrBean?

A. Allmethods of MrBean have transaction attribute REQUIRED.

B. All methodsofMrBean have transactionattribute NONSUPPORTED.

C. MethodstoreStuffhastransactionattributeREQUIRES_NEWandthe other methods have
transaction attribute REQUIRED.

D. Method storeStuff has transaction attribute  NONSUPPORTED and the other
methods  have transaction attribute REQUIRED.

E. Method storeStuff has transaction attribute REQUIRES NEWandthe other
methodshavetransaction attribute NOT SUPPORTTED.

Answer: B

QUESTION: 33 A developer writes an interceptor class called Foolnterceptor containing the following Aroundlnvoke method:
11.
@Aroundlnvoke

12.
public Object intercept(lnvocationContext ctx) {

13.
return “intercepted”; 14.}
Foolnterceptor is applied to a business method in a stateless session bean:

11.
@lnterceptors(Foolnterceptor.class)

12.
public String testzero(int i) {

13.
return (i == 0) ? “zero””not zero”;

14.
}
Which describes the result when a client invokes the testzero method with a value of 1?

A. The intercept method is NEVER invoked.

B. The clientreceivesareturnvalueof “zero”.

C. The client receivesa returnvalue of “not zero”.

D. The client receivesareturn value of “intercepted”.

Answer: D
QUESTION: 34 A developer implements a session bean which acts as a session facade for an application. This means that clients will only see this session bean’s interface which offers the application interface. There are three distinct roles known at development time”user”, “admin”, and “guest”. The majority of the methods will be used by role “user”. All methods must have role permissions active and roles may be added or changed in the future. Which two scenarios are correct? (Choose two.)
A. The developer annotates the bean class with @PermitAII and annotates the methods used by role”guest” or “admin” individually.
B. The developer annotates the bean class with @DenyAII and annotates the methods used by role”user”, “guest”, or “admin” individually.
C. The developer defines individual method permissions for the methods used by roles “user”,”guest”, and “admin” in the deployment descriptor.
D. The developer annotates the bean class with @RolesAllowed(“user”) and annotates the methods used by role “guest” or “admin” individually.
E. Thedeveloper defines a method permission with method name “*” and role “user” and adds individual   method  permissions  for the methods  used by roles “guest” and “admin”  in the deployment descriptor.

Answer: D, E
QUESTION: 35 A User entity is in a one-to-many relationship with a Book entity. Assume that a developer has a function fetchBook(String title) that fetches a Book entity with the given title title. Also assume that the developer has an entity manager em. Which query can be used to return the user that holds the book titled “Java”?
A. em.createQueryfSELECT u FROM User u where :great IN u.books.title”).setParameter(“great”,”Java”)
B. em.createQuery(“SELECT u FROM User u where :great IN
C. books”). setParameter(“great”,fetchBook(“Java”))
D. em.createQuery(“SELECT u FROM User u where :great MEMBER OF
E. books.title”). setParameter(“great” .”Java”)
F. em.createQuery(“SELECT u FROM User u where :great MEMBER OF
G. books”). setParameter(“great”,fetchBook(“Java”))

Answer: D
QUESTION: 36 Given: A session bean Foo uses container-managed transactions The container throws a javax.transaction.TransactionRolledBackException when the doStuff method runs. Which transaction attribute can the doStuff method have for this to occur?
A. NEVER
B. MANDATORY
C. REQUIRES_NEW
D. NOT SUPPORTED

Answer: B
QUESTION: 37 Within a Java EE environment, which annotation can be used to inject an entity manager factory?

A. .Entity
B. .Factory
C. @JTAFactory
D. @PersistenceUnit
E. .PersistenceContext

Answer: D
QUESTION: 38
Given this code snippet from a JMS message-driven bean class X:

11.
public XQ { System, out. print(“1 “); }

12.
public void onMessagefMessage m) throws Java. rmi. RemoteException

13.
try {

14.
TextMessage tm = (TextMessage) m;

15.
String text = tm.getText0;

16.
System, out. print(“2 “);

17.
} catch (JMSException e) {

18.
throw new java. rmi. RemoteExceptionQ; 19.}
20.}
When this bean class handles a message, which is correct?

A. After a messagedelivery theresultis1.

B. Aftera message delivery the resultis2.

C. Aftera message delivery the result is12.

D. Afteramessage delivery an exception isthrown.

E. After a message delivery the resultisunpredictable.

F. This isNOTanEJB3.0 compliant bean.

Answer: F
QUESTION: 39
Which statement is true about the primary key of a Java Persistence entity?

A. The primary key cannot be overriden by a mapping descriptor.
B. The location of the primary key defines the topmost entity class in the hierarchy.

C. If property-based  access is used, the  properties  of the  primary key class must be public or protected.
D. At least part of a primary key must be defined in the class that is the topmost class of an entity which is defined by a hierarchy of classes.

Answer: C
QUESTION: 40 A session bean calls the setRollbackOnly method on the EJBContext interface within a business method with an active transaction. Which two are correct? (Choose two.)
A. The transaction timeout is immediately disabled.
B. The container will ensure that the transaction will never commit.
C. The bean must have started the current transaction for this to be legal.
D. The bean must have bean-managed transaction demarcation for this to be legal.
E. Thebean must have container-managed transaction demarcation for this to be legal.

Answer: B, E
QUESTION: 41
Which statement about entity manager is true?

A. A container-managed entity manager must be a JTA entity manager.
B. An entity manager injected into session beans can use either JTA or resource-local transaction control.
C. An entity manager created by calling the EntityManagerFactory.createEntityManager method always uses JTA transaction control.
D. An entity manager obtained through resource injection in a stateful session bean can use a resource-local EntityTransaction for transaction control

Answer: A
QUESTION: 42
A Java Persistence application uses a Version attribute to manage concurrent updates.
Which is true?

A. The Version attribute must have a public access type.
B. The Version attribute is used by the persistence provider.
C. A separate Version  attribute  must be specified for each class in the inheritance hierarchy.
D. A separate Version column must be specified for each table mapped to the entity.

Answer: B
QUESTION: 43 A developer writes a stateful session bean FooBarBean with two local business interfaces Foo and Bar. The developer wants to write a business method called getBarfor interface Foo that returns a Bar reference to the same session bean identity on which the  client invokes getBar. Which  code, when inserted on Line 12 below, implements the getBar method with the wanted behavior? 10..Resource SessionContext sessionCtx;
11.
public BargetBarOJ

12.

13.}

A. return(Bar)this;

B. return(Bar) new FooBarBeanQ;

C. return (Bar) sessionCtx.lookup(“FooBarBean”)

D. return (Bar) sessionCtx.getBusinessObject(Bar.class);

E. InitialContextic= new InitialContextQ;
return (Bar) ic.lookup(“java:comp/env/ejb/FooBarBean”);

Answer: D
QUESTION: 44 Which statement about the combination of mapping defaults, annotations, and XML descriptors is correct?
A. All mapping annotations must always be processed by the persistence provider.
B. Some annotations, like the @Entity annotation, must always be processed by the persistence provider.
C. The mapping information for an entity class specified by annotations and in XML
descriptors must be distinct.

D. If multiple entity listeners are defined, the order in which they are invoked can be
defined or overwritten in the XML descriptor.

Answer: D
QUESTION: 45 A developer wants to release resources within a stateless session bean class. The cleanup method should be executed by  the container before an instance of  the class is removed. The deployment descriptor is NOT used. Which three statements are correct? (Choose three.)
A. The cleanup method may declare checked exceptions.
B. The cleanupmethodmusthave noarguments andreturn void.
C. The cleanup method isexecuted inan unspecifiedtransactionand security context.
D. The developer should mark the cleanup methodwiththe @PreDestroy annotation.
E. The developershouldmark thecleanupmethodwiththe @PostDestroy annotation.
F. Thecleanup method  is executed inthetransactionandsecurity context ofthelast business method invocation.

Answer: B, C, D
QUESTION: 46
Given code snippets from two files:

7.
public class Dog {

8.
public void onMessage(Message m) { System, out. print(“1 “);

9.
1
And

10.
@MessageDriven

11.
class MessageDog extends Dog implements MessageDrivenBean

12.
MessageDog(Message m){ System, out. print(“2 “); }
13.}
Which four code changes, when used together, create a valid JMS message-driven bean?
(Choose four.

A. Make class MessageDog public.

B. Make the MessageDog constructor no-arg.

C. Make the MessageDog constructor public.

D. Move the onMessage method to class MessageDog.

E. Change MessageDog so that it is NOT a subclass of Dog.
F. Make class MessageDog implement MessageListener instead of MessageDrivenBean.
Answer: A, B, C, F
QUESTION: 47 A developer writes a stateless session bean FooBean with one remote business interface FooRemote containing one business method foo.  Method foo  takes a single parameter of application-defined type MyData.
11.
public class MyData implements Java. io.Serializablej

12.
int a; 13.}
Method foo is implemented within the FooBean class as:

11.
public void foo(MyData data) {

12.
data.a = 2; 13.}
Another session bean within the same application has a reference to FooRemote in
variable fooRef and calls method foo with the following code:

11.
MyData data = new MyDatafJ;

12.
data.a = 1;

13.
fooRef.foo(data);

14.
System, out. println(data. a);
What is the value of data, a when control reaches Line 14 of the client ?

A. 0

B. 1

C. 2

D. either1or 2

Answer: B
QUESTION: 48
EJB 3.0 containers must provide a specific subset of which two APIs? (Choose two.

A. JSP APIs
B. JavaMailAPIs
C. JAX-WS APIs
D. Java CardAPIs
E. Sun Studio APIs

Answer: B, C
QUESTION: 49
Given the following code in an EJB 3.0 session bean:

10.
@Resource(name=”jdbc/employeeDB”)

11.
private DataSource dataSource;

12.

13.
public void lookupEmployee(String id) {

14.
InitialContext ic = new InitialContextO;

15.
// insert code here

16.
DataSource ds = (DataSource) obj;
17.}
Which code, inserted at Line 15, portably looks up the injected resource?

A. Object obj = ic.lookup(“employeeDB”);

B. Object obj = ic.lookup(“dataSource”);

C. Object obj = ic.lookup(“jdbc/employeeDB”);

D. Object obj = ic.lookup(“javacomp/env/employeeDB”);

E. Object obj = ic.lookup(“java:comp/env/jdbc/employeeDB”);

Answer: E
QUESTION: 50 Which Java Persistence query uses the aggregate function correctly, assuming that chairs field is of type int?
A. SELECT ANY(r. chairs) FROM Room r
B. SELECT NEW Integer(MAX(r. chairs)) FROM Room r
C. SELECT r FROM Room r WHERE r.chairs > AVG(r.chairs)
D. SELECT c FROM Chair c WHERE LOCATE (c.type, lazyboy) > -1
Answer: B
QUESTION: 51

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.

Answer: A, D
QUESTION: 52 A developer creates the following session bean: 10..Stateless
11.
@RolesAllowed(“SECRET”)

12.
public class MyBean implements Mylnterface {

13.
public void methodAOJ}

14.
@PermitAII

15.
public void methodB0 {}

16.
@DenyAII

17.
public void methodC0 {}

18.
} No deployment descriptor is supplied. Which two statements are true? (Choose two.)

A. Auserin the role “SECRET” will be able to accessallof the methods.
B. A user inthe role”FOO” will be able to accessmethodAandmethodB.
C. A user withoutanyrolewill beable to accessmethodBbut NOTmethodA.
D. A user in the role “SECRET”willbe able to accessmethodA andmethodB.
E. A userintherole “SYSADM” will be abletoaccessmethodA,methodB, and methodC.
Answer: C, D
QUESTION: 53

A developer wants to create a Java Persistence query to perform a bulk update operation on five different entity classes. All of these classes have a field called name. These classes have the following relationships: Harrier extends Dog and Dog extends Animal Vet extends Doctor What is the minimum possible number of operations required to change the value of the name field for all of the entities in all five classes?
A. 1
B. 2
C. 3
D. 4
E. 5
Answer: B

QUESTION: 54
A developer writes an enterprise application and packages it into an .ear file. The application contains two persistence  units defined at the .ear level with persistence unit names FooPU and BarPU. The application also contains an ejb-jar with one stateless session bean. Which code, when added to the stateless session bean class, injects an EntityManagerFactory at runtime?
A. PersistenceUnit private EntityManagerFactory emf; B. PersistenceContext private EntityManagerFactory emf;
C. PersistenceUnit(unitName=”BarPU”) private EntityManagerFactory emf;
D. Resource(name=”BarPU”, type=EntityManagerFactory.class) private EntityManagerFactory emf;

Answer: C
QUESTION: 55 A developer is working on a user registration  application using  EJB 3.0. A business method registerUser  in stateless session bean RegistrationBean  performs the user registration. The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes

registerUser again with corrected data using the same transaction. Which design can
meet this requirement?
A. Have registerUser method call EJBContext.setRollbackOnlyOmethodafter registration fails.
B. Have registerUser method throw javax.ejb.EJBTransactionRequiredExceptionafterregistration fails.
C. HaveregisterUser method throw EJBException without marking the transaction for rollback, after registration fails.
D. Create an application exception withtherollbackattributeset to falseandhave registerUser method throwit afterregistration fails.

Answer: D
QUESTION: 56
Which statement is true about the Timer service in an EJB 3.0 stateless session bean?

A. The timeout callback method contains the business logic that handles the timeout event.
B. The timeout callback method must be declared as a business method in business interfaces.
C. The timeout callback method can throw application exceptions to report business logic failures.
D. A bean class can implement multiple timeout callback methods, each associated with a different timer.

Answer: A
QUESTION: 57 A developer wants to create a portable EJB 3.0 application that includes the following class definition for the Entity Account: 11..Entity
12.
@Entityl_isteners(com. acme.AlertMonitor. class)

13.
public class Account {

14.
// more code here

15.
@PrePersist

16.
protected void validateCreate0 {/* more code here */} 17.}

Which statement is correct?
A. The validateCreate method may NOT throwruntimeexceptions.
B. ThevalidateCreate method can invoke the EntityManager.flush operation.
C. Methods oftheclass com.acme.AlertMonitor annotatedwithcallback annotationsmusttake an Object or Account instance astheonly argument.
D. The above class  definition is NOT  correct. An entity cannot defineacallback methodlike PrePersistand use the EntityListeners annotationatthe same time.

Answer: C
QUESTION: 58
Given this code snippet from a JMS message-driven bean class X:

11.
public XQ { System, out. print(“1 “); }

12.
public void onMessagefMessage m) throws Java. rmi. RemoteException

13.
try {

14.
TextMessage tm = (TextMessage) m;

15.
String text = tm.getText0;

16.
System, out. print(“2 “);

17.
} catch (JMSException e) {

18.
throw new java. rmi. RemoteExceptionQ;
19.}
20.}
When this bean class handles a message, which is correct?

A. After a messagedelivery theresultis1.

B. Aftera message delivery the resultis2.

C. Aftera message delivery the result is12.

D. Afteramessage delivery an exception isthrown.

E. After a message delivery the resultisunpredictable.

F. This isNOTanEJB3.0 compliant bean.

Answer: F
QUESTION: 59 FooBean is an EJB 3.0 session bean that can make valid use of UserTransaction. Which is guaranteed to work in an EJB container for FooBean to obtain the UserTransaclion object?

A. Invoke a method on a SessionContext that returns a UserTransaction object.
B. Perform JNDI lookup with name “java:/UserTransaction” on an InitialContext.
C. Perform JNDI lookup with the name “jdbc/UserTransaction” on an InitialContext.
D. Use the @TransactionManagement annotation to inject an instance variable of type UserTransaction in a bean class.

Answer: A
QUESTION: 60
An Application Assembler is given the following stateless session bean:
10..Stateless public class MyBean implements Mylnt {

11.
@RolesAllowed(“SECRET”)

12.
public void methodA(int x) {}

13.
public void methodA(String y) {}

14.
public void methodB(String z) {}

15.
}
A deployment descriptor is also supplied, a portion of which reads as follows:

20.
<method-permission>

CCNA Exam Certification Guide is a best-of-breed Oracle 1Z0-860 exam study guide that has been completely updated to focus specifically on the objectives.Senior instructor and best-selling author Wendell Odom shares preparation hints and Oracle 1Z0-860 tips to help you identify areas of weakness and improve both your conceptual and hands-on knowledge.Oracle 1Z0-860 Material is presented in a concise manner,focusing on increasing your understanding and retention of exam topics.

Oracle 1Z0-853 Study Guides, Download Latest Oracle 1Z0-853 Actual Test With The Knowledge And Skills

Nowdays,Flydumps has published the newest Oracle 1Z0-853 exam dumps with free vce test software and pdf dumps,and the latest Oracle 1Z0-853 question answers ensure you 100% pass and money bcak guarantee.

QUESTION NO: 1
Given:
1.
class Pizza {

2.
java.util.ArrayList toppings;

3.
public final void addTopping(String topping) {

4.
toppings.add(topping);

5.
}

6.
}

7.
public class PepperoniPizza extends Pizza {

8.
public void addTopping(String topping) {

9.
System.out.println(“Cannot add Toppings”);

10.
}

11.
public static void main(String[] args) {

12.
Pizza pizza = new PepperoniPizza();

13.
pizza.addTopping(“Mushrooms”);

14.
}

15.
}

What is the result?

A. Cannot add Toppings
B. Compilation fails.
C. The code runs with no output.
D. A NullPointerException is thrown in Line 4.
Answer: B
QUESTION NO: 2
Given:
10.
class One {

11.
public One foo() { return this; }

12.
}

13.
class Two extends One {

14.
public One foo() { return this; }

15.
}

16.
class Three extends Two {

17.
// insert method here

18.
}

Which two methods, inserted individually, correctly complete the Three class? (Choose two.)
A. public Two foo() { return this; }
B. public Object foo() { return this; }
C. public int foo() { return 3; }
D. public One foo() { return this; }
E. public void foo() {}
Answer: A,D
QUESTION NO: 3
Given:
10.
int x = 0;

11.
int y = 10;

12.
do {

13.
y–;

14.
++x;

15.
} while (x < 5);

16.
System.out.print(x + “,” + y);

What is the result?
A. 6,6
B. 5,5
C. 6,5
D. 5,6
Answer: B
QUESTION NO: 4 DRAG DROP
Click the Task button.

Answer: QUESTION NO: 5

Given:
1.
public class Score implements Comparable<Score> {

2.
private int wins, losses;

3.
public Score(int w, int l) { wins = w; losses = l; }

4.
public int getWins() { return wins; }

5.
public int getLosses() { return losses; }

6.
public String toString() {

7.
return “<” + wins + “,” + losses + “>”;

8.
}

9.
// insert code here

10.
}

Which method will complete this class?
A. public int compare(Object o1,Object o2){/*more code here*/}
B. public int compare(Score s1,Score s2){/*more code here*/}
C. public int compareTo(Object o){/*more code here*/}
D. public int compareTo(Score other){/*more code here*/}
Answer: D
QUESTION NO: 6
Given:
11.
class Snoochy {

12.
Boochy booch;

13.
public Snoochy() { booch = new Boochy(this); }

14.
}

15.

16.
class Boochy {

17.
Snoochy snooch;

18.
public Boochy(Snoochy s) { snooch = s; }

19.
}

And the statements:
21.
public static void main(String[] args) {

22.
Snoochy snoog = new Snoochy();

23.
snoog = null;

24.
// more code here

25.
}

Which statement is true about the objects referenced by snoog, snooch, and booch immediately after line 23 executes?
A. Only the object referenced by snooch is eligible for garbage collection.
B. Only the object referenced by snoog is eligible for garbage collection.
C. None of these objects are eligible for garbage collection.
D. The objects referenced by snooch and booch are eligible for garbage collection.
E. Only the object referenced by booch is eligible for garbage collection.
Answer: D
QUESTION NO: 7
Given:
12.
NumberFormat nf = NumberFormat.getInstance();

13.
nf.setMaximumFractionDigits(4);

14.
nf.setMinimumFractionDigits(2);

15.
String a = nf.format(3.1415926);

16.
String b = nf.format(2);

Which two statements are true about the result if the default locale is Locale.US? (Choose two.)
A. The value of b is 2.
B. The value of a is 3.14.
C. The value of a is 3.1415.
D. The value of a is 3.141.
E. The value of b is 2.0000.
F. The value of a is 3.1416.
G. The value of b is 2.00.
Answer: F,G
QUESTION NO: 8 DRAG DROP
Click the Task button.

Answer:

QUESTION NO: 9
Given:
11.
public class Person {

12.
private String name;

13.
public Person(String name) {

14.
this.name = name;

15.
}

16.
public boolean equals(Object o) {

17.
if ( ! o instanceof Person ) return false;

18.
Person p = (Person) o;

19.
return p.name.equals(this.name);

20.
}

21.
}

Which statement is true?
A. A HashSet could contain multiple Person objects with the same name.
B. If a HashSet contains more than one Person object with name=”Fred”, then removing another Person, also with name=”Fred”, will remove them all.
C. All Person objects will have the same hash code because the hashCode method is not overridden.
D. Compilation fails because the hashCode method is not overridden.
Answer: A
QUESTION NO: 10 DRAG DROP
Click the Task button.

Answer:

QUESTION NO: 11
Given
10.
class Foo {

11.
static void alpha() { /* more code here */ }

12.
void beta() { /* more code here */ }

13.
}

Which two statements are true? (Choose two.)
A. Method alpha() can directly call method beta().
B. Method beta() can directly call method alpha().
C. Foo.beta() is a valid invocation of beta().
D. Foo.alpha() is a valid invocation of alpha().
Answer: B,D
QUESTION NO: 12
Given:
12.
public class Yippee2 {

13.

14.
static public void main(String [] yahoo) {

15.
for(int x = 1; x < yahoo.length; x++) {

16.
System.out.print(yahoo[x] + ” “);

17.
}

18.
}

19.
}

and the command line invocation:
java Yippee2 a b c
What is the result?
A. a b c
B. a b
C. Compilation fails.
D. b c
E. An exception is thrown at runtime.
Answer: D
QUESTION NO: 13
Given:
1.
public class GC {

2.
private Object o;

3.
private void doSomethingElse(Object obj) { o = obj; }

4.
public void doSomething() {

5.
Object o = new Object();

6.
doSomethingElse(o);

7.
o = new Object();

8.
doSomethingElse(null);

9.
o = null;

10.
}

11.
}

When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?
A. Line 5
B. Line 7
C. Line 6
D. Line 10
E. Line 9
F. Line 8
Answer: F QUESTION NO: 14
Given:
1.
public class MyLogger {

2.
private StringBuilder logger = new StringBuuilder();

3.
public void log(String message, String user) {

4.
logger.append(message);

5.
logger.append(user);

6.
}

7.
}

The programmer must guarantee that a single MyLogger object works properly for a multi- threaded system.
How must this code be changed to be thread-safe?
A. synchronize the log method
B. replace StringBuilder with StringBuffer
C. No change is necessary, the current MyLogger code is already thread-safe.
D. replace StringBuilder with just a String object and use the string concatenation (+=) within the log method
Answer: A
QUESTION NO: 15
Given:
23.
int z = 5;

24.

25.
public void stuff1(int x) {

26.
assert (x > 0);

27.
switch(x) {

28.
case 2: x = 3;

29.
default: assert false; } }

30.

31.
private void stuff2(int y) { assert (y < 0); }

32.

33.
private void stuff3() { assert (stuff4()); }

34.

35.
private boolean stuff4() { z = 6; return false; }

Which statement is true?
A. Only the assert statement on line 31 is used appropriately.
B. The assert statements on lines 26, 29, and 31 are used appropriately.
C. The assert statements on lines 29 and 31 are used appropriately.
D. The assert statements on lines 29 and 33 are used appropriately.
E. The assert statements on lines 26 and 29 are used appropriately.
F. All of the assert statements are used appropriately.
G. The assert statements on lines 29, 31, and 33 are used appropriately.
Answer: C
QUESTION NO: 16
Click the Exhibit button.
Which code, inserted at line 14, will allow this class to correctly serialize and deserialize?

A. this = s.defaultReadObject();
B. y = s.readInt(); x = s.readInt();
C. x = s.readInt(); y = s.readInt();
D. s.defaultReadObject();
Answer: C
QUESTION NO: 17
Given:
11.
public void testIfA() {

12.
if (testIfB(“True”)) {

13.
System.out.println(“True”);

14.
} else {

15.
System.out.println(“Not true”);

16.
}

17.
}

18.
public Boolean testIfB(String str) {

19.
return Boolean.valueOf(str);

20.
}

What is the result when method testIfA is invoked?
A. Compilation fails because of an error at line 12.
B. True
C. Not true
D. Compilation fails because of an error at line 19.
E. An exception is thrown at runtime.
Answer: B
QUESTION NO: 18
A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0, object), but does NOT need to support quick random access. What supports these requirements?
A. java.util.LinkedList
B. java.util.Queue
C. java.util.ArrayList
D. java.util.LinearList
Answer: A

We provide Oracle 1Z0-853 help and information on a wide range of issues.Oracle 1Z0-853 is professional and confidential and your issues will be replied within 12 hous.Oracle 1Z0-853 free to send us any questions and we always try our best to keeping our Customers Satisfied.