Computer Knowledge
Java Enterprise and Web Technologies
2,279 Questions
Java enterprise and web technologies questions focus on J2EE architecture, web services like SOAP, and servlet functionalities. These topics frequently appear in IT officer and specialist scale examinations. Regular practice ensures familiarity with enterprise application components.
HttpServlet methodsSOAP and web servicesEJB architecture rolesJ2EE componentsJSP servlet callingUDDI concepts
Java Enterprise and Web Technologies Questions
-
Provide a standard for registries
-
Provide a standard for repositories
-
Declare an information model using XML schema to represent SOA Metadata
-
Declare a collection of Web Services using Web Service Description Language (WSDL)
-
None, UDDI facilities all of the above
B
Correct answer
Explanation
UDDI DOES provide standards for registries (A), uses XML schema for SOA metadata representation (C), and declares web services using WSDL (D). What UDDI does NOT provide is a standard for repositories - it focuses on registries for service discovery, not full repository standards for storage and management.
D
Correct answer
Explanation
SOAP (Simple Object Access Protocol) is the correct answer because it specifically defines an XML-based extensible message format, provides standard bindings to HTTP protocol, and establishes conventions for encoding data and representing remote procedure calls. WSDL describes services but doesn't define message formats or bindings, XML is only a markup language, and UDDI is for service discovery.
-
Find
-
Publish
-
Bind
-
Register
B
Correct answer
Explanation
In the SOA publish-find-bind model, Publish describes making service descriptions available in a registry (like UDDI). Find is searching for services, Bind is connecting to use a service, and Register isn't one of the three core SOA operations. The question specifically asks about sending descriptions TO a registry.
-
Accesses a WSDL description from the UDDI registry and binds to the service using SOAP
-
Accesses a UDDI description from the WSDL registry and binds to the service using SOAP
-
Accesses a SOAP description from the UDDI registry and binds to the service using UDDI
-
Accesses a SOAP description from the WSDL registry and binds to the service using UDDI
A
Correct answer
Explanation
The standard web service consumption pattern is: query UDDI registry for services, retrieve WSDL description of the desired service, then use SOAP to bind and invoke the service. WSDL describes the service interface, UDDI is the registry, and SOAP is the communication protocol.
-
Asynchronous Web Services require message correlation
-
Asynchronous Web Services tightly couple clients to the business processing
-
Asynchronous Web Services are ideal for integrating with external business partners
-
Asynchronous Web Services are best suited for simple fast business operations that return results
C
Correct answer
Explanation
Asynchronous Web Services are ideal for external partner integration because they don't require real-time responsiveness and can handle variable response times and network latency. Option A is incorrect because while message correlation is often used, it's not an absolute requirement. Option B is incorrect because async services actually DECOUPLE clients from processing. Option D is incorrect because async services are suited for long-running operations, not simple fast operations.
-
Another BPEL Process
-
A java client
-
A non-java client
-
All of the above
D
Correct answer
Explanation
BPEL (Business Process Execution Language) processes expose web service interfaces, making them invocable by any client that can make SOAP or REST calls. This includes other BPEL processes, Java clients, and non-Java clients (.NET, Python, etc.) through standard web service protocols.
-
StreamAdapter
-
SocketAdapter
-
FileAdapter
-
AQAdapter
C
Correct answer
Explanation
The FileAdapter is specifically designed for file system operations within BPEL processes. StreamAdapter handles streaming data, SocketAdapter manages network socket connections, and AQAdapter is for Oracle Advanced Queuing.
-
getVariableData
-
getContentAsString
-
getElement
-
getVariableProperty
A
Correct answer
Explanation
In BPEL (Business Process Execution Language), the standard XPath extension function getVariableData is used to retrieve and read data from a specified BPEL variable.
B
Correct answer
Explanation
Asynchronous BPEL processes require two portTypes - one for the client-to-service request operation and another for the service-to-client callback operation. Synchronous processes only need one portType.
-
Java Embedding
-
Wrapper
-
Transform
-
None of these
A
Correct answer
Explanation
Java Embedding is the activity that allows developers to write custom Java code within a BPEL process. Wrapper is not a standard BPEL activity, Transform is for XML conversions, and Option D is incorrect.
-
One
-
Two
-
Three
-
More than Three
-
Action Mapping
-
Action Form
-
HttpServletRequest
-
HttpServletResponse
A,B,C,D
Correct answer
Explanation
The execute() method in a Struts Action class receives four parameters: ActionMapping (describes the action mapping), ActionForm (contains form data), HttpServletRequest (the HTTP request object), and HttpServletResponse (the HTTP response object). These provide all necessary context for request processing.
-
By placing hibernate.properties file in the classpath.
-
Including <property> elements in hibernate.cfg.xml in the classpath.
-
both 1 and 2
-
none of the above
C
Correct answer
Explanation
Hibernate can be configured in two common ways: by placing a hibernate.properties file in the classpath, or by using XML configuration with elements in hibernate.cfg.xml in the classpath. Both approaches allow setting database connection, dialect, and other configuration properties.
-
configuration.buildSessionFactory();
-
configuration.createSessionFactory();
-
configuration.createNewSessionFactory();
-
none of the above
A
Correct answer
Explanation
To create a SessionFactory in Hibernate, you call the buildSessionFactory() method on a Configuration object. The typical pattern is: SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();