Category: Java Frameworks
Salesforce | Best Practices
Best Practices for Salesforce For Apex Classes: 1. Use Asynchronous Apex methods like @future methods, batch processing, scheduler that does not need to be executed synchronously. 2. Asynchronous Apex should be “bulkified”. It means able to handle collections of records.
Java | Instance and Static variables with final keyword
When to use instance variables, static variables and when to use final with them? Instance variables belong to the object and each object has its own value for each instance variable. For example: The company has many employees and each
Java | Few tips about Maven
1. How to compile maven project using different poms? Solution: When we start compiling project with mvn -clean install command, maven tool first attempts to search the pom.xml file in the current directory. If no pom is found in the
Apache Solr | Indexing all files in a folder recursively
Indexing of all files inside a folder and all its subfolders can be done using java language in the following ways: 1. Using data import handler. 2. Without data import handler i.e by creating a recursive function in java code.
Java | Wrapper classes, autoboxing and unboxing
Wrapper classes are the classes to convert the primitive types to objects of their respective class. We have many primitive types in Java like int, float, char etc. These primitive types can not be used in Collections as Collections only
Java Servlets | Converting relative path to absolute for file upload
In the program of uploading files to a server location, instead of using absolute location for saving file to that path, relative path needs to be used. Program was working correctly for absolute path. In the maven project with the
Apache Tomcat | No change reflected on re-deploying war file into tomcat’s webapps folder
Issue: I had deployed latest war file of my Java project into tomcat’s webapps folder but I could not see any changes reflected while running my project. What I tried? It looked like war file must not have been uploaded properly.
Spring Framework | How to define interceptor for a spring web project
Interceptors are components that intercept requests before passing to controller and responses before rendering the view. Interceptors can intercept request and response in our web application. With the help of interceptor we can check whether a user has the authority
Apache Solr | Finding term frequency of a specific term in Solr for indexed Documents
Document frequency and Term frequency are the terms that are generally used for finding relevance of the documents to the search query. When user types some word, then the number of documents containing the word returned in the result set