<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6931307677272092439</id><updated>2025-08-01T08:11:56.853-07:00</updated><category term="Java Interview Questions"/><category term="Core Java"/><category term="Java Libraries"/><category term="WebLogic"/><category term="Design Patterns"/><category term="JDBC"/><category term="Exception Handling"/><category term="WebSphere MQ Series Interview Questions"/><category term="E-Books"/><category term="MQ Administration"/><category term="WebSphere MQ"/><category term="SOA"/><category term="Webservices"/><category term="XML"/><category term="Garbage Collection"/><category term="PDF Libraries"/><category term="Static"/><category term="JSP Interview Questions"/><category term="MQ Series"/><category term="Threads"/><category term="Collections"/><category term="Servlets"/><category term="String"/><category term="WebSphere"/><category term="ArrayList"/><category term="Files n Streams"/><category term="Linux"/><category term="400 Java Interview Questions"/><category term="EJB"/><category term="JAXB"/><category term="Serialization"/><category term="Tutorials"/><category term="Variables"/><category term="Ant"/><category term="Behavioral Pattern"/><category term="Hibernate"/><category term="JSTL"/><category term="Java Interview Tips"/><category term="SQL"/><category term="Constructor"/><category term="Creational Pattern"/><category term="Flex"/><category term="Inner Classes"/><category term="JVM"/><category term="Logging"/><category term="Maven"/><category term="Message Broker"/><category term="SOAP"/><category term="Service Oriented Architecture"/><category term="Spring"/><category term="Spring Interview Questions"/><category term="Ubuntu"/><category term="WSDL"/><category term="WebServices Interview Questions"/><category term="WebSphere MB"/><category term="Asynchronous"/><category term="Debugging"/><category term="Enhanced for loop"/><category term="Immutable"/><category term="Iterator"/><category term="JSP"/><category term="Log4j"/><category term="Overloading"/><category term="Reflection"/><category term="Structural Pattern"/><category term="Transient"/><category term="UDDI"/><category term="Abstract Class"/><category term="Arrays"/><category term="Build Errors"/><category term="Daemon Thread"/><category term="Enum"/><category term="Enumeration"/><category term="HashMap"/><category term="HashSet"/><category term="HashTable"/><category term="HttpURLConnection"/><category term="Interface"/><category term="JAXP"/><category term="JMS"/><category term="JavaScript"/><category term="LinkedList"/><category term="Misc"/><category term="Networking"/><category term="Overriding"/><category term="Polymorphism"/><category term="Singleton Pattern"/><category term="Stored Procedures"/><category term="StringBuffer"/><category term="Synchronization"/><category term="TreeSet"/><category term="Volatile"/><category term="core java tips"/><category term="exceptions"/><category term="installation"/><category term="synchronous"/><category term="AJAX Tutorials"/><category term="Android"/><category term="Ant Script"/><category term="Autoboxing"/><category term="Bridge Pattern"/><category term="Build"/><category term="Class variables"/><category term="Collections Interview Questions"/><category term="DOM"/><category term="Data Objetcs"/><category term="Docker"/><category term="Domain Objects"/><category term="Eclipse"/><category term="Enterprise Java Beans"/><category term="Entity Bean"/><category term="Garbage Collection Interview Questions"/><category term="HTTP"/><category term="Instance Variables"/><category term="Iterator Pattern"/><category term="JAR"/><category term="JNDI"/><category term="JTS"/><category term="Java"/><category term="Java Bean"/><category term="Java Mail"/><category term="Java Programing"/><category term="Marker Interface"/><category term="Memory Leak"/><category term="Multithreading"/><category term="MySQL"/><category term="NetBeans"/><category term="OOP Concepts"/><category term="PHP"/><category term="Pooling"/><category term="ResultSet"/><category term="Resume"/><category term="SAX"/><category term="Serializable"/><category term="Serialization Interview Questions"/><category term="Set"/><category term="SimpleDateFormat"/><category term="Singleton"/><category term="Spring Framework"/><category term="StringBuilder"/><category term="System.gc()"/><category term="TIBCO"/><category term="Tools"/><category term="Tricky Questions"/><category term="UNIX"/><category term="Vector"/><category term="XSD"/><category term="concurrency"/><category term="dameon thread"/><category term="for loop"/><category term="instanceof"/><category term="lazy loading"/><category term="parsing"/><category term="regex"/><category term="scalability"/><category term="security settings"/><category term="super class"/><category term="synchronized"/><category term="thread-safe"/><category term="wait"/><category term="AIX"/><category term="AJAX"/><category term="AJAX Resources"/><category term="AMQP"/><category term="AOP"/><category term="Abstract Factory"/><category term="AccessControlException"/><category term="Adapter Pattern"/><category term="Android Applications"/><category term="Ant Tutorial"/><category term="Antmode"/><category term="Apache Server"/><category term="Applet"/><category term="Application Development"/><category term="Application Server"/><category term="Applications"/><category term="Architecture"/><category term="Array Exceptions"/><category term="Aspect Oriented Programing"/><category term="Bean Factory"/><category term="Bean Life Cycle"/><category term="Best JavaScript Resources"/><category term="Big Faceless PDF Library"/><category term="Big Faceless Report Generator"/><category term="Builder Pattern"/><category term="C++"/><category term="CAM"/><category term="CPMake"/><category term="CPP"/><category term="CRTL"/><category term="CSS"/><category term="Caching"/><category term="Certification"/><category term="Cloneable"/><category term="Cloning"/><category term="Cloud Computing"/><category term="CollationKey"/><category term="Collator"/><category term="Collections Framework"/><category term="Command Pattern"/><category term="Comparable"/><category term="Comparator"/><category term="Composite Pattern"/><category term="Connla"/><category term="Continuum"/><category term="CruiseControl"/><category term="DB2"/><category term="DTF"/><category term="Database"/><category term="DateFormat"/><category term="Deserialization"/><category term="Detached"/><category term="Differences"/><category term="Dispatch Action"/><category term="Document"/><category term="EAR"/><category term="EJB Interview Questions"/><category term="EJBException"/><category term="EVT"/><category term="ElegantJ PDF Library"/><category term="Event Handling"/><category term="Extensibility"/><category term="FAQs"/><category term="FEATURE_SECURE_PROCESSING"/><category term="FOP"/><category term="Facade Pattern"/><category term="Factory Pattern"/><category term="FileTypes"/><category term="Flyweight Pattern"/><category term="Framework"/><category term="Free E-Book"/><category term="Front-end Design"/><category term="GenJar"/><category term="HCl Walk-ins"/><category term="HTML"/><category term="Hibernate Interview Questions"/><category term="How To Get Job"/><category term="HttpSessionListener"/><category term="Hunt Jobs"/><category term="IOC"/><category term="IP Address"/><category term="IT Jobs"/><category term="Immutable Objects"/><category term="Initializer Blocks"/><category term="Internationalization"/><category term="Interpretor Pattern"/><category term="Interview"/><category term="Interview Tips"/><category term="Invicta"/><category term="Ivy"/><category term="J2ME"/><category term="JAM"/><category term="JAX"/><category term="JAX-RPC"/><category term="JAX-RS"/><category term="JAXR"/><category term="JBoss"/><category term="JCS"/><category term="JCX"/><category term="JDBC Drivers"/><category term="JDK"/><category term="JFace"/><category term="JFreeReport"/><category term="JMX"/><category term="JNI"/><category term="JPD"/><category term="JPF"/><category term="JQuery"/><category term="JRE"/><category term="JSON"/><category term="JSX"/><category term="JTA"/><category term="JUnit"/><category term="JWS"/><category term="Jasper Reports"/><category term="JasperReports"/><category term="Java 2 security error"/><category term="Java Application"/><category term="Java Architect"/><category term="Java Collections"/><category term="Java Design Patterns"/><category term="Java Exceptions Interview Questions"/><category term="Java Logging"/><category term="Java Server Pages"/><category term="Java Socket"/><category term="Java Threads Interview Questions"/><category term="JavaScript Tutorials"/><category term="JoinColumn"/><category term="JustFormsPDF"/><category term="Krysalis Centipede"/><category term="LDAP"/><category term="Life Cycle of Entity Bean"/><category term="LinkedHashMap"/><category term="List"/><category term="Luntbuild"/><category term="MDB"/><category term="MFL"/><category term="MQ Clustering"/><category term="MQ Clustring"/><category term="MQ Script Commands"/><category term="MQ Triggering"/><category term="Maintainability"/><category term="Map"/><category term="Mediator Pattern"/><category term="Message Driven Bean"/><category term="Messaging"/><category term="Meta Model"/><category term="MetaData"/><category term="Modifiability"/><category term="Modularity"/><category term="Multimedia"/><category term="Nested Classes"/><category term="NoClassDefFoundError"/><category term="NullPointer"/><category term="O/R Mapping"/><category term="OOPs Concepts"/><category term="Object States"/><category term="Objects"/><category term="OneToOne Mapping"/><category term="Oracle Interview Questions"/><category term="OracleXAResource.checkError"/><category term="PDFBox"/><category term="PL SQL"/><category term="Packages"/><category term="Pagination"/><category term="ParameterMetaData"/><category term="Perl"/><category term="Persistent"/><category term="Pooled State"/><category term="ProcessBuilder"/><category term="Projects"/><category term="Prototype Pattern"/><category term="Proxy Pattern"/><category term="REST"/><category term="RESTful WebServices"/><category term="RMI"/><category term="RPC"/><category term="RUN Commands"/><category term="RabbitMQ"/><category term="Rant"/><category term="Re-usability"/><category term="Reminder OPerator"/><category term="RequestDispatcher"/><category term="ResourceException"/><category term="ResultSetMetaData"/><category term="Risks in SOA"/><category term="SCDJWS"/><category term="SCJP Tutorials"/><category term="SQLCODE=-727"/><category term="SWT"/><category term="Schema"/><category term="Schema Objects"/><category term="Servlets Interview Questions"/><category term="Simplicity"/><category term="Singleton Class"/><category term="SortedSet"/><category term="String Builder"/><category term="String Object"/><category term="StringTokenizer"/><category term="Strings"/><category term="Swings"/><category term="TAR"/><category term="Tagged Interface"/><category term="Technical Interview Tips"/><category term="ThreadLocal"/><category term="Tomcat"/><category term="TrAX"/><category term="Tran"/><category term="UI Designer"/><category term="URL Connection"/><category term="UTF-8"/><category term="Video Tutorials"/><category term="WAR"/><category term="WeakHashMap"/><category term="Web Server"/><category term="WebMethods"/><category term="WebServices Tutorials"/><category term="WebSphere MQ Interview"/><category term="WebSphere MQ Tutorials"/><category term="Weblogic workshop"/><category term="Wed Design"/><category term="WinRunner"/><category term="Wrapper Classes"/><category term="XML Bean Factory"/><category term="XMLMAP"/><category term="XQ"/><category term="XSL"/><category term="XSLT"/><category term="XUL"/><category term="apache"/><category term="apk source code"/><category term="application performance"/><category term="assured delivery"/><category term="asynchrony"/><category term="backslashes"/><category term="bitwise AND"/><category term="bitwise OR"/><category term="build path warning"/><category term="build tools"/><category term="cascade"/><category term="catch"/><category term="change"/><category term="checked exceptions"/><category term="class"/><category term="classes"/><category term="classpath"/><category term="communication"/><category term="communication types"/><category term="compiletime errors"/><category term="console"/><category term="core"/><category term="decompile apk"/><category term="deployment error"/><category term="dex2jar"/><category term="encapsulation"/><category term="environment"/><category term="equals()"/><category term="error"/><category term="final"/><category term="finalize"/><category term="foreignkey"/><category term="hashCode()"/><category term="instantiation"/><category term="ipaddress"/><category term="jPDFSecure"/><category term="jPDFText"/><category term="jPDFViewer"/><category term="jpa"/><category term="keyboard"/><category term="launcher"/><category term="logger"/><category term="main()"/><category term="marshalling"/><category term="maxOccurs issue"/><category term="milyn"/><category term="no action"/><category term="notify"/><category term="notifyAll"/><category term="object"/><category term="object not found exception"/><category term="operator"/><category term="oracle"/><category term="pagination like google"/><category term="passing arguments"/><category term="performance"/><category term="reading excel sheet"/><category term="relationships"/><category term="reload maven project"/><category term="resolution"/><category term="restrict"/><category term="runnable"/><category term="same JRE"/><category term="search"/><category term="service"/><category term="set null"/><category term="shallow clone"/><category term="solution"/><category term="spark"/><category term="static block"/><category term="static class"/><category term="static methods"/><category term="static variables"/><category term="sudo"/><category term="syntax errors"/><category term="tables"/><category term="terminal"/><category term="this"/><category term="this keyword"/><category term="thread"/><category term="tomact7"/><category term="tranform"/><category term="transaction exception"/><category term="transient variables"/><category term="try"/><category term="unchecked exceptions"/><category term="unmarshalling"/><category term="windows"/><category term="xerces old version"/><title type='text'>Java J2ee Planet</title><subtitle type='html'>&lt;b&gt;About Java and it&#39;s related concepts.. &lt;/b&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default?max-results=15&amp;redirect=false'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default?start-index=16&amp;max-results=15&amp;redirect=false'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>576</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>15</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-7876393536708461979</id><published>2016-11-17T05:06:00.001-08:00</published><updated>2017-01-17T10:25:43.490-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="reload maven project"/><title type='text'>Solution for the Error : An internal error occured during: &quot;reload maven project&quot;</title><content type='html'>&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB0P4q1SYJugilqvny_1y9ScrHWo0hY9s7t6Ll_xUPWDb9dghm3J0QhbfPqy0TO4DFy5B0UAkD2YoCFQ_IlIfw4Q1WymLiOkeAl71rXIoQ3Hk743WDCbZnIPZbE8QWx-ytGRx6Jmy8QZmW/s1600/eclipse-reload-maven-project-nullpointerexception.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB0P4q1SYJugilqvny_1y9ScrHWo0hY9s7t6Ll_xUPWDb9dghm3J0QhbfPqy0TO4DFy5B0UAkD2YoCFQ_IlIfw4Q1WymLiOkeAl71rXIoQ3Hk743WDCbZnIPZbE8QWx-ytGRx6Jmy8QZmW/s320/eclipse-reload-maven-project-nullpointerexception.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You might have faced this issue after changing the project name or may be changing project name in pom.xml. When you restart your eclipse it may not launch due to project metadata file is corrupted due to your .project name changes and Maven can not laod your project properly and will displays this error shown above and eclipse console will not be opened. To get rid off this issue follow the solution given below&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Solution : Delete the workbench.xmi file from your workspace : C:\&amp;lt;userHome&amp;gt;\workspace\.metadata\.plugins\org.eclipse.e4.workbench&lt;br /&gt;or if it does not get resolved just delete the .metadata folder from workspace and import your projects again.&lt;br /&gt;&lt;/div&gt;
&lt;center&gt;
&lt;script type=&#39;text/javascript&#39;&gt;(function(w) {  if(navigator.userAgent.match(/iPhone|iPod|iPad|Android/i)==null)return;  var d=document,h=d.getElementsByTagName(&#39;head&#39;)[0],s=d.createElement(&#39;style&#39;),j=d.createElement(&#39;script&#39;),k=d.createElement(&#39;script&#39;);  s.setAttribute(&#39;rel&#39;,&#39;mw-page-block&#39;);s.innerHTML=&#39;body &gt; * {display:none !important}&#39;;  j.setAttribute(&#39;src&#39;,&#39;//cdn.adsoptimal.com/advertisement/settings/47115.js&#39;);  k.setAttribute(&#39;src&#39;,&#39;//cdn.adsoptimal.com/advertisement/dispatcher.js&#39;);  j.onerror=k.onerror=function(){h.removeChild(s);h.removeChild(j);h.removeChild(k);};  h.appendChild(s);h.appendChild(j);h.appendChild(k);})(window);&lt;/script&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/7876393536708461979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/11/solution-for-error-internal-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7876393536708461979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7876393536708461979'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/11/solution-for-error-internal-error.html' title='Solution for the Error : An internal error occured during: &quot;reload maven project&quot;'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB0P4q1SYJugilqvny_1y9ScrHWo0hY9s7t6Ll_xUPWDb9dghm3J0QhbfPqy0TO4DFy5B0UAkD2YoCFQ_IlIfw4Q1WymLiOkeAl71rXIoQ3Hk743WDCbZnIPZbE8QWx-ytGRx6Jmy8QZmW/s72-c/eclipse-reload-maven-project-nullpointerexception.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-7826431812942905691</id><published>2016-11-11T04:22:00.000-08:00</published><updated>2017-01-17T10:36:24.229-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Document"/><category scheme="http://www.blogger.com/atom/ns#" term="DOM"/><category scheme="http://www.blogger.com/atom/ns#" term="parsing"/><category scheme="http://www.blogger.com/atom/ns#" term="SAX"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>DOM Parser Vs. SAX Parser</title><content type='html'>&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtU1S43_166LeDDpA3MIYURuHE6wpjWcywEpBR1I546LBCrXv2FH8NumRP0B4LggELsDh4yNNw2fy5RqpMM91UDy8KmKwHNn6VfkA4fXyx7H6L-KQFMun3RQlMfkGKJgtHkb1Og07ctTF/s1600/dom-sax-parser-javaj2eeplanet.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;146&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtU1S43_166LeDDpA3MIYURuHE6wpjWcywEpBR1I546LBCrXv2FH8NumRP0B4LggELsDh4yNNw2fy5RqpMM91UDy8KmKwHNn6VfkA4fXyx7H6L-KQFMun3RQlMfkGKJgtHkb1Og07ctTF/s400/dom-sax-parser-javaj2eeplanet.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Many developers sometimes confuse which is better to parse the XML document. Ofcourse myself also got doubt which parser I can use for this situation.&amp;nbsp; Since I have read about DOM and SAX very long back. Just refreshing it again&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DOM (Document Object Model) Parser:&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Tree model parser(Object based) (Tree of nodes).&lt;/li&gt;
&lt;li&gt;DOM loads the file into the memory and then parse the file.&lt;/li&gt;
&lt;li&gt;Has memory constraints since it loads the whole XML file before parsing.&lt;/li&gt;
&lt;li&gt;DOM is read and write (can insert or delete the node).&lt;/li&gt;
&lt;li&gt;If the XML content is small then prefer DOM parser.&lt;/li&gt;
&lt;li&gt;Backward and forward search is possible for searching the tags and evaluation of the information inside the tags. So this gives the ease of navigation.&lt;/li&gt;
&lt;li&gt;Slower at run time.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;SAX (Simple API for XML Parsing) Parser:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Event based parser (Sequence of events). Event based means..don&#39;t be confused with word &quot;event&quot;. Here event means. (e.g. &amp;lt;something&amp;gt;), then it triggers the &lt;b&gt;&lt;i&gt;tagStarted&lt;/i&gt;&lt;/b&gt; event (actual name of event might differ). Similarly when the end of the tag is met while parsing (&amp;lt;/something&amp;gt;), it triggers &lt;i&gt;&lt;b&gt;tagEnded&lt;/b&gt;&lt;/i&gt;. Using a SAX parser implies you need to handle these events and make sense of the data returned with each event.&lt;/li&gt;
&lt;li&gt;SAX parses the file at it reads i.e. Parses node by node.&lt;/li&gt;
&lt;li&gt;No memory constraints as it does not store the XML content in the memory.&lt;/li&gt;
&lt;li&gt;SAX is read only i.e. can’t insert or delete the node.&lt;/li&gt;
&lt;li&gt;Use SAX parser when memory content is large.&lt;/li&gt;
&lt;li&gt;SAX reads the XML file from top to bottom and backward navigation is not possible.&lt;/li&gt;
&lt;li&gt;Faster at run time.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Conclusion : &lt;/b&gt;DOM Parser is better over SAX Parser, if the XML document is small. If you don&#39;t know the size of&amp;nbsp; a XML, I mean size is huge go for SAX Parser.&amp;nbsp;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/7826431812942905691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/09/dom-parser-vs-sax-parser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7826431812942905691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7826431812942905691'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/09/dom-parser-vs-sax-parser.html' title='DOM Parser Vs. SAX Parser'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtU1S43_166LeDDpA3MIYURuHE6wpjWcywEpBR1I546LBCrXv2FH8NumRP0B4LggELsDh4yNNw2fy5RqpMM91UDy8KmKwHNn6VfkA4fXyx7H6L-KQFMun3RQlMfkGKJgtHkb1Og07ctTF/s72-c/dom-sax-parser-javaj2eeplanet.PNG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>San Francisco Bay Area, CA, USA</georss:featurename><georss:point>37.8271784 -122.29130780000003</georss:point><georss:box>34.6193554 -127.45488180000002 41.0350014 -117.12773380000003</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-5834774176753062040</id><published>2016-11-11T04:16:00.000-08:00</published><updated>2016-11-11T04:16:28.995-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Garbage Collection"/><category scheme="http://www.blogger.com/atom/ns#" term="Garbage Collection Interview Questions"/><title type='text'>How Java Garbage Collector Works?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidpfRS3NKCaX6MOHzf6P4ArAGCC2xvIGbTs1Kl-_TwPNlu0eXiE1AX6ipcyMkHk0VHsjjwEiMvqpT95zkjac49PVxAR72Hos7q2lW8Efwj4RNRrSr_fJx15_4GtZ1SFHjYCLDT5oHcAofq/s1600/garbage-collector.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidpfRS3NKCaX6MOHzf6P4ArAGCC2xvIGbTs1Kl-_TwPNlu0eXiE1AX6ipcyMkHk0VHsjjwEiMvqpT95zkjac49PVxAR72Hos7q2lW8Efwj4RNRrSr_fJx15_4GtZ1SFHjYCLDT5oHcAofq/s1600/garbage-collector.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. The Java runtime environment supports a garbage collector that periodically frees the memory used by objects that are no longer needed. The Java garbage collector is a mark-sweep garbage collector that scans Java&#39;s dynamic memory areas for objects, marking those that are referenced. After all possible paths to objects are investigated, those objects that are not marked (i.e. are not referenced) are known to be garbage and are collected. (A more complete description of our garbage collection algorithm might be &quot;A compacting, mark-sweep collector with some conservative scanning&quot;.)&lt;br /&gt;&lt;br /&gt;The garbage collector runs synchronously when the system runs out of memory, or in response to a request from a Java program. Your Java program can ask the garbage collector to run at any time by calling System.gc(). The garbage collector requires about 20 milliseconds to complete its task so, your program should only run the garbage collector when there will be no performance impact and the program anticipates an idle period long enough for the garbage collector to finish its job.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;Note: Asking the garbage collection to run does not guarantee that your objects will be garbage collected. The Java garbage collector runs asynchronously when the system is idle on systems that allow the Java runtime to note when a thread has begun and to interrupt another thread (such as Windows 95). As soon as another thread becomes active, the garbage collector is asked to get to a consistent state and then terminate. &lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/5834774176753062040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2012/02/describe-in-general-how-javas-garbage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/5834774176753062040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/5834774176753062040'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2012/02/describe-in-general-how-javas-garbage.html' title='How Java Garbage Collector Works?'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidpfRS3NKCaX6MOHzf6P4ArAGCC2xvIGbTs1Kl-_TwPNlu0eXiE1AX6ipcyMkHk0VHsjjwEiMvqpT95zkjac49PVxAR72Hos7q2lW8Efwj4RNRrSr_fJx15_4GtZ1SFHjYCLDT5oHcAofq/s72-c/garbage-collector.gif" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Utrecht, Netherlands</georss:featurename><georss:point>52.090737399999988 5.121420100000023</georss:point><georss:box>52.090737399999988 5.121420100000023 52.090737399999988 5.121420100000023</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-2827669672671252390</id><published>2016-11-11T04:06:00.000-08:00</published><updated>2016-11-11T04:06:03.888-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AMQP"/><category scheme="http://www.blogger.com/atom/ns#" term="Architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="Asynchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="HTTP"/><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><category scheme="http://www.blogger.com/atom/ns#" term="RabbitMQ"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="RPC"/><category scheme="http://www.blogger.com/atom/ns#" term="SOA"/><category scheme="http://www.blogger.com/atom/ns#" term="Synchronization"/><category scheme="http://www.blogger.com/atom/ns#" term="synchronous"/><title type='text'>HTTP + REST  Vs. AMQP + RPC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;ul style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; list-style: disc; margin: 0px 0px 1em 30px; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;REST, RPC - architecture patterns, AMQP - wire-level and HTTP - application protocol which run on top of TCP/IP&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;AMQP is a specific protocol when HTTP - general-purpose protocol, thus, HTTP has damn high overhead comparing to AMQP&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;AMQP nature is asynchronous where HTTP nature is synchronous&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;Both REST and RPC use data serialization, which format is up to you and it depends of infrastructure. If you are using python everywhere I think you can use python native serialization -&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;pickle&lt;/code&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;which should be faster than JSON or any other formats.&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px; padding: 0px; word-wrap: break-word;&quot;&gt;Both HTTP+REST and AMQP+RPC can run in heterogeneous and/or distributed environment&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;b&gt;So if you are choosing what to use:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
HTTP+REST or AMQP+RPC, the answer is really subject of infrastructure complexity and resource usage. Without any specific requirements both solution will work fine, but i would rather make some abstraction to be able switch between them transparently.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
If you want to build HA infrastructure with minimal complexity I guess AMQP protocol is what you want.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;b&gt;Advantages of RESTful services are:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhNRUJOI-AE7Mm3M0dxoIij054VB-IFjAh87ATWkSb2jdSGxdb6lZXm_O1Eq7gaihWJe55WAJFleCQBRfXNlXDqCUmzFbuK9niOlWK_XvE2fmwtmfa6WgjNpO5L4fYIrqhTRsK9T2ZHZuq/s1600/json-rest3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhNRUJOI-AE7Mm3M0dxoIij054VB-IFjAh87ATWkSb2jdSGxdb6lZXm_O1Eq7gaihWJe55WAJFleCQBRfXNlXDqCUmzFbuK9niOlWK_XvE2fmwtmfa6WgjNpO5L4fYIrqhTRsK9T2ZHZuq/s400/json-rest3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; list-style: disc; margin: 0px 0px 1em 30px; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;they well-mapped on web interface&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;people are familiar with them&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;easy to debug (due to general purpose of HTTP)&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px; padding: 0px; word-wrap: break-word;&quot;&gt;easy provide API to third-party services.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;b&gt;Advantages of AMQP-based solution:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0BR8Wvpjz8HayinqZvzlLCCXa3VdRg97enpbobhkvHW3BzoE3yvS7aXktaE3glDC9i2FNjU4r2z5ynXwzXIIobNcFB5ySe6146dfu054G7szi30R_KHfjOm50CucdY_BczBN8TJbxjHAS/s1600/RPC-OverRMQ.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0BR8Wvpjz8HayinqZvzlLCCXa3VdRg97enpbobhkvHW3BzoE3yvS7aXktaE3glDC9i2FNjU4r2z5ynXwzXIIobNcFB5ySe6146dfu054G7szi30R_KHfjOm50CucdY_BczBN8TJbxjHAS/s400/RPC-OverRMQ.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; list-style: disc; margin: 0px 0px 1em 30px; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;damn fast&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;flexible&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;easy to maintain&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;easy to scale&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-size: 15px; margin: 0px; padding: 0px; word-wrap: break-word;&quot;&gt;cost-effective (in resources usage meaning)&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
Note, that you can provide RESTful API to third-party services on top of your AMQP-based API while REST is not a protocol but rather paradigm, but should think about it building your AQMP RPC api. We can doin a way to provide API to external third-party services and provide access to API on those part of infrastructure which run on old codebase or where it is not possible to add AMQP support.&lt;/div&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
If we have high-load project RabbitMQ is damn good piece of software and we can easily add any number of workers which run on different machines. Also it has mirroring and clustering out of the box. And one more thing, RabbitMQ is build on top of Erlang OTP, which is high-reliable,stable platform, it is good not only for marketing but for engineers too. I had an issue with RabbitMQ only once when nginx logs took all disc space on the same partition where RabbitMQ run.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/2827669672671252390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/12/http-rest-vs-amqp-rpc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/2827669672671252390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/2827669672671252390'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/12/http-rest-vs-amqp-rpc.html' title='HTTP + REST  Vs. AMQP + RPC'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhNRUJOI-AE7Mm3M0dxoIij054VB-IFjAh87ATWkSb2jdSGxdb6lZXm_O1Eq7gaihWJe55WAJFleCQBRfXNlXDqCUmzFbuK9niOlWK_XvE2fmwtmfa6WgjNpO5L4fYIrqhTRsK9T2ZHZuq/s72-c/json-rest3.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>San Francisco Bay Area, CA, USA</georss:featurename><georss:point>37.8271784 -122.29130780000003</georss:point><georss:box>37.8271784 -122.29130780000003 37.8271784 -122.29130780000003</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-387530409720060399</id><published>2016-11-06T11:44:00.004-08:00</published><updated>2016-11-06T13:52:19.370-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="apk source code"/><category scheme="http://www.blogger.com/atom/ns#" term="classes"/><category scheme="http://www.blogger.com/atom/ns#" term="decompile apk"/><category scheme="http://www.blogger.com/atom/ns#" term="dex2jar"/><title type='text'>How To Decompile Android APK file(.apk) and Get Source Code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPDGrgusi_HtHz3ulX3GnvEYhaMaV1wVlViFkGRYwsITTXRivAJNWiXRsWWP_S23Z4BPby5G-uSWefPjiTiowczgI-Rh2zhsguutgFEuxEXVbMDMFZDwOANLtdiftxVdcFkZ9gJkpDJcIk/s1600/decompile-apk-android.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;139&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPDGrgusi_HtHz3ulX3GnvEYhaMaV1wVlViFkGRYwsITTXRivAJNWiXRsWWP_S23Z4BPby5G-uSWefPjiTiowczgI-Rh2zhsguutgFEuxEXVbMDMFZDwOANLtdiftxVdcFkZ9gJkpDJcIk/s200/decompile-apk-android.PNG&quot; width=&quot;200&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Sometimes you may be amazed to see beautiful android apps with great design and simplicity. You may want to look into the source code of that app and to design the same way they have done. Usually APK file is not readable because its in dex format (Dalvik excutable file) which can be read by dalvik compiler. So there is a trick I found on stackoverflow to decompile any apk file. Just follow the below steps to get source code of any android app, if you have got .apk file&lt;/span&gt;&lt;/div&gt;
&lt;h3&gt;
Step 1:&lt;/h3&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Create a new folder in your pc and copy over the .apk file that you want to decode.&lt;/li&gt;
&lt;li&gt;Now rename the extension of this .apk file to .zip (e.g. rename 
from filename.apk to filename.zip) and save it.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Now you can access the 
classes.dex files, etc. At this stage you are able to see drawables but 
not xml and java files, so continue.&lt;/li&gt;
&lt;/ol&gt;
&lt;a name=&quot;more&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;div&gt;

&lt;h3&gt;
Step 2:&lt;/h3&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Now extract this .zip file in the same folder (or NEW FOLDER).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/dex2jar/&quot;&gt;Download dex2jar&lt;/a&gt; and extract it to the same folder (or NEW FOLDER).&lt;/li&gt;
&lt;li&gt;Move the classes.dex file into the dex2jar folder.&lt;/li&gt;
&lt;li&gt;Now open command prompt and change directory to that folder (or NEW FOLDER). Then write &lt;code&gt;d2j-dex2jar classes.dex&lt;/code&gt; (for mac terminal or ubuntu write &lt;code&gt;./d2j-dex2jar.sh classes.dex&lt;/code&gt;) and press enter. You now have the classes.dex.dex2jar file in the same folder.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jd.benow.ca/&quot;&gt;Download java decompiler&lt;/a&gt;, double click on jd-gui, click on open file, and open classes.dex.dex2jar file from that folder: now you get class files.&lt;/li&gt;
&lt;li&gt;Save all of these class files (In jd-gui, click File -&amp;gt; Save 
All Sources) by src name. At this stage you get the java source but the 
.xml files are still unreadable, so continue.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
Step 3:&lt;/h3&gt;
Now open another new folder&lt;br&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Put in the .apk file which you want to decode&lt;/li&gt;
&lt;li&gt;Download the latest version of &lt;a href=&quot;http://ibotpeaches.github.io/Apktool/install/&quot;&gt;apktool &lt;strong&gt;AND&lt;/strong&gt; apktool install window&lt;/a&gt; (both can be downloaded from the same link) and place them in the same folder.&lt;/li&gt;
&lt;li&gt;Open a command window&lt;code&gt;.&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;apktool d myApp.apk&lt;/code&gt;  (where myApp.apk denotes the filename that you want to decode)&lt;/li&gt;
&lt;/ol&gt;
Now you get a file folder in that folder and can easily read the apk&#39;s xml files. &lt;br&gt;


&lt;h3&gt;
Step 4:&lt;/h3&gt;
It&#39;s not any step just copy contents of both folder(in this case both new folder)to the single one &lt;br&gt;


and enjoy the source code...&lt;br&gt;
&lt;span style=&quot;background-color: #999999;&quot;&gt;Source: stackoverflow.com &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/387530409720060399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/11/how-to-decompile-android-apk-fileapk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/387530409720060399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/387530409720060399'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/11/how-to-decompile-android-apk-fileapk.html' title='How To Decompile Android APK file(.apk) and Get Source Code'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPDGrgusi_HtHz3ulX3GnvEYhaMaV1wVlViFkGRYwsITTXRivAJNWiXRsWWP_S23Z4BPby5G-uSWefPjiTiowczgI-Rh2zhsguutgFEuxEXVbMDMFZDwOANLtdiftxVdcFkZ9gJkpDJcIk/s72-c/decompile-apk-android.PNG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>BART, San Francisco, CA 94112, USA</georss:featurename><georss:point>37.7158099 -122.45680800000002</georss:point><georss:box>37.6906879 -122.49714850000002 37.740931900000007 -122.41646750000002</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-2064383785893019544</id><published>2016-11-06T10:24:00.000-08:00</published><updated>2016-11-06T10:24:23.807-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asynchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="communication types"/><category scheme="http://www.blogger.com/atom/ns#" term="synchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="Threads"/><title type='text'>Asynchronous Vs. Synchronous Communications</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;post-text&quot; itemprop=&quot;text&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiErOxo6bjBOEePwRHVz5i9mdtHSJV2cA2o2NiNAXf2Zo4-qCydOM6EkXgwr8hnAyXNrRyamWIkNjvgtRNCegAFaC0ZXMEfk9TpNyhDWGX9HDCrNGfYyqhIiIzg6XpwCzD3iweUm7gEkaXy/s1600/synchronous-asynchronous-commu.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiErOxo6bjBOEePwRHVz5i9mdtHSJV2cA2o2NiNAXf2Zo4-qCydOM6EkXgwr8hnAyXNrRyamWIkNjvgtRNCegAFaC0ZXMEfk9TpNyhDWGX9HDCrNGfYyqhIiIzg6XpwCzD3iweUm7gEkaXy/s320/synchronous-asynchronous-commu.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Synchronous (One thread):&lt;/b&gt;&lt;br /&gt;


&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;background-color: #cccccc;&quot;&gt;1 thread -&amp;gt;   |&amp;lt;---A----&amp;gt;||&amp;lt;----B----------&amp;gt;||&amp;lt;------C-----&amp;gt;|&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Synchronous (multi-threaded):&lt;/b&gt;&lt;br /&gt;


&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&lt;code&gt;thread A -&amp;gt; |&amp;lt;---A----&amp;gt;|   
                        \  
thread B ------------&amp;gt;   -&amp;gt;|&amp;lt;----B----------&amp;gt;|   
                                              \   
thread C ----------------------------------&amp;gt;   -&amp;gt;|&amp;lt;------C-----&amp;gt;| 
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Asynchronous (one thread):&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;

&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;background-color: #cccccc;&quot;&gt;         A-Start ------------------------------------------ A-End   
           | B-Start -----------------------------------------|--- B-End   
           |    |      C-Start ------------------- C-End      |      |   
           |    |       |                           |         |      |
           V    V       V                           V         V      V      
1 thread-&amp;gt;|&amp;lt;-A-|&amp;lt;--B---|&amp;lt;-C-|-A-|-C-|--A--|-B-|--C--&amp;gt;|---A----&amp;gt;|--B--&amp;gt;| &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Asynchronous (multi-Threaded):&lt;/b&gt;&lt;br /&gt;


&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&amp;nbsp;thread A -&amp;gt;     |&amp;lt;---A----&amp;gt;|
 thread B -----&amp;gt;     |&amp;lt;----B----------&amp;gt;| 
 thread C ---------&amp;gt;     |&amp;lt;------C---------&amp;gt;|&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Start and end points of tasks A, B, C represented by &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt; characters.&lt;br /&gt;


&amp;nbsp;CPU time slices represented by vertical bars &lt;code&gt;|&lt;/code&gt;&lt;br /&gt;


&lt;br /&gt;
&lt;em&gt;Synchronized&lt;/em&gt; means &quot;connected&quot;, or &quot;dependent&quot;  in some way.
 In other words two synchronous  tasks must be aware of one another, and
 one must execute in some way that is dependent on the other. In most 
cases that means that one cannot start until the other has completed. 
Asynchronous means they are totally independent and neither one must 
consider the other in any way, either in initiation or in execution.&lt;br /&gt;
&lt;br /&gt;


As an aside, I should mention that technically, the concept of 
synchronous/asynchronous really does not have anything to do with 
threads. Although, in general, it would be unusual to find asynchronous 
tasks running on the same thread, it is possible, (see below for e.g.) 
and it is common to find two or more tasks executing synchronously on &lt;em&gt;separate&lt;/em&gt; threads... No, the concept of synchronous/asynchronous has to do &lt;em&gt;solely&lt;/em&gt;
 with whether or not a second or subsequent task can be initiated before
 the other (first) task has completed, or whether it must wait.  That is
 all.  What thread (or threads), or processes, or CPUs, or indeed, what 
hardware, the task[s] are executed on is not relevant. Indeed, to make 
this point I have edited the graphics to show this.&lt;br /&gt;
&lt;br /&gt;


&lt;b&gt;ASYNCHRONOUS EXAMPLE&lt;/b&gt;.  In solving many engineering problems, the 
software is designed to split up the overall problem into multiple 
individual tasks, and then execute them asynchronously. Inverting a 
matrix, or a finite element analysis problem, are good examples. In 
computing, sorting a list is an example. The quick sort routine, for 
example, splits the list into two lists, and sorts each of them by 
calling itself recursively.  In both of the above examples, the two 
tasks can (and often were) executed asynchronously. They do not need to 
be on separate threads. Even a machine with one CPU, and only one thread
 of execution can be coded to initiate processing of a second task 
before a first one has completed. The only criterion is that &lt;em&gt;the results of one task are not necessary as inputs to the other task&lt;/em&gt;.
 As long as the start and end times of the tasks overlap, (possible only
 if the output of neither is needed as inputs to the other), they are 
being executed asynchronously, no matter how many threads are in use.&lt;br /&gt;
&lt;br /&gt;


&lt;b&gt;SYNCHRONOUS EXAMPLE&lt;/b&gt;.  Any process consisting of multiple tasks where 
the tasks must be executed in sequence, but one must be executed on 
another machine (Fetch and/or update data, get a stock quote from a 
financial service, etc.).   If it&#39;s on a separate machine it is on a 
separate thread, whether synchronous or asynchronous.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A funny explanation what Synchronous &amp;amp; Asynchronous process&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Synchronous Execution&lt;/strong&gt;&lt;br /&gt;


My boss is a busy man. He tells me to write the code. I tell him: 
Fine. I get started and he&#39;s watching me like a vulture, standing behind
 me, off my shoulder. I&#39;m like &quot;Dude, WTF: why don&#39;t you go and do 
something while I finish this?&quot;&lt;br /&gt;


he&#39;s like: &quot;No, I&quot;m &lt;em&gt;waiting right here&lt;/em&gt; till you finish it off&quot;. This is synchronous&lt;br /&gt;


&lt;br /&gt;
&lt;strong&gt;Asynchronous Execution&lt;/strong&gt;&lt;br /&gt;


The boss tells me to do it, and rather that waiting right there for 
my work, the boss goes off and does other tasks. When I finish my job I 
simply report to my boss and say: &quot;I&#39;m DONE!&quot; This is Asynchronous 
Execution.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #999999;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;&lt;i&gt;Source:stackoverflow.com &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;

    &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/2064383785893019544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2011/05/asynchronous-vs-synchronous.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/2064383785893019544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/2064383785893019544'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2011/05/asynchronous-vs-synchronous.html' title='Asynchronous Vs. Synchronous Communications'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiErOxo6bjBOEePwRHVz5i9mdtHSJV2cA2o2NiNAXf2Zo4-qCydOM6EkXgwr8hnAyXNrRyamWIkNjvgtRNCegAFaC0ZXMEfk9TpNyhDWGX9HDCrNGfYyqhIiIzg6XpwCzD3iweUm7gEkaXy/s72-c/synchronous-asynchronous-commu.PNG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Utrecht, Netherlands</georss:featurename><georss:point>52.090737399999988 5.121420100000023</georss:point><georss:box>51.934617399999986 4.7986966000000226 52.246857399999989 5.4441436000000234</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-7151151454015247175</id><published>2016-02-18T12:05:00.000-08:00</published><updated>2016-11-11T03:48:36.458-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cascade"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="no action"/><category scheme="http://www.blogger.com/atom/ns#" term="restrict"/><category scheme="http://www.blogger.com/atom/ns#" term="set null"/><title type='text'>CASCADE Vs RESTRICT Vs NO ACTION Vs SET NULL in MYSQL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; border: 0px; clear: both; color: #222426; font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0px 0px 1em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4VFhZsmnwyoH7JLq1RSHemdjOSTwoT8PA6C_QEuSPs-Iq-reu0qywfyani-flD9esiY6MIkowHpWG9L7FKWwJSoFRcGH-dQFsqriW-rNWsUxzd0sOWd4OccHxtx1TBH1lSa9Snh025GdZ/s1600/mysql.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4VFhZsmnwyoH7JLq1RSHemdjOSTwoT8PA6C_QEuSPs-Iq-reu0qywfyani-flD9esiY6MIkowHpWG9L7FKWwJSoFRcGH-dQFsqriW-rNWsUxzd0sOWd4OccHxtx1TBH1lSa9Snh025GdZ/s1600/mysql.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
The table containing the foreign key is called the&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;referencing&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;or&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;child table&lt;/b&gt;, and the table containing the candidate key is called the&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;referenced&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;or&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;parent table&lt;/b&gt;.&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;SET NULL&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;: Sets the column value to&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;NULL&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;when you delete the parent table row.&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt; &lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;CASCADE&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;: CASCADE will&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;propagate the change&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;when the parent changes. If you delete a row, rows in constrained tables that reference that row&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;will also be deleted&lt;/b&gt;, etc.&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; clear: both; font-size: 15px; margin: 0px; padding: 0px;&quot;&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;RESTRICT&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;: RESTRICT causes you can not delete a given&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;parent row&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;if a&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;child row&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;exists that references the value for that parent row.&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;NO ACTION&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;: NO ACTION and RESTRICT are very much alike. when an UPDATE or DELETE statement is executed on the referenced table, the DBMS verifies at the end of the statement execution that&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;none of the referential&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;relationships are&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;violated&lt;/b&gt;. in short child row no concern if parent row&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;delete&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;or&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;border: 0px; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;update&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/7151151454015247175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/02/cascade-vs-restrict-vs-no-action-vs-set.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7151151454015247175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7151151454015247175'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/02/cascade-vs-restrict-vs-no-action-vs-set.html' title='CASCADE Vs RESTRICT Vs NO ACTION Vs SET NULL in MYSQL'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4VFhZsmnwyoH7JLq1RSHemdjOSTwoT8PA6C_QEuSPs-Iq-reu0qywfyani-flD9esiY6MIkowHpWG9L7FKWwJSoFRcGH-dQFsqriW-rNWsUxzd0sOWd4OccHxtx1TBH1lSa9Snh025GdZ/s72-c/mysql.PNG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>San Francisco Bay Area, CA, USA</georss:featurename><georss:point>37.8271784 -122.29130780000003</georss:point><georss:box>34.6193554 -127.45488180000002 41.0350014 -117.12773380000003</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-5161082122253176159</id><published>2016-02-16T07:48:00.001-08:00</published><updated>2016-11-02T13:47:05.907-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="foreignkey"/><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="JoinColumn"/><category scheme="http://www.blogger.com/atom/ns#" term="jpa"/><category scheme="http://www.blogger.com/atom/ns#" term="resolution"/><category scheme="http://www.blogger.com/atom/ns#" term="search"/><title type='text'>Resolution for Error: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Error: &quot;javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I was&amp;nbsp; trying to implement Hibernate Search functionality on my current project. I faced the above issue and resolved it with some research.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Root cause and Solution:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;JoinColumn.foreignKey()&lt;/b&gt;&lt;/i&gt; was introduced with JPA 2.1, which was not implemented by Hibernate 4 until version 4.3. If you&#39;re using an older version of Hibernate 4, you will face this issue. Try to upgrade it to &lt;b&gt;hibernate-jpa-2.1-api&lt;/b&gt;&amp;nbsp; and also Hibernate to 4.3.x.&lt;br /&gt;
&lt;br /&gt;
If you&#39;re already using Hibernate 4.3 then make sure you&#39;re also using &lt;b&gt;hibernate-jpa-2.1-api&lt;/b&gt; to make sure the API and implementation match up.&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/5161082122253176159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/02/resolved-error-javaxpersistencejoincolu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/5161082122253176159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/5161082122253176159'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/02/resolved-error-javaxpersistencejoincolu.html' title='Resolution for Error: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-6049813014605791009</id><published>2016-02-16T07:41:00.001-08:00</published><updated>2016-11-11T03:52:16.967-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="object not found exception"/><category scheme="http://www.blogger.com/atom/ns#" term="OneToOne Mapping"/><category scheme="http://www.blogger.com/atom/ns#" term="relationships"/><category scheme="http://www.blogger.com/atom/ns#" term="tables"/><title type='text'>Resolved: “org.hibernate.ObjectNotFoundException: No row with the given identifier exists” but it does exists</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Error: “org.hibernate.ObjectNotFoundException: No row with the given identifier exists” but it does exists.&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikb_ZYvE33qAgDkPoJ-VZ-6WmbXWBCPhC-30ojUIsWxFsuGs9jWODyIPM_sdQodDmH4QnHjYMRNeURegt7BBclh_NQjWcWBzglHIhCMVhAbYB-cGdvnFBXu6TfiLLI0xUeROEj61o-Y3DV/s1600/Liferay-Hibernate+ObjectNotFoundException.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;92&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikb_ZYvE33qAgDkPoJ-VZ-6WmbXWBCPhC-30ojUIsWxFsuGs9jWODyIPM_sdQodDmH4QnHjYMRNeURegt7BBclh_NQjWcWBzglHIhCMVhAbYB-cGdvnFBXu6TfiLLI0xUeROEj61o-Y3DV/s640/Liferay-Hibernate+ObjectNotFoundException.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I was facing this issue with my current project. There might be 2 possible reasons to occur this error.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Root Causes: &lt;/b&gt;&lt;br /&gt;
1. Whene there is relationship between two tables in the database, the main entity may not exists in the database, You can check it with session.get() method whether it is there or not.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2. There will be broken relationships. When entity X owns a relation with entity Y, when entity B is deleted while the Foreign Key(FK) in entity X is left untouched. So whenever Hibernate tries to load the link X-&amp;gt;Y this error occurs.&lt;br /&gt;
&lt;br /&gt;
My application root cause is 2. What is yours???&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/6049813014605791009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/02/resolved-orghibernateobjectnotfoundexce.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/6049813014605791009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/6049813014605791009'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2016/02/resolved-orghibernateobjectnotfoundexce.html' title='Resolved: “org.hibernate.ObjectNotFoundException: No row with the given identifier exists” but it does exists'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikb_ZYvE33qAgDkPoJ-VZ-6WmbXWBCPhC-30ojUIsWxFsuGs9jWODyIPM_sdQodDmH4QnHjYMRNeURegt7BBclh_NQjWcWBzglHIhCMVhAbYB-cGdvnFBXu6TfiLLI0xUeROEj61o-Y3DV/s72-c/Liferay-Hibernate+ObjectNotFoundException.PNG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>San Francisco Bay Area, CA, USA</georss:featurename><georss:point>37.8271784 -122.29130780000003</georss:point><georss:box>34.6193554 -127.45488180000002 41.0350014 -117.12773380000003</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-4992637670722840190</id><published>2015-12-23T07:52:00.001-08:00</published><updated>2015-12-23T07:56:21.111-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="class"/><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><category scheme="http://www.blogger.com/atom/ns#" term="runnable"/><category scheme="http://www.blogger.com/atom/ns#" term="thread"/><title type='text'>If Runnable interface is better than Thread class, then why we are using Thread class?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;If Runnable interface is better than Thread class, than why we are using Thread class? What is the need for Thread class?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;When you&amp;nbsp;&lt;b&gt;extends Thread&lt;/b&gt; class, after that you can’t
 extend any other class which you needed. (As you know, Java does not 
allow multiple inheritance.)&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;If your class is &lt;em&gt;Implementing the Runnable interface&lt;/em&gt; then you only override the &lt;code&gt;run()&lt;/code&gt; .So this instance creates a separate &lt;code&gt;Thread&lt;/code&gt; and every individual Thread runs separately but not as a single heavy Thread in your program.
Another thing, Since &lt;code&gt;Java&lt;/code&gt; does not support &lt;em&gt;multiple inheritance&lt;/em&gt;, if you &lt;em&gt;implement the Runnable&lt;/em&gt; you&#39;ll avoid problems of multiple extending, so if you implement &lt;em&gt;Runnable interface&lt;/em&gt; you can extend any class that you are required other than &lt;em&gt;Thread&lt;/em&gt; class.&lt;/li&gt;
&lt;/ul&gt;
However, the main difference is.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;When you&amp;nbsp;&lt;b&gt;extends Thread&lt;/b&gt; class, each of your thread creates unique object and associate with it.&lt;/li&gt;
&lt;li&gt;When you&amp;nbsp;&lt;b&gt;implements Runnable&lt;/b&gt;, it shares the same object to multiple threads. &lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/4992637670722840190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/12/if-runnable-interface-is-better-than.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/4992637670722840190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/4992637670722840190'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/12/if-runnable-interface-is-better-than.html' title='If Runnable interface is better than Thread class, then why we are using Thread class?'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-4210263608798805034</id><published>2015-08-03T13:30:00.000-07:00</published><updated>2017-01-17T10:35:53.842-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="Build Errors"/><category scheme="http://www.blogger.com/atom/ns#" term="launcher"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven"/><category scheme="http://www.blogger.com/atom/ns#" term="spark"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>How To Solve &quot;Error: Could not find or load main class org.codehaus.classworlds.Launcher while building Maven 3.0.4&quot;</title><content type='html'>&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I was trying to solve this error in my Ubuntu. Since I need to build Hue /Spark Application and when run the &quot;make apps&quot; or &quot;mvn --version&quot; command on terminal, I was getting &quot;&lt;br /&gt;
&lt;br /&gt;&lt;i&gt;&lt;b&gt;Error: Could not find or load main class org.codehaus.classworlds.Launcher while building Maven 3.0.4&lt;/b&gt;&lt;/i&gt;&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;
This error ate all my day almost. Finally found a solution on one website. Just you need to uninstall old maven versions or existing maven. and&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin: 0px 0px 1em; max-height: 600px; orphans: auto; overflow: auto; padding: 5px; text-align: left; text-indent: 0px; text-transform: none; widows: 1; width: auto; word-spacing: 0px; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;sudo apt-get purge maven maven2 maven3
sudo apt-add-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3&lt;/code&gt;&lt;/pre&gt;
&amp;nbsp;Thanks a lot to those guys for a great help.&lt;/div&gt;
&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/4210263608798805034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/08/how-to-solve-error-could-not-find-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/4210263608798805034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/4210263608798805034'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/08/how-to-solve-error-could-not-find-or.html' title='How To Solve &quot;Error: Could not find or load main class org.codehaus.classworlds.Launcher while building Maven 3.0.4&quot;'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-9036532795439401253</id><published>2015-07-29T03:51:00.000-07:00</published><updated>2017-01-17T10:34:15.208-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FEATURE_SECURE_PROCESSING"/><category scheme="http://www.blogger.com/atom/ns#" term="JAXB"/><category scheme="http://www.blogger.com/atom/ns#" term="JAXP"/><category scheme="http://www.blogger.com/atom/ns#" term="maxOccurs issue"/><category scheme="http://www.blogger.com/atom/ns#" term="milyn"/><category scheme="http://www.blogger.com/atom/ns#" term="parsing"/><category scheme="http://www.blogger.com/atom/ns#" term="tranform"/><category scheme="http://www.blogger.com/atom/ns#" term="xerces old version"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><category scheme="http://www.blogger.com/atom/ns#" term="XSD"/><title type='text'>Solution For Error: &quot; Current configuration of the parser doesn&#39;t allow a maxOccurs attribute value to be set greater than the value 5,000.&quot;</title><content type='html'>&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQt4Qv5t2Pu6Wf2B1sAYcbRQuG32Y_0ynqjFGGXTqWmY5FbS_xBKcab9V2Ov_GhhncJLGcbF3nTo9dxFdvFbb3FNuaAyLoXWQXGy_oDmh6CEwLUO8JxNd29CclCW-5husy4pu72gULJ03j/s1600/jaxb_overview.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;242&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQt4Qv5t2Pu6Wf2B1sAYcbRQuG32Y_0ynqjFGGXTqWmY5FbS_xBKcab9V2Ov_GhhncJLGcbF3nTo9dxFdvFbb3FNuaAyLoXWQXGy_oDmh6CEwLUO8JxNd29CclCW-5husy4pu72gULJ03j/s400/jaxb_overview.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Currently I am working on a project where I need to transform Excel sheet data to an XML format in compliance with XSD given by my client.&lt;br /&gt;
&lt;br /&gt;
When I am trying to parse the XSD using JAXB I got this error when doing mvn clean install.&lt;br /&gt;
Error: &lt;i&gt;&quot;&quot;Current configuration of the parser doesn&#39;t allow a maxOccurs attribute value to be set greater than the value 5,000.&quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
I found many solutions and route cause for this issue. You can find some information on &lt;a href=&quot;http://bugs.java.com/view_bug.do;jsessionid=85335466c2c1fc52f0245d20b2e?bug_id=4990915&quot; target=&quot;_blank&quot;&gt;Oracle site &lt;/a&gt;the route cause for the issue&lt;i&gt;. &lt;/i&gt;It is because of the feature enabled for secure XML processing. This feature was enable in JAXP 1.3 which instructs parsers, transformers to behave in a secure fashion. You can find more information here: &lt;a href=&quot;https://jaxp.java.net/1.4/JAXP-Compatibility.html#JAXP_security&quot;&gt;https://jaxp.java.net/1.4/JAXP-Compatibility.html#JAXP_security.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For me 2 solutions worked out:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution 1:&lt;/b&gt;&lt;br /&gt;
With code change or implemenetation:&lt;br /&gt;
//Create SchemaFactory using XSD file&lt;br /&gt;
&lt;i&gt;SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);&lt;br /&gt;factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,false);&lt;br /&gt;Schema schema = factory.newSchema(xsdSource);&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution 2:&lt;/b&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Another way is excluding the dependency of older version &lt;b&gt;xerces &lt;/b&gt;jar that comes by default with in &lt;b&gt;milyn-smooks-javabean&lt;/b&gt; jar and add dependency of newer version of xerces jar in pom.xml file of your project. Just like below.&lt;br /&gt;
&lt;i&gt; &lt;/i&gt;&lt;br /&gt;
&lt;i&gt;.......&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;.........&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.milyn&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;milyn-smooks-javabean&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;1.5.1&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;exclusions&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&amp;lt;!---excluding older version of xerces that comes along with milyn jar by default --&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;xerces&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;xercesImpl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/exclusion&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/exclusions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;lt;!-- Adding the latest version of Xerces jar here --&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;groupId&amp;gt;xerces&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;xercesImpl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;2.11.0&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;-------&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;---------&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&lt;/i&gt;I used the the 2nd solution worked perfectly. How about you?? Please let me know in comments section your way of solution for this issue.&amp;nbsp;&lt;i&gt; &lt;/i&gt;&lt;/div&gt;
&lt;center&gt;
&lt;div class=&quot;adsoptimal-slot&quot; style=&quot;width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;
&lt;/center&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/9036532795439401253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/07/solution-for-error-current.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/9036532795439401253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/9036532795439401253'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/07/solution-for-error-current.html' title='Solution For Error: &quot; Current configuration of the parser doesn&#39;t allow a maxOccurs attribute value to be set greater than the value 5,000.&quot;'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQt4Qv5t2Pu6Wf2B1sAYcbRQuG32Y_0ynqjFGGXTqWmY5FbS_xBKcab9V2Ov_GhhncJLGcbF3nTo9dxFdvFbb3FNuaAyLoXWQXGy_oDmh6CEwLUO8JxNd29CclCW-5husy4pu72gULJ03j/s72-c/jaxb_overview.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>San Francisco Bay Area, CA, USA</georss:featurename><georss:point>37.8271784 -122.29130780000003</georss:point><georss:box>34.6193554 -127.45488180000002 41.0350014 -117.12773380000003</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-3860413648854586160</id><published>2015-07-24T03:48:00.001-07:00</published><updated>2016-11-12T09:19:48.194-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="change"/><category scheme="http://www.blogger.com/atom/ns#" term="ipaddress"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="terminal"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>How To Change IPAddress of Linux/Ubuntu ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEPSSflqpibYasOinTUCQLxSFKEk_JrDBjgTaGAuiDPhYhd1PI_GCCwQteGL7NsYu_SJxFEkia9IMjFCpv5aGTdbijqiGaEe901dm-_gpEglzG-KACa7ICNi7aUh0mhbRFayi4CNb7Kd7m/s1600/ubuntu-ipaddress.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;153&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEPSSflqpibYasOinTUCQLxSFKEk_JrDBjgTaGAuiDPhYhd1PI_GCCwQteGL7NsYu_SJxFEkia9IMjFCpv5aGTdbijqiGaEe901dm-_gpEglzG-KACa7ICNi7aUh0mhbRFayi4CNb7Kd7m/s320/ubuntu-ipaddress.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Recently I needed to change the existing ipaddress of a linux machine. Since we migrated to our machines in to new cloud servers.&lt;br /&gt;
&lt;br /&gt;
Just follow the steps defined below:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;On terminal window type the following command.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt; sudo vi /etc/network/interfaces&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo gedit /etc/network/interfaces&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Then find the eth0 section and set the ipaddress as below&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;i&gt;auto eth0&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iface eth0 inet static&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; address 192.168.10.43&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; netmask 255.255.255.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; network 192.168.10.46&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; broadcast 255.255.255.0&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Note: Its my own ipaddresses, you have to define your own addresses.&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;In above file may have &quot; iface eth0 inet &lt;b&gt;dhcp&lt;/b&gt;&quot;. when you want to define static ip you have to change it to &quot;static&quot;. &quot;dhcp&quot; is for dynamic ipaddress.&lt;/li&gt;
&lt;li&gt;Then save and close the file, then run the restart the network with this command.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&amp;nbsp; &lt;i&gt;sudo /etc/init.d/networking restart&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;To ensure ipaddress has been changed just run the command.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;i&gt;&lt;b&gt; ifconfig eth0 &lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/3860413648854586160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/07/how-to-change-ipaddress-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/3860413648854586160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/3860413648854586160'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/07/how-to-change-ipaddress-of.html' title='How To Change IPAddress of Linux/Ubuntu ?'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEPSSflqpibYasOinTUCQLxSFKEk_JrDBjgTaGAuiDPhYhd1PI_GCCwQteGL7NsYu_SJxFEkia9IMjFCpv5aGTdbijqiGaEe901dm-_gpEglzG-KACa7ICNi7aUh0mhbRFayi4CNb7Kd7m/s72-c/ubuntu-ipaddress.JPG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Amsterdam, Netherlands</georss:featurename><georss:point>52.3702157 4.8951678999999331</georss:point><georss:box>52.2151137 4.5724443999999327 52.5253177 5.2178913999999335</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-6194704224294452397</id><published>2015-07-20T08:08:00.000-07:00</published><updated>2015-07-20T08:08:27.052-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Abstract Class"/><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><category scheme="http://www.blogger.com/atom/ns#" term="instantiation"/><category scheme="http://www.blogger.com/atom/ns#" term="OOP Concepts"/><title type='text'>Is It Possible To Define All The Methods In An Abstract Class?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;It is possible create an abstract class with all concrete
methods. But this class can’t be instantiated. Since it is an abstract class.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-feature-settings: normal; font-kerning: auto; font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-synthesis: weight style; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;We may have situations where we don’t want to instantiate a
class which is the base class for all the classes in the system or application.&lt;/span&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;This base class may have lot of methods used for different modules
in the application and we do not want to instantiate the object of the base
class and want to use only the reference of the class.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-feature-settings: normal; font-kerning: auto; font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-synthesis: weight style; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;An abstract class without any abstract methods should be a
rare thing and you should always question your application design if this case
arises. Normally you should refactor to use a concrete super class in this
scenario.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-feature-settings: normal; font-kerning: auto; font-language-override: normal; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-synthesis: weight style; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;One specific case where abstract class may justifiably have
no abstract methods is where it partially implements an interface, with the
intention that its subclasses must complete the interface.&lt;/span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;To take a slightly contrived motoring analogy, a Chassis
class may partially implement a Vehicle interface and provide a set of core
methods from which a range of concrete Vehicle types are extended. Chassis is
not a viable implementation of a Vehicle in its own right, so a concrete Car
subclass would have to implement interface methods for functional wheels,
engine and bodywork.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i style=&quot;font-weight: bold;&quot;&gt;A class
can be declared &lt;/i&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;abstract&lt;/span&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt; even if it does
not actually have any &lt;/i&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;abstract&lt;/span&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt; methods.
Declaring such a class &lt;/i&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;abstract&lt;/span&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt; indicates that
the implementation is somehow incomplete and is meant to serve as a superclass
for one or more subclasses that will complete the implementation. Such a class
cannot be instantiated.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/6194704224294452397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2012/01/is-it-possible-that-all-methods-are.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/6194704224294452397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/6194704224294452397'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2012/01/is-it-possible-that-all-methods-are.html' title='Is It Possible To Define All The Methods In An Abstract Class?'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6931307677272092439.post-7611819341092061960</id><published>2015-07-20T07:52:00.001-07:00</published><updated>2015-07-20T07:57:10.997-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="sudo"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Creating a Docker Group</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can access it with sudo. For this reason, docker daemon always runs as the root user.&lt;br /&gt;
&lt;br /&gt;
To avoid having to use sudo when you use the docker command, create a Unix group called docker and add users to it. When the docker daemon starts, it makes the ownership of the Unix socket read/writable by the docker group.&lt;br /&gt;
&lt;br /&gt;
Note: The docker group is equivalent to the root user; &lt;br /&gt;
&lt;br /&gt;
To create the docker group and add your user:&lt;br /&gt;
&lt;br /&gt;
Log into Ubuntu as a user with sudo privileges.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This procedure assumes you log in as the ubuntu user.&lt;br /&gt;
&lt;br /&gt;
Create the docker group and add your user.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;$ sudo usermod -aG docker ubuntu&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
Log out and log back in.&lt;br /&gt;
&lt;br /&gt;
This ensures your user is running with the correct permissions.&lt;br /&gt;
&lt;br /&gt;
Verify your work by running docker without sudo.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;$ docker run hello-world &lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4444290871954368&quot;;
/* Mail300x250Bottom-Java */
google_ad_slot = &quot;1192234683&quot;;
google_ad_width = 300;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaj2eeplanet.blogspot.com/feeds/7611819341092061960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/07/creating-docker-group.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7611819341092061960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6931307677272092439/posts/default/7611819341092061960'/><link rel='alternate' type='text/html' href='http://javaj2eeplanet.blogspot.com/2015/07/creating-docker-group.html' title='Creating a Docker Group'/><author><name>RPidugu</name><uri>http://www.blogger.com/profile/06048017126611314135</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>