Skip to main content

Posts

steps to perform ssh login without password

steps to perform ssh login without password we will be using     ssh-keygen     ssh-copy-id you need to create a public and private key on your host machine     ssh-keygen now newly created public key must be copied to remote host which we want to access     ssh-copy-id -i <public-key-location> remote-host     Ex: ssh-copy-id -i .ssh/id_rsa.pub portweb@portaldevfe01

Axis 2 WSDL to Java Approach

Axis 2 Tomcat Setup Download Axis 2 war distribution from http://axis.apache.org/axis2/java/core/download.cgi Now install it to Tomcat by copying the axis2.war file to webapps directory of tomcat installation. Axis2 folder should be created automatically if tomcat is up and running. We can conclude this part if http://localhost:8080/axis2 is ok. Validate link in the page shouldn't show any errors. Implementation create simple maven project in eclipse using create simple project option in the first window. name myHelloService2 Use following as the wsdl for our web service <definitions name="HelloService"    targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl"    xmlns="http://schemas.xmlsoap.org/wsdl/"    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"    xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl"    xmlns:xsd="http://www.w3.org/2001/XMLSchema">    <message name="Sa...

Sonic MQ

Load Balancing load balancing allows a broker to be redirected to another broker for the purpose of redistributing the load. this will help getting rid of overloading a single broker. Load balancing algorithm is connection count load balancing algorithm. the gateway broker maps the client specified url to acceptor socket. acceptor socket is mapped to a broker. load balancing agent uses acceptor name to redirect the connection. the gateway broker is the controller of broker group for round robin load balancing. the gateway broker is where client initially connects. Backup Broker A backup broker is deployed to provide failover if its primary broker fails. private and backup broker will communicate to replicate data and monitor each others status and detect failures.

Lucene Indexing

Lucene is rich and powerful text search library written in java. Lucene provides full-text indexing in databases and various other objects. lucene will add content to a full text index, then we can perform queries on this index . lucene is able to generate fast results because, it will search an index instead of searching a text directly. this is similar to searching a book and getting a page number, using index number at the end of the book unlike searching each page. In Lucene document is the unit of index. index contains one or more documents. document contains one or more fields. for example set of users can be considered as an index. a single user record will be a document and user name address can be fields. Indexing is adding documents to Index via an IndexWriter. Searching is retrieving documents from an Index via an IndexSearcher. A searching query will be passed to IndexSearcher. Queries can be performed via Lucene Query Language.

Spring MVC Job Scheduling

Create a Spring MVC project  Open spring tool suite File > New > Spring Project > Spring Mvc Project Test whether the project is working, if it's ok you should see a hello page in your browser. Adding Dependency Add following to pom.xml.         <dependency>             <groupId>org.springframework</groupId>             <artifactId>spring-core</artifactId>             <version>${springframework.version}</version>         </dependency>         <dependency>             <groupId>org.springframework</groupId>             <artifactId>spring-context</artifactId...

ActiveMQ Hello World with Maven Web Spring Mvc

Create a spring mvc project Open  Spring Tool Suite (STS). Mine is 3.6.4 File > New > Spring Project > Spring Mvc Project Test whether the application is running perfect. If it's running ok you will see a new page openned in browser containing following If you face errors try to update maven dependencies as right click on project > maven > update project Project Structure gowild.jsp add a new jsp to view folder home.jsp add a link in the home page to new page New Controller Method Add a new controller method to home controller page so it will handle new page requests Testing Test whether the application running. you should get a new link in the home page which points to the new jsp page. Pom.xml Now lets add activemq dependencies through pom.xml. add following to the pom         <dependency>          ...