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
-
business MO
-
UI MO
-
DB
-
none of the above
B
Correct answer
Explanation
UI MO (UI Model Object) is the immediate data source for JSP pages, holding data ready for display. Business MO and DB are backend sources that require additional processing, while UI MO is the presentation layer's direct data interface.
-
Java Screen Page
-
Java Service Page
-
Java Screen Program
-
Java Server Pages
D
Correct answer
Explanation
JSP stands for Java Server Pages, a server-side Java technology that enables dynamic web content generation. It uses HTML-like tags with embedded Java code to create platform-independent web applications.
-
bottom up
-
top to bottom
-
Both 1 &2
-
none of these
A
Correct answer
Explanation
Converting an existing Java application into a web service typically follows a 'bottom-up' approach, where you start with the existing Java code and expose it as a web service interface. This contrasts with 'top-down' where you'd design the WSDL first. 'Bottom up' is the standard approach for legacy application conversion.
-
a protocol that uses XML messages to perform RPC
-
a SOAP Message
-
Used In WSDL
-
none of these
A
Correct answer
Explanation
XML-RPC (Remote Procedure Call) is a protocol that uses XML-encoded messages to perform procedure calls over HTTP. It's a simpler precursor to SOAP. Option A correctly defines it as a protocol using XML messages for RPC. SOAP messages are different (more complex), and while WSDL may describe XML-RPC services, that's not what XML-RPC itself is.
-
A HTTP Protocol
-
A protocol that uses XML messages to perform RPC
-
An XML-based protocol for exchanging information betweenServices
-
An XML-based protocol for exchanging information between computers
D
Correct answer
Explanation
SOAP (Simple Object Access Protocol) is an XML-based protocol for exchanging structured information between computers over networks. Option D is the most complete and accurate definition. Option B describes XML-RPC more specifically, and while SOAP does use XML for RPC, its broader purpose is information exchange between systems/computers.
-
Its a discovery layer within the Web services protocol stack
-
RPC call
-
Same as WSDL
-
Both 2 & 3
A
Correct answer
Explanation
UDDI (Universal Description, Discovery, and Integration) was designed as a discovery layer within the web services protocol stack - a registry for publishing and finding web services. Option A correctly identifies this. It's not an RPC call, and while it works alongside WSDL, it's not the same thing.
-
RequiresNew
-
Supported
-
Never
-
Mandatory
C
Correct answer
Explanation
EJB transaction attributes control method invocation behavior. 'Never' means the method must NOT be invoked within a transaction context - if a client has an active transaction, the container throws an exception. 'Mandatory' requires a transaction (opposite), 'RequiresNew' always creates a new transaction, and 'Supported' runs with or without a transaction.
-
State can be cached but is not representative of the client state
-
State can be cached but is representative of client state
-
State is persistent
-
State is cached first, and then persisted.
B
Correct answer
Explanation
Stateful session beans maintain conversational state with specific clients across method invocations - the cached state represents that client's ongoing session. Stateless beans have NO affinity to clients - any instance can serve any client request, and any cached state is transient and not client-specific. Stateful beans are NOT about persistence.
-
CMP
-
BMP
-
Both
-
None of the Above
A
Correct answer
Explanation
ECRM TIR likely refers to a specific enterprise application component. EJB entity beans use either Container-Managed Persistence (CMP) or Bean-Managed Persistence (BMP). The question expects CMP as the answer, indicating container handles database operations. Without domain context about ECRM TIR's architecture, we accept the claimed answer.
-
Less code than a BMP entity bean
-
Faster data access than BMP
-
Reduced coupling with entity bean
-
Easier to code than BMP entity bean
-
Proxy
-
Decorator
-
Mediator
-
Factory
D
Correct answer
Explanation
The EJB Home interface acts as a Factory pattern - it creates, finds, and removes EJB instances. EJB clients use JNDI to look up the Home interface (the factory), then call create() or findByPrimaryKey() methods to obtain bean references. This abstracts bean instantiation lifecycle. Proxy (A) is for remote/local interfaces, not Home. Decorator and Mediator don't apply.
A
Correct answer
Explanation
In webMethods, the primary messaging models are Publish/Subscribe (asynchronous messaging) and Request/Reply (synchronous messaging). While 'Publish and wait' is not a standard term, it can be understood as describing the publish/subscribe pattern where a publisher sends messages and subscribers receive them, or a variant where one publishes and awaits acknowledgment. Given the context, the statement correctly identifies the messaging patterns available in the webMethods integration platform.
-
webMethods Adapters
-
webMethods Broker
-
webMethods Developer
-
webMethods Integration Server
-
None of the Above
E
Correct answer
Explanation
All the listed options are core components of the webMethods integration platform. webMethods Adapters provide connectivity to external systems, webMethods Broker handles message routing and pub/sub messaging, webMethods Developer is the IDE for creating integration services, and webMethods Integration Server is the runtime engine. Since all of A-D are valid tools, the correct answer is E (None of the Above - meaning none of them is 'not a tool').
-
The process instance name
-
The process template name
-
The object ID of the new process instance
-
A refernce to the BusinessProcess session bean
C
Correct answer
Explanation
When initiating a process instance via a remote EJB interface in business process applications, the operation returns the object ID of the newly created process instance (option C). This ID uniquely identifies the instance for subsequent operations like querying, updating, or completing the process. The process instance name (A) and template name (B) are known before creation and wouldn't be returned. A session bean reference (D) is not what's returned from a start operation.
-
Not always true
-
False
-
True
-
None of these
C
Correct answer
Explanation
Web Services indeed define a platform-independent standard based on XML for communication in distributed systems. This is a fundamental characteristic of web services architecture - they use XML-based protocols like SOAP to enable cross-platform communication.