Posts

What is RPM and How to build your RPM?

Introduction RPM (RPM Package Manager) is a popular utility for installing software on Unix-like systems, particularly Red Hat Linux. The name RPM variously refers to the .rpm file format. I t is an open packaging system available for anyone to use. It allows users to take source code for new software and package it into source and binary form such that binaries can be easily installed and tracked and source can be rebuilt easily. It also maintains a database of all packages and their files that can be used for verifying packages and querying for information about files and/or packages. Design Goals RPM provides the capability to install an entire application with a single command, to track the files it put on the system, and to remove those files by using another single command. Make it easy to get packages on and off the system. Make it easy to verify a package was installed correctly. Make it easy for the package builder. Make it start with original s...

How to integrate Web Application with Salesforce via Oauth

Image
This tutorial shows you the basic of Oauth. We have created a Java Web Application that authenticates the user to salesforce via Oauth 2.0 and then we have performed few CRUD operation via the new API. Setup: SSL enabled Tomcat Server as we have deployed our Web Application on tomcat. Click here for instruction on How to enable SSL on apache Tomcat 7.0 Salesforce Remote Access Application. Click here for instruction on How to create Remote Access Application on Salesforce? Download the application from here and change the name to Services. Run the Project: Check out the project from the above URL, import into the eclipse and Run as a Server. Navigate your browser to https://localhost:8443/Services . You will see the following page: Click on the link and it will take you the salesforce page for Authentication : Once you are login into salesforce, It will ask you to allow the Oauth_Apps to access your data: ...

How to create Remote Access Application on Salesforce?

Image
Before I'll start with how to create Remote Access Application. First let me explain what is actually Remote Access Application. What is Remote Access Application? A remote access Application is an application external to salesforce that uses the Oauth protocol to verify both the salesforce user and the external data. All remote access applications have been integrated with salesforce, such that they can access a subset of your salesforce data once you explicitly grant each application permission. How to create Remote Access Application? To create an Remote application, You must have your developer account, If you don’t have it then You can create it from here . Step to create your First Remote Access Application: Login to salesforce.com then click Your Name |Create | Apps and click on “new” button. Check below screenshot :     When you click on new button, you will see a page like this: Enter the name of the Application. This i...

What is Maven repository ?

Maven Repository : A repository is a place where all the project jars, library jar, plugins or any other project specific artifacts are stored and can be used by Maven easily. There are three types of repository :  local central remote  Local Repository : The maven local repository is a local folder that is used to store all your project’s dependencies (plugin jars and other files which are downloaded by Maven). In simple, when you build a Maven project, all dependency files will be stored in your Maven local repository. The default name of the Maven's local repository is .m2. Central Repository Maven central repository is repository provided by Maven community. It contains a large number of commonly used libraries. When you build a Maven’s project, Maven will check your pom.xml file, to identify which dependency to download. First, Maven will get the dependency from your local repository, if not found, then get it from the default Maven central repo...

how to install MAVEN on linux

What is MAVEN ? Read here : http://maven.apache.org/ Here are the steps to download and install Maven on linux : Step 1 : Download the latest binary from the http://maven.apache.org/download.cgi.              apache-maven-3.0.4-bin.tar.gz Step 2 : Untar it using tar command.               tar -zxvf /usr/local/apache-maven-3.0.4-bin.tar.gz Step 3: Add Maven binary Path to the System Path i,e add in .bash_profile path           $ cd $HOME           $ vi ~/.bash_profile Set PATH and M2_HOME as follows M2_HOME=/usr/local/apache_maven-3.0.4 PATH=PATH=$PATH:$HOME/bin:/usr/local/apache_maven-3.0.4/bin save the file by pressing esc : wq button Note: Don't delete the previous PATH, Just append the M2_HOME path after : Now save and clos...

How ExceptionHandler return JSON in spring MVC

I am working on one project where client/server response is in JSON format. It is easy to send object in JSON format but what if some exception occured and you want to send the Exception also in JSON format ? After n number of trial. I finally able to do the above task .  Step 1 : Add following annotation " AnnotationMethodHandlerExceptionResolver " in your <CONTROLLER>-servlet.xml file. <!-- JSON format support for Exception -->     <bean id="methodHandlerExceptionResolver"         class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver">         <property name="messageConverters">             <list>                 <ref bean="jacksonMessageConverter" />             </list> ...

What is Hibernate Caching?

Image
In a typical application, you perform lot of operations like instantiate objects, load object from the database and so on. Sometime in multiuser application you may face a situation in handling multiple call of databases. Hibernate offers caching functionality which is designed to reduces the amount of necessary database access. This is a very powerful feature if used correctly. It increases your application performance and works between your application and the database as it avoids the number of database hit as many as possible. Hibernate Cache Types : Hibernate uses different types of caches. Each type of cache is used for different purposes. Let us first have a look at this cache types. First level cache Second level cache Query level cache 1. First level cache : First-level cache is the session cache and is always Associates with the Session object. Hibernate uses this cache by default. The Session object keeps an object under its own cache before committing to th...