Java Stream Question and Answers

29. What is the main advantage of EJB over CORBA with respect to CTM design?
  • The problem with CORBA CTM designs was that they all had different server-side component models.
  • In other words, if you developed a component for one vendor's CTM, you couldn't turn around and use that same component in another vendor's CTM. The component models were too different.
  • EJB is a standard server-side component model with which one can develop business objects and expect them to work in any CTM that supports the complete EJB specification.
  • With a standard server-side component model, customers can commit to using an EJB-compliant CTM with the knowledge that they can migrate to a better CTM, if one becomes available.
Your Name Your Email-ID
Your Answer
30. Define the Enterprise JavaBeans (EJB)?
  • The Enterprise Java Beans architecture is a component architecture for the development and deployment of component-based distributed business applications.
  • Applications written using the Enterprise Java Beans architecture is scalable, transactional, and multi-user secure.
  • These applications may be written once and then deployed on any server platform that supports the Enterprise Java Beans specification.
Your Name Your Email-ID
Your Answer
31. Explain the term Concurrency in EJB?
  • The concurrency is one of the primary services required to create an effective CTM, supported by EJB.
  • Entity beans are shared components. Entity beans represent data in the database that is shared and needs to be accessed concurrently.
  • Session Beans do not support concurrent access. A stateful bean is an extension of one client and only serves that client.
  • If they are only used by the client that created them, it does not make sense to make stateful beans concurrent.
  • Stateless session beans don't need to be concurrent because they don't maintain state that needs to be shared.
  • EJB servers handle concurrency automatically and, therefore, a bean's methods do not have to be made thread safe.
Your Name Your Email-ID
Your Answer
32. When is bean managed persistence used?
  • Bean Managed Persistence is used as an alternative to container managed persistence when the deployment tools are inadequate for mapping the bean instance's state to the database.
  • Bean Managed Persistence is preferred by the enterprise developers for creating custom beans for their business system.
Your Name Your Email-ID
Your Answer
12345678910 Page 8 of 10