Skip to main content

Contact Us

Comments

Popular posts from this blog

Apache Solr Search Framework

Introduction: SOLR stands for Searching On Lucene with Replication . Its main functionalities are indexing and searching. Solr is an open source enterprise search server/ web application Created by Yonik Seeley in 2004. In 2012 4.0 version with Cloud support. Solr uses lucene search library and extends it. Solr exposes lucene Java API's as RESTful services. Terminology: Solr Instance: In Apache Solr, a Solr Instance is an instance a Solr running in the JVM. In Standalone mode, Solr contains only one instance. Solr Core: In Apache Solr, a Solr Core is also known as simply “Core”. In other words, a Solr Core = an instance of Apache Lucene Index + Solr Configuratio. Indexing: In Apache Lucene or Solr, Indexing is a technique of adding Document’s content to Solr Index so that we can search them easily. Apache Solr uses Apache Lucene Inverted Index technique to Index it’s documents. That’s why Solr provides very fast searching feature. Document: Solr...

Basic Exception Handling

What is Exception: Excetion is a runtime error caused due to logical mistake occured in the program beacause of wrong input given by the User. According  to Java language, value, message or excpetion everything is an object. In function programming, we return value. Throwing exception is like returning value and If we see according to User,methods are just services nothing else. What is our(developer's) responsibility: We must convert Java Exception message into End User Understandable.Here, Conversion I mean,catching Exception object and get information using getters provided such as getMessage() and modify this message with End user understandable format. Sun Microsystem(now Oracle) defined several classes to represent and handle logical mistakes. All these classes are defined in java.lang package with a super class Throwable. All Exception handling classes categorized into two sub-categories: Error Exception Exception classes a...

Exception Propagation and throw-throws keyword

Exception Propagation: Sending exception from one method to another method is called exception propagation Here propagation is nothing but sending. So guys what is the situation when we are going to implement this propagation concept? Answer to this question is when we throw an exception, if it is not caught in that method it is propagated to another method and interesting thing is that we don’t need to do anything in this process we just need to throw an exception that’s it. Rule: If the propagated exception is checked exception then not only current method developer but also method’s caller method developer should caught or report that checked exception else it leads to same compiler exception….CE: Unreported Exception So according to that basic rule is “If checked exception is raised the method either directly by using throw keyword or indirectly by a method call it must be caught or reported. void m1() throws ClassNotFoundException{ ...