UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is Service Locator in java?

Asked by Last Modified  

20 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Coaching

The Service Locator abstracts the API lookup (naming) services, vendor dependencies, lookup complexities, and business object creation. Provides a simple interface to clients. This reduces the client's complexity. In addition, the same client or other clients can reuse the Service Locator.
Comments

Experienced QA Trainer

Object-oriented design can lead to the development of complex class structures with components that are dependent upon other types. If the dependent classes instantiate their dependencies directly they are said to be tightly coupled. This decreases the flexibility of the components and increases the...
read more
Object-oriented design can lead to the development of complex class structures with components that are dependent upon other types. If the dependent classes instantiate their dependencies directly they are said to be tightly coupled. This decreases the flexibility of the components and increases the effort required to change functionality and substitute types. Dependency injection design that decouple classes from their dependencies. The service locator design is an alternative approach for promoting loose coupling but does not require injection of dependencies via interfaces, constructors or properties. read less
Comments

The service locator pattern is a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer. This pattern uses a central registry known as the "service locator", which on request returns the information necessary to perform...
read more
The service locator pattern is a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer. This pattern uses a central registry known as the "service locator", which on request returns the information necessary to perform a certain task etc read less
Comments

MCA, BSC(H)(IT), 2 years diploma in advanced software Technology.

The service locator design pattern is used when we want to locate various services using JNDI lookup. Considering high cost of looking up JNDI for a service, Service Locator pattern makes use of caching technique. For the first time a service is required, Service Locator looks up in JNDI and caches the...
read more
The service locator design pattern is used when we want to locate various services using JNDI lookup. Considering high cost of looking up JNDI for a service, Service Locator pattern makes use of caching technique. For the first time a service is required, Service Locator looks up in JNDI and caches the service object. Further lookup or same service via Service Locator is done in its cache which improves the performance of application to great extent. Following are the entities of this type of design pattern. Service - Actual Service which will process the request. Reference of such service is to be looked upon in JNDI server. Context / Initial Context -JNDI Context, carries the reference to service used for lookup purpose. Service Locator - Service Locator is a single point of contact to get services by JNDI lookup, caching the services. Cache - Cache to store references of services to reuse them Client - Client is the object who invokes the services via ServiceLocator. read less
Comments

The service locator design pattern is used when we want to locate various services using JNDI lookup. Considering high cost of looking up JNDI for a service, Service Locator pattern makes use of caching technique.
Comments

Conducting online classes for java,j2ee,hibernate,spring and webservices

It is design pattern. Instead of exposing ur class to others just exposing one service class that contains to locating original class.
Comments

IT Professional Trainer with 15 years of experience in IT Industry

The service locator design pattern is used when we want to locate various services using JNDI lookup. Considering high cost of looking up JNDI for a service, Service Locator pattern makes use of caching technique. For the first time a service is required, Service Locator looks up in JNDI and caches the...
read more
The service locator design pattern is used when we want to locate various services using JNDI lookup. Considering high cost of looking up JNDI for a service, Service Locator pattern makes use of caching technique. For the first time a service is required, Service Locator looks up in JNDI and caches the service object. Further lookup or same service via Service Locator is done in its cache which improves the performance of application to great extent. Following are the entities of this type of design pattern. read less
Comments

Trainer

Service Locator - Service Locator is a single point of contact to get services by JNDI lookup, caching the services. Cache - Cache to store references of services to reuse them Client - Client is the object who invokes the services via ServiceLocator. Implementation We're going to create a...
read more
Service Locator - Service Locator is a single point of contact to get services by JNDI lookup, caching the services. Cache - Cache to store references of services to reuse them Client - Client is the object who invokes the services via ServiceLocator. Implementation We're going to create a ServiceLocator,InitialContext, Cache, Service as various objects representing our entities.Service1 and Service2 represents concrete services. ServiceLocatorPatternDemo, our demo class is acting as a client here and will use ServiceLocator to demonstrate Service Locator Design Pattern. read less
Comments

Tutor

1.Service Locator is a J2EE Pattern. 2.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...
read more
1.Service Locator is a J2EE Pattern. 2.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, and improve performance by providing a caching facility. read less
Comments

Industry expert and professional lecturer/trainer

It is a design pattern
Comments

View 18 more Answers

Related Questions

Hi, Can anyone help me on below queries? 1. What makes a class as "Thread safe class" ? 2. equals() method uses 3. Difference between String vs StringBuffer ?
There are three ways to construct thread-safe Java class which has some state: 1. Make it truly immutable 2.Make field volatile. 3.Use a synchronized block
Saurav
what is the use of request get parameter map in servlet with example
All the form data will be stored in the form of Map with key value pair. This Map object will be returned from the getParameterMap().
Pushpendra

What is meant by Java full stack and angular Java?

Fullstack development means the combination of UI technologies (client-side) + Backend technology (server-side). UI technology like Angular or ReactJs (Front end technologies). It's all about client-side...
Anuradha
Is JAVA training only for technical students or a non-technical student also may join?
Any Body can Learn Programming Language.It All depends upon the learning of basics and all.Basics actually makes the thing different.
Vikrant
0 0
6

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Java Program Sample Application
/* WAP to print given message on the console using java*/ // Class declaration in java class sample { // Main function public static void main(String args) { // function for printing on the console System.out.println("Hello...

Inheritance In Java
Inheritance: The process of getting properties and behaviors from one class to another class is called inheritance. Properties: Variables Behaviors: Methods The main purpose of the inheritance...
D

Deleted U.

1 0
0

Difference Between Checked And Un-Checked Exception
1. Exception is an abnormal condition in the program, if raises program terminates abnormally. 2. Exception always occurs at runtime only, there is no chance of exception at compile time. 3. Syntactical...

Access Specifiers â?? Private, Protected, Public, Package-private
Access level modifiers determine whether other classes can use a particular field or invoke a particular method. The following table shows the access to members permitted by each modifier. Access...

Comparable vs Comparator
java.lang.Comparable java.util.Comparator For comparing some other object with its own object. Ex. I am comparing myself to some other employee. Method signature is: int compareTo (T object). For...

Recommended Articles

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more