Month End Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

Which of the following methods of the java.util.logging package logs a message, specifying source class and method, with associated Throwable information?

A.

logrb

B.

log

C.

logp

D.

logth

Which of the following methods can be invoked by a message-driven bean?

Each correct answer represents a complete solution. Choose all that apply.

A.

MessageDrivenContext.isCallerInRole()

B.

MessageDrivenContext.getUserTransaction()

C.

MessageDrivenContext.getEJBHome()

D.

MessageDrivenContext.getRollbackOnly()

Which of the following is a Permission class whose permissions have no actions, and allows suppressing the standard Java programming language access checks?

A.

java.awt.RuntimePermission

B.

java.security.SecurityPermission

C.

java.lang.reflect.ReflectPermission

D.

java.lang.AllPermission

You work as a developer for PassGuide Inc. You have implemented a session bean with a method doPrint(), which behaves differently depending on the caller's security role. Only MANAGER in the security roles "ADMIN" and "MANAGER" are allowed to call the method. Which of the following actions are appropriate to accomplish if there is no security-related metadata in the deployment descriptor?

Each correct answer represents a complete solution. Choose all that apply.

A.

If EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for MANAGER in role ADMIN.

B.

If EJBContext.isCallerInRole("ADMIN") returns true, implement the behavior defined for MANAGER in role "ADMIN".

C.

Annotate method doPrint() with @RolesAllowed({"ADMIN","MANAGER"}).

D.

Annotate method doPrint() with @PermitAll.

Which of the following, in JDBC 2.0, are the sub interfaces of the Statement interface?

Each correct answer represents a complete solution. Choose two.

A.

ParsedStatement

B.

CompiledStatement

C.

PreparedStatement

D.

CallableStatemen

Which of the following classes is an engine class designed to provide conversions between opaque cryptographic keys and allows you to build an opaque key object from a given key specification?

A.

KeyPair

B.

KeyFactory

C.

CertificateFactory

D.

KeyPairGenerator

Which of the following code fragments will compile without error?

Each correct answer represents a complete solution. Choose all that apply.

A.

boolean a = false;

if(a)

System.out.println(a);

B.

int a = 10;

if(a != 10)

System.out.println(a);

C.

int a = 0;

if(a)

System.out.println(a);

D.

boolean a = true;

if(!a);

Mark works as a Programmer for InfoNet Inc. He writes the following programs.

1. package book;

2. public class read

3. {

4. (access modifier) int r1=10;

5. }

1. package book1;

2. import book.read;

3. class Doread extends read

4. {

5. public void test()

6. {

7. System.out.println("The value of r1 is." +r1);

8. }

9. }

Which of the following access modifiers will be put in the place of the word, (access modifier), to compile the program successfully?

A.

default

B.

public

C.

protected

D.

private

E.

volatile

Which of the following statements about the form-based authentication are true?

Each correct answer represents a complete solution. Choose two.

A.

It provides a weaker security check than the HTTP Digest and HTTPS Client authentications.

B.

It requires a hidden field that supplies the login-constraint used by the application.

C.

It requires that the action of the login form must be j_security_check.

D.

It transmits username and password over the network in the form of Base64 encoding.

Which of the following statements about a filter are true?

Each correct answer represents a complete solution. Choose all that apply.

A.

Like a servlet, a filter is also declared in the deployment descriptor.

B.

The life cycle of a filter is managed by the container.

C.

The life cycle of a filter has three methods, namely init(), service(), and destroy().

D.

Every filter must implement the Filter interface.