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 this iz sunil here I done with my b.sc in cs and planning to go fr java course shld I prefer for institution or a lecturer who teaches java at his own tuitions ...
i can teach you java the way you can play with real world thinking you don't need of knowledge of any other language. you can directly learn java
Sunil
0 0
5
What are the different types of Exceptions in Java?
Null pointer exception ArrayOutOfIndex exception DivideByZero exception
Aakanksha
Can we use pointer in java?
No, we can't. Java has reference variables which contains address of objects. The reference variables are substitute to pointers in java. But, we cannot perform mathematical operations on reference variables...
Manish
What is Constructor in Java?
1. Constructor is just like a method ( referred as special method as it appearance look like normal methods) 2. It's name is same as class name 3. It doesn't return any value 4. It is invoked/called...
Ujwalajagdale
0 0
8

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 Learning Tip
The easy way to learn any programatical language is just simple practices. Take a simple examples and practice daily one hour. And also go through the learning videos from youtube or somewhere else.

JAVA Online Training
What is Java? Java is a technology developed by James Gosling at Sun Microsystems, Sun Microsystems is now a part of Oracle Corporation. This is one of the most powerful & securable language used to...

Software Development Training In Jaipur
Satyam Web Solution provides website designing &development and software designing &development training in Jaipur for various stream’s students. MCA 6 month Industrial Training/Internship B....

What Is Java? Explain The History Of Java
i. Ovierview: Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java...

Java : Compile-time Versus Runtime optimization
While designing and development, one should think in terms of compile-time and run-time.It helps in understanding language basics in a better way.Let's understand this with a question below : What...
S

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