Tech Tips Quiz
Over the years, the Enterprise Java Technologies Tech Tips have covered a wide variety of enterprise Java technology topics. Here's a short quiz that tests your knowledge of some topics covered in past Tech Tips. You can find the answers at the end of the quiz.
1.
Which of the following inheritance strategies is not supported by the Java Persistence API?
a.
Single Table Per Class Hierarchy
b.
Joined Subclass
c.
Single Table Per Class
d.
Multiple Hierarchy
2.
What is the primary purpose of the
javax.xml.ws.Provider
API?
a.
Binds XML to Java objects.
b.
Allows web services to work directly with messages.
c.
Simplifies WSDL creation.
d.
Specifies the URL of a web service provider.
e.
None of the above
3.
Which of the following statements about the
ELResolver
class is true?
a.
In Java EE 5, the classes
VariableResolver
and
PropertyResolver
have been merged into the
ELResolver
class.
b.
The way an expression is resolved can be customized by adding custom
ELResolver
subclasses to the
ELResolver
chain.
c.
To make an
ELResolver
class visible to the Java EE runtime, it must be declared in an application configuration resource file.
d.
All of the above.
4.
What does the
<service-name-pattern>
element in the following set of XML statements do:
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
<handler-chain>\
<service-name-pattern
xmlns:ns1="http://example.com/handlers">
ns1:HelloService
</service-name-pattern>
<handler/>
<handler/>
</handler-chain>
</handler-chains>
a.
Applies the handlers specified in the
<handler-chain>
element to the service with the Java EE qname
{http://example.com/handlers}HelloService
.
b.
Adds a service named
HelloService
to the handlers specified in the
<handler-chain>
element.
c.
Applies the handlers specified in the
<handler-chain>
element to all ports whose names begin with
HelloService
.
d.
None of the above.
5.
What role does an
XMLHttpRequest
object play in an AJAX-enabled application?
a.
It's used as a proxy to transmit requests to a server in a different domain.
b.
It's used to identify a filter for exchange of XML-based
AJAX
requests between the client and server.
c.
It's used to transmit
AJAX
requests asynchronously over HTTP to a server-side component.
d.
There is no such thing as an
XMLHttpRequest
object.
Answers
1.
Which of the following inheritance strategies is not supported by the Java Persistence API?
d.
Multiple Hierarchy. The Java Persistence API allows for three different inheritance strategies that dictate how subclasses are mapped to database tables. The three strategies are single table per class hierarchy, joined subclass, and single table per class.
2.
What is the primary purpose of the
javax.xml.ws.Provider
API?
b.
Allows web services to work directly with messages. The JAX-WS 2.0 specification provides two new APIs which make it possible for web services to work with messages or message payloads. The APIs are
javax.xml.ws.Provider
and
java.xml.ws.Dispatch
.
Provider
is a server-side API, while
Dispatch
is a client-side API.
3.
Which of the following statements about the
ELResolver
class is true?
d.
All of the above. For more about the
ELResolver
class, especially how to create a customized
ELResolver
.
4. What does the
<service-name-pattern>
element in the following set of XML statements do:
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
<handler-chain>
<service-name-pattern
xmlns:ns1="http://example.com/handlers">
ns1:HelloService
</service-name-pattern>
<handler/>
<handler/>
</handler-chain>
</handler-chains>
e. Applies the handlers in the specified in the <handler-chain>
element to the service with the Java EE qname {http://example.com/handlers}HelloService
. The <service-name-pattern>
element applies handlers to specific services. Handlers are interceptors that can be easily plugged into the JAX-WS 2.0 runtime environment to do additional processing of inbound and outbound messages. A handler chain is an ordered list of handlers that is used for configuring handlers. .
5.What role does an
XMLHttpRequest
object play in an AJAX-enabled application?
c.
It's used to transmit
AJAX
requests asynchronously over HTTP to a server-side component. An
XMLHttpRequest
object plays a central role in the
AJAX
methodology as the means of interaction between the client and server-side component that processes
AJAX
requests.
posted on 2006-11-27 09:26
Sun River 阅读(256)
评论(0) 编辑 收藏 所属分类:
XML