Hi All, I had a use case where I need to send the push notification to Android Device using Grails Application. For sending push notification I have used the Android GCM plugin. So, before going further we should know what is push notification and how it works. Push Notification : It is a message or events delivered by a...
Hi Friends, Sometimes we need to perform any DB operation in between a transaction, but due to transaction's property, it's getting committed only once the parent transaction will be finished. If you need to perform any operation that need to be committed immediately, irrespective of parent transaction (Example : for a dependent...
The requirement to send delayed/scheduled message is to publish any message with a delay time. To achieve this, earlier we had to use dead letter exchange but now we can send scheduled/delayed messages from RabbitMQ with "rabbitmq_delayed_message_exchange" plugin. we can send scheduled/ delayed messages from rabbitMQ by following these...
Sometimes we need to access details of current logged in user but that will be an additional database query. To save that query we can use principal object of Spring security which provides details of logged in user . But by default principal object have few fields like id, username and password. If we need to access user's name /...
While doing automation using selenium, there are certain repetetive tasks that we need to perform in order to handle page elements. So, the aim of this blog is to highlight some common operations that we need to handle every now and then. Some operations are: 1. Open URL in different browsers (Chrome, Firefox, IE) 2. Do mouse-hovers ...
In my Grails app, I came across a requirement of setting up an SMTP server for receiving mails and extracting their content. After exploring a lot I found SubEthaSMTP to be the most suitable. SubEthaSMTP lets your application receive an SMTP mail very easily. To setup an SMTP server in your application, You need to follow the steps as...
Hi, Before writing this blog, I would first like to make you familiar with one quote "Be liberal in what you accept, and conservative in what you send". Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400 outer element with extremely...
Recently in one of my project i had a requirement of identifying the class of a property of an object with object class and property name and then determining whether it's an Enum class or not. I found an easy solution for this using Reflection API. Using Java Reflection you can inspect the fields (member variables) of classes. This is...
In one of my recent project, i want to profile method execution time. I have used Spring AOP to profile method execution time. It's very easy to implement AOP profiling in grails 1. Suppose we have below mentioned service class, we want to log execution time of method saveDataStudent,saveDataUpdated methods in service class. We need...
Text Normalization is the process of "standardizing" text to a certain form, so as to enable, searching, indexing and other types of analytical processing on it. Often working with large quantities of text we encounter character with accents like é , â etc. Unicode provides multiple ways to create such characters . For example we can...
To run your Grails application on SSL, firstly you need to configure the Tomcat server. Here in this example, I will show how to configure Tomcat instance and run Grails/Java application. For SSL/HTTPS: We need .keystore file. You can generate it by using command“keytool -genkey”. Run this command on linux terminal or window...
In one of my project, My front end application runs on one server and back end application runs on another. Both application have to communicate with each other through SSL(Secure Sockets Layer). SSL is a way to secure internet communication from your browser to a secure website. The websites using SSL will have https:// to their name. ...