JaiswalTraining

Get the online training



Corejava Servlet Jsp  Php  Hibernate  Ajax Web Service   Ejb2.1 Ejb3.0 Struts Struts2  JPA Spring Ibatis   JSF    JSF2.0  CoreJavaDesignPattern    Jquery  Flex J2EE-Design-Patterns  Jboss7  Maven  Contact Me                                                                                                                                                                        
            IGNOU SMU PTU Project                                           Training                                                                                                                              
              

Contact Us  0091- 9210721663         jaiswaltraining@gmail.com




Corejava
Servlet
Jsp
Php
Hibernate
Ajax
Web Service
Ejb2.1
Ejb3.0
Struts  
Struts2
JPA
Spring
Ibatis
JSF
JSF2.0
CoreJavaDesignPattern
Jquery
Flex
J2EE-Design-Patterns
Jboss7
Maven







Service Locator
  • Context
    • Service lookup and creation involves complex interfaces and network
      operations.
Problem and Forces
  • EJB clients need to use the JNDI API to look up EJBHome objects
  • JMS clients need to use JNDI API to look up JMS components
  • Context factory to use for the initial JNDI context creation is vendor dependent
  • Initial context creation and service object lookups may impact application
    performance.
Solution
  • Use a Service Locator object to abstract all JNDI usage and to hide the complexities
    of initial context creation, EJB home object lookup, and EJB object re-creation.
  • Multiple clients can reuse the Service Locator object to reduce code complexity,
    provide a single point of control
  • Service Locator can improve performance by providing a caching facility.


Related Patterns
  • Business Delegate
    The Business Delegate pattern uses Service Locator to gain access to the business service objects like EJB objects, JMS topics, and JMS queues.
  • Session Facade
    The Session Facade pattern uses Service Locator to gain access to the enterprise beans that are involved in a workflow.
  • Transfer Object Assembler
    The Transfer Object Assembler pattern uses Service Locator to gain access to the various enterprise beans it needs to access to build its composite Transfer Object