Tag: architecture

Questions Related to architecture

  1. When fetching frequently used read-only data.

  2. If you need to manage the workflow or several EJBs.

  3. At any time, multiple clients can have access to the bean instance.

  4. When the bean should represent a business entity.

  5. The bean needs to hold data about the client across multiple invocations.

  6. To asynchronously receive JMS messages.


Correct Option: B,E
  1. At any time, only one client has access to the bean instance

  2. At any time, multiple clients can have access to the bean instance

  3. When the bean should represent a business entity

  4. The bean is not required to be persistent

  5. To synchronously receive JMS messages

  6. To asynchronously receive JMS messages


Correct Option: A,D,E
  1. In EJB 3.0, persistent fields must be identified through deployment descriptor.

  2. The persistent state of an entity is represented either by its persistent fields or persistent properties.

  3. For an EJB 3.0 entity, you no longer need to code interfaces such as LocalAddressHome and LocalAddress.

  4. In the Java Persistence API, you do not not need to provide an XML descriptor to specify an entity's primary key.

  5. Java Persistence API is simplified by removing support for complex relationships between Entities.


Correct Option: B,C,D
  1. Application can be isolated from the database and the only connection to it is using the ORM framework and a JDBC driver.

  2. Developer productivity increases.

  3. Performance will be slower than direct JDBC connections.

  4. Application maintainance may be a problem.


Correct Option: D
  1. Supports the processing of XML content, data binding, and the development SOAP based and RESTful Web Services.

  2. Web Services exposed by JAX-WS can only be of type document/literal.

  3. Stateless session beans cannot be exposed as web services using Java EE technology.

  4. JAX-WS greatly simplifies the web service implementation model.


Correct Option: B,C
  1. When EJB is called by client, parameters will be passed by reference

  2. Methods must have RMI-IIOP compatible parameters and return types

  3. Methods must have JAXB compatible parameters and return types

  4. Use annotation @WebService and @WebMethod for deployment.


Correct Option: A
  1. Dependency Injection

  2. Interceptors

  3. Intercepting Filter Pattern

  4. None of the above. You need to write code for measuring response times.


Correct Option: B
  1. You must write ejbPassivate() method. Shift the logic to this method.

  2. Mention the method name in the deployment descriptor

  3. Use annotations

  4. There is no such facility in EJB3.0


Correct Option: C
  1. They are components.

  2. A container manages them.

  3. More than one of them can be combined in a single program (not application).

  4. They live on the server side of an application.

  5. They can be part of a transaction.


Correct Option: B,D,E