UrbanPro
true

Learn Java Training from the Best Tutors

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

Search in

Use of Service Locator Pattern

M
Milan M.
16/12/2016 0 0

If we want to reuse the java code that should be the best approach w.r.t re-usability, maintanence and saving time to concentrate on our own businbess logic/requirement. In the similar approach many patterns has been evolved which gives developer a opennes to decouple the functional logic and deploy as plug and play which is so famous as plugins in programming world. 

The plugins gives developer feasibility to reuse and extend the existing/implemented features and get benefited with that. Using the Jars we can de-couple our object creation like factory pattern and create the object at runtime depends upon the implementing factory class available on classpath. Service locator also works in same way where service provider need to define a descriptor file with the full class name of its abstract class (or interface) which contains the information of URI and its corresponding full implenting class. This way the vendor can publish its factory and implementing class within jar and put on class path to automatically come into action.

Tomorrow, if requirement gets changed or we recommended to use any other factory then simply we can add the updated jar into appended classpath and if it will get loaded first then it will be in action. So it is so easy to directly plug & play with such user frindly pattern. Such patterns are mostly we can see with xml parsers.

 

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Understanding concept of Inheritance in Java
Inheritance: Acquiring a properties and methods from Parent class to Child class. For example, In some cases we can hear from any one of your relative or your friends will say like that "You are bahaving...

How to create a Singleton class?
How to create a Singleton class: Q) What is a singleton class? A) In simple words, a singleton class is a class which can have only one instance at any point of time throughout the application and provides...

Demand of java in industry
Java is one of the widest use language in the industry all around the world As in software market more than 80% software, platform developed using java. Java comes in three flavours:- j2se for window based...

Prashant Tomer

0 0
0

Advance Java
1) Servlet • Basics of Servlet • Servlet Request • Servlet Collaboration • Servlet Config • Servlet Context • Attribute • Session Tracking • Event and Listener •...
A

Overloading in JAVA
When a class contains more than one method with the same method name but different argument types, then it is called Overloading. Methods are said to be Overloaded methods. Also, know as Compile time...
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