<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pandurang Patil</title><link>https://www.pandurangpatil.com/</link><description>Recent content on Pandurang Patil</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 11 Dec 2015 03:36:00 -0800</lastBuildDate><atom:link href="https://www.pandurangpatil.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Troubleshout Open file limit</title><link>https://www.pandurangpatil.com/post/2015-12-11-troubleshout-open-file-limit/</link><pubDate>Fri, 11 Dec 2015 03:36:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2015-12-11-troubleshout-open-file-limit/</guid><description>Show no of open files sorted by PID - lsof | awk '{ print $2; }' | uniq -c | sort -rn | head Check individual file limits of a process - cat /proc/&amp;lt;PID&amp;gt;/limits to obtain a precise count of the open files at given instant of time - ls /proc/&amp;lt;PID&amp;gt;/fd | wc -l This will list all open files with given process - lsof -p &amp;lt;PID&amp;gt; In some cases you might have to look at the open file limit of the process which started your process.</description></item><item><title>Setup virtualbox on Ubuntu Server 64 Bit</title><link>https://www.pandurangpatil.com/post/2014-07-12-setup-virtualbox-on-ubuntu-server-64-bit/</link><pubDate>Sat, 12 Jul 2014 02:47:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-07-12-setup-virtualbox-on-ubuntu-server-64-bit/</guid><description>Setup virtual box on ubuntu server 64bit and use phpvirtualbox to access webui of VirtualBox to manage the instances on virtualbox.
Ubuntu Server 64bit VirtualBox4.3. phpvirtualbox Running VirtualBox and phpvirtualbox on the same machine.
I mostly followed this blog http://santi-bassett.blogspot.in/2013/01/installing-virtualbox-on-ubuntu-server.html.
Except few changes.
When I installed virtual box I installed latest version 4.3.* location of phpvirtualbox has been changed to sourceforge.net http://sourceforge.net/projects/phpvirtualbox/files/ and used phpvirtualbox 4.3.1 version. However even after following all the steps right I got following error</description></item><item><title>GWT browser specific css</title><link>https://www.pandurangpatil.com/post/2014-05-20-gwt-browser-specific-css/</link><pubDate>Tue, 20 May 2014 23:52:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-05-20-gwt-browser-specific-css/</guid><description>Yea it is possible to write browser specific css with GWT application which uses CSS through CssResource.
@if user.agent gecko1_8 { .startup p { color: #000000; text-shadow: 0 0 3px #000000; } } @else { .startup p { color: #000000; } } Note: You can use this logical if else and many more other expression inside css which are used inside GWT code. Only through CssResource interface. If you are directly using the respective css inside html main source file then this will not work.</description></item><item><title>GWT Jquery integration</title><link>https://www.pandurangpatil.com/post/2014-05-20-gwt-jquery-integration/</link><pubDate>Tue, 20 May 2014 23:38:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-05-20-gwt-jquery-integration/</guid><description>It is very easy to have GWT Jquery integration using gwtquery. Follow below steps Add maven dependency for gwtquery, at the time of writing this article it was 1.4.2 and tested it with GWT 2.5.0 version.
&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;com.googlecode.gwtquery&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;gwtquery&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;1.4.2&amp;lt;/version&amp;gt; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt; &amp;lt;/dependency&amp;gt; Then inherit your module from required gwtquery module.
&amp;lt;inherits name='com.google.gwt.query.Query'/&amp;gt; User jquery api wrappers as follows.
import static com.google.gwt.query.client.GQuery.$; .. ... public class GwtJquery implements EntryPoint { @Override public void onModuleLoad() { $(&amp;quot;#startup&amp;quot;).</description></item><item><title>Eclipse getting crashed randomly on ubuntu</title><link>https://www.pandurangpatil.com/post/2014-04-29-eclipse-getting-crashed-randomly-on-ubuntu/</link><pubDate>Tue, 29 Apr 2014 19:02:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-29-eclipse-getting-crashed-randomly-on-ubuntu/</guid><description>If your eclipse is getting crashed randomly and that too frequently look at the crash reported. This crash report will be placed in the directory from where you start the eclipse and search for /usr/lib/x86\_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so. If find this string then this issues of overlay scrollbar library. This will be solved once you remove that library. Sometimes, you will not find crash report generated, even in that case it is most probably the issue of overlay scrollbar.</description></item><item><title>Redirect process output to std output when you fork one process from another process.</title><link>https://www.pandurangpatil.com/post/2014-04-29-redirect-process-output-to-std-output-when-you-fork-one-process-from-another-process/</link><pubDate>Tue, 29 Apr 2014 04:58:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-29-redirect-process-output-to-std-output-when-you-fork-one-process-from-another-process/</guid><description>In the situation where you want to redirect input / output of one process to the std input output of parent process (from which you are starting first process). You can make use of inheritIO() method of a ProcessBuilder.
ProcessBuilder pb = new ProcessBuilder(&amp;quot;command&amp;quot;, &amp;quot;argument); pb.directory(new File(&amp;lt;directory from where you want to run the command&amp;gt;)); pb.inheritIO(); Process p = pb.start(); p.waitFor(); It may not be necessary to call waitFor() method in above code.</description></item><item><title>Quartz Scheduler with Google Guice</title><link>https://www.pandurangpatil.com/post/2014-04-27-quartz-scheduler-with-google-guice/</link><pubDate>Sun, 27 Apr 2014 10:37:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-27-quartz-scheduler-with-google-guice/</guid><description>To integrate Quartz with Guice. One can follow below steps. The most important part is, we should be able to inject dependencies inside Job.
To provide injectable Scheduler Instance we need to write Scheduler provider as follows:
import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.impl.StdSchedulerFactory; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; /** * @author Pandurang Patil 27-Apr-2014 * */ @Singleton public class SchedulerProvider implements Provider&amp;lt;Scheduler&amp;gt; { private Scheduler scheduler; @Inject public SchedulerProvider(SchedulerJobFactory jobFactory) throws SchedulerException { scheduler = new StdSchedulerFactory().</description></item><item><title>Java: Retreive ByteArray from Direct ByteBuffer and convert it to String</title><link>https://www.pandurangpatil.com/post/2014-04-25-java-retreive-bytearray-from-direct-bytebuffer-and-convert-it-to-string/</link><pubDate>Fri, 25 Apr 2014 06:45:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-25-java-retreive-bytearray-from-direct-bytebuffer-and-convert-it-to-string/</guid><description>I assume you understand what is Direct ByteBuffer. I was trying to retrieve byte[] from Direct ByteBuffer
ByteBuffer buffer = ByteBuffer.allocateDirect(10000); ..... ..... buffer.flip(); byte[] data = buffer.array(); and I was getting this error
Exception in thread &amp;quot;main&amp;quot; java.lang.UnsupportedOperationException at java.nio.ByteBuffer.array(ByteBuffer.java:959) I was able to solve this as follows
ByteBuffer buffer = ByteBuffer.allocateDirect(10000); ..... ..... buffer.flip(); byte[] data = new byte[buffer.remaining()]; buffer.get(data); // Here you hava data populated inside data[] array String token = new String(data);</description></item><item><title>ZeroMQ ipc not working</title><link>https://www.pandurangpatil.com/post/2014-04-17-zeromq-ipc-not-working/</link><pubDate>Thu, 17 Apr 2014 05:20:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-17-zeromq-ipc-not-working/</guid><description>If you are using Zero MQ IPC endpoint url like ipc://someendpoint. Then communication between two threads of same process will work perfectly fine. But it will fail if you are trying to communicate across the processes. If you look at ZeroMQ document properly end point should correspond to path. Thats where above end point url works fine for intra process communication as this file someendpoint will correspond to file in current directory from where you are running this app.</description></item><item><title>Java: Add shutdown hook invoked even with CTRL + C</title><link>https://www.pandurangpatil.com/post/2014-04-16-java-add-shutdown-hook-invoked-even-with-ctrl-c/</link><pubDate>Wed, 16 Apr 2014 09:15:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-16-java-add-shutdown-hook-invoked-even-with-ctrl-c/</guid><description>Add Shutdown hook with JVM, which will be invoked even when application is killed by pressing CTRL + C
Create a separate class which extends java.lang.Thread class or implements java.lang.Runnable interface
public class AppShutDownHook extends Thread { @Override public void run() { // TODO: Complete your shutdown activity here. } } Register this thread with Java Runtime in your code where your application is getting initialised. Most probably inside main.</description></item><item><title>.profile is ignored when terminal is started in MAC-OSX</title><link>https://www.pandurangpatil.com/post/2014-04-13-profile-is-ignored-when-terminal-is-started-in-mac-osx/</link><pubDate>Sun, 13 Apr 2014 10:43:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-13-profile-is-ignored-when-terminal-is-started-in-mac-osx/</guid><description>One fine day suddenly all environment variables that I have set inside .profile file of my machine stopped getting declared when machine is restarted.
It turns out that if you have .bash_profile or .bash_login file then .profile file will be ignored by bash.
So you need to make use of either .profile or .bash_profile not both of them, if you are using bash.</description></item><item><title>bind MySql to multiple ipaddress</title><link>https://www.pandurangpatil.com/post/2014-04-13-bind-mysql-to-multiple-ipaddress/</link><pubDate>Sun, 13 Apr 2014 05:04:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-13-bind-mysql-to-multiple-ipaddress/</guid><description>If you are looking to bind MySql Service with multiple ip address on given machine. Then you cannot do it selectively. When I say selectively, if there are 5 network cards (IP Addresses) to given machine and you want to allow connections to be made only from 3 network cards (IP Addresses). Then you cannot configure MySql service to bind selective IP addresses. What you can do is either you can bind it with single ip address or all the IP addresses available on the machine.</description></item><item><title>Mysql 5.5 is not accessible remotely.</title><link>https://www.pandurangpatil.com/post/2014-04-13-mysql-5-5-is-not-accessible-remotely/</link><pubDate>Sun, 13 Apr 2014 01:34:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-13-mysql-5-5-is-not-accessible-remotely/</guid><description>I recently installed MySql 5.5 and tried to access it from remote machine. But it was not accessible. I had added remote user for the remote machine from which I was trying to access the DB. But it was failing to connect, I even tried to connect it through telnet. Then I found that by default mysql is only bound to serve localhost requests only. If you need to access it remotely you need to make changes in my.</description></item><item><title>MySql Datafiles are getting corrupted on Mac-OSX abrupt shutdown</title><link>https://www.pandurangpatil.com/post/2014-04-12-mysql-datafiles-are-getting-corrupted-on-mac-osx-abrupt-shutdown/</link><pubDate>Sat, 12 Apr 2014 21:19:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-12-mysql-datafiles-are-getting-corrupted-on-mac-osx-abrupt-shutdown/</guid><description>I have consistently faced this issue of MySql data files getting corrupted when my machine is rebooted abruptly. This has resulted into repetitive work that I have to do to rebuild the data. I tried to google for the solution and see if somebody else has seen this issue. But it seems this the way it will work, as MySql data files are not closed properly which results into corrupt database in case your machine gets abruptly restarted.</description></item><item><title>Location of MySQL data files on MAC - OSX</title><link>https://www.pandurangpatil.com/post/2014-04-12-location-of-mysql-data-files-on-mac-osx/</link><pubDate>Sat, 12 Apr 2014 21:09:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-12-location-of-mysql-data-files-on-mac-osx/</guid><description>Default location of MySql data files on MAC - OSX is
/usr/local/mysql/data/</description></item><item><title>Open link in new Tab / Window (Html Anchor tag)</title><link>https://www.pandurangpatil.com/post/2014-04-11-open-link-in-new-tab-window-html-anchor-tag/</link><pubDate>Fri, 11 Apr 2014 20:07:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-04-11-open-link-in-new-tab-window-html-anchor-tag/</guid><description>To Open respective page pointed by hyperlink in new tab or window one need to make use of target attribute for more details refer. As per below description following configuration will help you to control where a respective link will be displayed.
Value Description _blank Opens the linked document in a new window or tab _self Opens the linked document in the same frame as it was clicked (this is default) _parent Opens the linked document in the parent frame _top Opens the linked document in the full body of the window framename pens the linked document in a named frame Sometimes you have to open a link inside new tab e.</description></item><item><title>Run eclipse on remote ubuntu 13.10 server using x11</title><link>https://www.pandurangpatil.com/post/2014-03-29-run-eclipse-on-remote-ubuntu-13-10-server-using-x11/</link><pubDate>Sat, 29 Mar 2014 13:20:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-29-run-eclipse-on-remote-ubuntu-13-10-server-using-x11/</guid><description>To run eclipse from on remote ubuntu 13.10 server using x11 on local machine.
Prerequisites: I am assuming JDK and Eclipse is already installed.
In addition to that you need to install few libraries on remote server. Run the following command to install those libraries on remote server.
$ sudo apt-get install libgtk2.0-0:i386 libxxf86vm1:i386 libsm6:i386 lib32stdc++6 libxtst6 Once above libraries are install open another terminal and connect remote server through ssh with -X option</description></item><item><title>UBUNTU 13.4 LD_LIBRARY_PATH is not set from /etc/environment</title><link>https://www.pandurangpatil.com/post/2014-03-28-ubuntu-13-4-ld-library-path-is-not-set-from-etc-environment/</link><pubDate>Fri, 28 Mar 2014 00:49:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-28-ubuntu-13-4-ld-library-path-is-not-set-from-etc-environment/</guid><description>For some reason LD_LIBRARY_PATH value is not getting set through /etc/environment. All other variables are getting initialized properly when it is been set through /etc/environment. After searching for the solution I came to know after UBUNTU 9.04 release you are not able to set LD_LIBRARY_PATH from $HOME/.profile, /etc/profile, nor /etc/environment refer documentation
Run following command and restart the machine to workaround the issue.
echo STARTUP=\&amp;#34;/usr/bin/env LD_LIBRARY_PATH=\${LD_LIBRARY_PATH} \${STARTUP}\&amp;#34; | sudo tee /etc/X11/Xsession.</description></item><item><title>Install ZeroMQ on ubuntu with Java Binding</title><link>https://www.pandurangpatil.com/post/2014-03-27-install-zeromq-on-ubuntu-with-java-binding/</link><pubDate>Thu, 27 Mar 2014 23:38:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-27-install-zeromq-on-ubuntu-with-java-binding/</guid><description>First install all required tools to build zeromq library
sudo apt-get install libtool autoconf automake uuid-dev build-essential pkg-config Once you have required tools install download zeromq source code and make a build
#Download latest zermoq source code http://zeromq.org/area:download #I tried it with zeromq-3.2.4.tar.gz (http://download.zeromq.org/zeromq-3.2.4.tar.gz) $ zeromq-3.2.4.tar.gz $ tar -zxvf zeromq-3.2.4.tar.gz $ cd zeromq-3.2.4 $ ./configure $ make $ sudo make install $ cd ../ This will install zeromq libraries at location /usr/local/lib you may like to set this path with LD_LIBRARY_PATH so that the libraries will be used at the time of execution.</description></item><item><title>Install Eclipse Maven plugin and import maven project</title><link>https://www.pandurangpatil.com/post/2014-03-27-install-eclipse-maven-plugin-and-import-maven-project/</link><pubDate>Thu, 27 Mar 2014 02:09:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-27-install-eclipse-maven-plugin-and-import-maven-project/</guid><description>With new versions of Eclipse old m2e plugins have become absolute now you need to install eclipse plugins from eclipse market place. Follow below steps to install m2e plugins along with required GWT plugins. I have tried below steps with Eclipse (Kepler)
Install GWT eclipse plugin Help -&amp;gt; Eclipse Marketplace. Search with string GWT install Google Plugin for eclipse 4.3. Install maven plugin open Eclipse Marketplace and search for m2e-wtp look for Maven Integration for Eclipse WTP Juno (1.</description></item><item><title>GWT youtube player</title><link>https://www.pandurangpatil.com/post/2014-03-23-gwt-youtube-player/</link><pubDate>Sun, 23 Mar 2014 02:01:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-23-gwt-youtube-player/</guid><description>Created GWT wrapper over YouTube Iframe player api refer
Usage Inherit GWT module &amp;lt;inherits name=&amp;quot;open.pandurang.gwt.youtube.YouTube&amp;quot; /&amp;gt;
Before you start using YouTube iframe library one need to load them first, so as to load the library first you need make call to YouTubePlayer.loadYouTubeIframeApi();. This will ensure library is loaded, you can register to recieve event when library is loaded completely by using ApiReadyEventHandler for more details on the same refer YouTube documentation geting started section.</description></item><item><title>GIMP Add border and shadow to a layer</title><link>https://www.pandurangpatil.com/post/2014-03-21-gimp-add-border-and-shadow-to-a-layer/</link><pubDate>Fri, 21 Mar 2014 20:53:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-21-gimp-add-border-and-shadow-to-a-layer/</guid><description>To Add border to layer follow below steps
Select the layer then use menu Layer -&amp;gt; Transparency -&amp;gt; Alpha to Selection. Select -&amp;gt; Border Border Selection window will appear. Enter the size of border you want to show. Layer -&amp;gt; Transparency -&amp;gt; Intersect with selection Edit -&amp;gt; Fill with FG/BG Color You need to select required color from FG/BG color panel. Select -&amp;gt; None With above steps you will be added border to your layer.</description></item><item><title>Call GWT Java Code from JavaScript</title><link>https://www.pandurangpatil.com/post/2014-03-18-call-gwt-java-code-from-javascript/</link><pubDate>Tue, 18 Mar 2014 07:14:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-18-call-gwt-java-code-from-javascript/</guid><description>It is very easy to call Aavascript from GWT java code by making use of JSNI. But calling GWT java code from external Javascript of JSNI is little tricky and it becomes more complicate when you have to call instance method of a GWT java class. For more detail refer GWT official document (refer)
Call static class method from JavaScript
GWTCode.java
package open.pandurang.client.view; /** * @author Pandurang Patil 18-Mar-2014 * */ public class GWTCode { public static String hello(String name) { return &amp;#34;Hello &amp;#34; + name + &amp;#34;!</description></item><item><title>Check Cron executed or not.</title><link>https://www.pandurangpatil.com/post/2014-03-10-check-cron-executed-or-not/</link><pubDate>Mon, 10 Mar 2014 04:02:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-10-check-cron-executed-or-not/</guid><description>Many a times it happens we schedule some cron job to get executed, we do check as well whether command gets executed properly or not. And even though we tried the command your cron fail to execute. There are two possibilities either cron is not configured properly or some how command is failed. Now in this case how do we check if cron is getting executed or not. Does it gets logged some where when is last cron executed?</description></item><item><title>Setup firewall with UFW on ubuntu</title><link>https://www.pandurangpatil.com/post/2014-03-09-setup-firewall-with-ufw-on-ubuntu/</link><pubDate>Sun, 09 Mar 2014 12:48:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-09-setup-firewall-with-ufw-on-ubuntu/</guid><description>It is very easy to setup firewall using UFW on ubuntu server. First you need to check if you have UFW installed on your machine. If it is installed you can check the status of the same using
$ sudo ufw status Status: inactive In case it is installed but not enabled. If it is not installed then it will throw command not found error. If it is active then it will show out put similar like below output.</description></item><item><title>Download Oracle JDK / JRE from console / command prompt</title><link>https://www.pandurangpatil.com/post/2014-03-08-download-oracle-jdk-jre-from-console-command-prompt/</link><pubDate>Sat, 08 Mar 2014 00:03:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-08-download-oracle-jdk-jre-from-console-command-prompt/</guid><description>Many a times we have to download JDK/JRE on remote machine through console. In most of the cases we tend to download it on our desktop and then upload it to the remote machine through SCP as the download link from Oracle website are not directly accessible. You need to first accept the agreement so that you get the download link. The link is not usable to download it using wget directly.</description></item><item><title>GWT access style defined inside .ui.xml within corresponding .java file</title><link>https://www.pandurangpatil.com/post/2014-03-06-gwt-access-style-defined-inside-ui-xml-within-corresponding-java-file/</link><pubDate>Thu, 06 Mar 2014 21:28:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-06-gwt-access-style-defined-inside-ui-xml-within-corresponding-java-file/</guid><description>Some times you may want to access styles defined inside your Sample.ui.xml file which you want to access/use from within Sample.java widget class. You can do that by defining an interface which extends from com.google.gwt.resources.client.CssResource and declaring method with name matching exactly that of required style class name that you have declared inside ui.xml. Refer below code.
Sample.ui.xml contents
&amp;lt;src path&amp;gt;/com/pandurang/client/ui/Sample.ui.xml &amp;lt;ui:UiBinder xmlns:ui=&amp;#39;urn:ui:com.google.gwt.uibinder&amp;#39; xmlns:g=&amp;#39;urn:import:com.google.gwt.user.client.ui&amp;#39;&amp;gt; . . . &amp;lt;ui:style type=&amp;#34;com.pandurang.client.ui.Sample.MyStyle&amp;#34;&amp;gt; .domain { margin: 0 auto; width: 730px; } .</description></item><item><title>Configure Nginx for SSL</title><link>https://www.pandurangpatil.com/post/2014-03-06-configure-nginx-for-ssl/</link><pubDate>Thu, 06 Mar 2014 04:22:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-06-configure-nginx-for-ssl/</guid><description>You need to have private key and CA signed certificate (to test you may generate your own Self signed certificate) to configure your nginx to serve request over SSL. Add following lines into your nginx.conf file and make required changes to point ssl_certificate to location of your certificate in this configuration it is server.crt (if you copy your .crt and .key file into &amp;lt;nginx home&amp;gt;/conf folder . In that case you can specify only file name other wise you need to specify absolute path of a file).</description></item><item><title>configure nginx to redirect user from HTTP to HTTPS</title><link>https://www.pandurangpatil.com/post/2014-03-06-configure-nginx-to-redirect-user-from-http-to-https/</link><pubDate>Thu, 06 Mar 2014 04:22:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-06-configure-nginx-to-redirect-user-from-http-to-https/</guid><description>When you are going to sever all requests over SSL then in some cases you need to only serve requests over SSL. While doing that you may have to disable port 80 so that all the requests will be only served through SSL. But in that case if user hits your url with http, user will see page not found error. Instead you can enable your port 80 and redirect all requests to https url with following configuration.</description></item><item><title>Generate self signed SSL certificate</title><link>https://www.pandurangpatil.com/post/2014-03-06-generate-self-signed-ssl-certificate/</link><pubDate>Thu, 06 Mar 2014 04:16:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-06-generate-self-signed-ssl-certificate/</guid><description>Follow below steps to generate self signed certificate:
You need to first generate your own private key. $ openssl genrsa -des3 -out server.key 1024 Generating RSA private key, 1024 bit long modulus .......................++++++ .......++++++ e is 65537 (0x10001) Enter pass phrase for server.key: Verifying - Enter pass phrase for server.key: With above command it will generate private key, while doing that it will ask you to enter pass phrase which will make this private key useful who knows this pass phrase.</description></item><item><title>Configure nginx to server multiple domains / subdomains</title><link>https://www.pandurangpatil.com/post/2014-03-05-configure-nginx-to-server-multiple-domains-subdomains/</link><pubDate>Wed, 05 Mar 2014 03:06:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-05-configure-nginx-to-server-multiple-domains-subdomains/</guid><description>With nginx it is quite easy to configure multiple domains or subdomains to be served from single server. Refer following configuration for the same.
server { server_name first.pandurangpatil.com; root /var/www/first; } server { server_name second.pandurangpatil.com; root /var/www/second; } server { server_name someother.com; root /var/www/other; }</description></item><item><title>Compare more than two war files and repackage them excluding common jars</title><link>https://www.pandurangpatil.com/post/2014-03-03-compare-more-than-two-war-files-and-repackage-them-excluding-common-jars/</link><pubDate>Mon, 03 Mar 2014 02:38:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-03-03-compare-more-than-two-war-files-and-repackage-them-excluding-common-jars/</guid><description>Some times you need to deploy more than one war files under same servlet container. In those war files there might have some common jars across them, which you want to deploy directly to servlet containers class path. So that container won&amp;rsquo;t load those jars separately in the context of each war application. Which in turn will reduce the utilisation of permgen memory space. Following code snippet will help you to compare more than two war files, extract common shared libraries inside separate folder and repackage those wars excluding common jar files.</description></item><item><title>nginx proxypass configuration with X-Forwarded-Host header</title><link>https://www.pandurangpatil.com/post/2014-02-28-nginx-proxypass-configuration-with-x-forwarded-host-header/</link><pubDate>Fri, 28 Feb 2014 11:00:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-28-nginx-proxypass-configuration-with-x-forwarded-host-header/</guid><description>I have used and configured apache for proxy pass and proxy pass reverse multiple times with X-Forwarded-Host. I tried configuring same with nginx and it works out to be more customisable and easy one.
server { listen 80; server_name pandurangpatil.com; location /myapp { proxy_set_header X-Forwarded-Host $host; proxy_pass http://localhost:8080/myapp; } . . . }</description></item><item><title>MySql JPA toplink Auto increment id generation.</title><link>https://www.pandurangpatil.com/post/2014-02-28-mysql-jpa-toplink-auto-increment-id-generation/</link><pubDate>Fri, 28 Feb 2014 02:30:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-28-mysql-jpa-toplink-auto-increment-id-generation/</guid><description>To configure JPA entity to make use of auto increment feature of MySql for primary key generation you can make use of IDENTITY strategy ref below code.
@Entity public class Customer { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private long id; . . . public long getId() { return id; } } But problem with this way of generating ids with MySql and JPA combination is when you persist new entity and try to retrieve id assigned to newly persisted entity using getId() method.</description></item><item><title>Java java.lang.OutOfMemoryError: PermGen space</title><link>https://www.pandurangpatil.com/post/2014-02-26-java-java-lang-outofmemoryerror-permgen-space/</link><pubDate>Wed, 26 Feb 2014 12:11:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-26-java-java-lang-outofmemoryerror-permgen-space/</guid><description>java.lang.OutOfMemoryError: PermGen space You get this error that means your JVM is running out of allocated memory for storing class metadata information (class properties, methods annotations etc). This space is not cleaned by Garbage collector. It could happen because of multiple reasons.
One you are dynamically generating classes and those are getting loaded in JVM. Second your application is so big and it has more number of dependencies on other third party libraries.</description></item><item><title>Tomcat 7 onwards set additional JAVA_OPTS options</title><link>https://www.pandurangpatil.com/post/2014-02-26-tomcat-7-onwards-set-additional-java-opts-options/</link><pubDate>Wed, 26 Feb 2014 11:46:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-26-tomcat-7-onwards-set-additional-java-opts-options/</guid><description>To set JAVA_OPTS options which you want to set additionally while running the tomcat should be set inside &amp;lt;tomcat home&amp;gt;/bin/setenv.sh if this file is not present then create one and set variable JAVA_OPTS=&amp;quot;-Dsomething $JAVA_OPTS&amp;quot;. If you have to set some variables while only starting the tomcat then you need to set those variables to CATALINA_OPTS rather than JAVA_OPTS.</description></item><item><title>Jersey REST retrieve List of custom object</title><link>https://www.pandurangpatil.com/post/2014-02-21-jersey-rest-retrieve-list-of-custom-object/</link><pubDate>Fri, 21 Feb 2014 01:30:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-21-jersey-rest-retrieve-list-of-custom-object/</guid><description>It took me while to understand how one require to retrieve generic object from ClientResponse. I had an array of objects in Json format as a response of an REST api, which I was trying to deserialize it into List&amp;lt;CustomObject&amp;gt; refer below sample.
ClientResponse rsp = webresource.path(id.toString()).type(MediaType.APPLICATION_JSON).get(ClientResponse.class); List&amp;lt;CustomObject&amp;gt; list = rsp.getEntity(new GenericType&amp;lt;List&amp;lt;CustomObject&amp;gt;&amp;gt;(CustomObject.class)); But I kept on getting following Error:
Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of test.CustomObject out of START_ARRAY token at [Source: sun.</description></item><item><title>Install nginx on OS-X</title><link>https://www.pandurangpatil.com/post/2014-02-18-install-nginx-on-os-x/</link><pubDate>Tue, 18 Feb 2014 23:40:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-18-install-nginx-on-os-x/</guid><description>One need to have gcc installed for that you need to install xcode along with command line tools. To install the same one can refer to this link for xcode 5.0.1.
Nginx requires PCRE – Perl Compatible Regular Expressions to build, I used PCRE version 8.33
Install PCRE
$ mkdir source $ cd source $ curl -OL ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz $ tar -zxvf pcre-8.33.tar.gz $ cd pcre-8.33/ $ ./configure $ make $ sudo make install Install nginx</description></item><item><title>Set default submit button on a page with GWT</title><link>https://www.pandurangpatil.com/post/2014-02-16-set-default-submit-button-on-a-page-with-gwt/</link><pubDate>Sun, 16 Feb 2014 00:32:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-16-set-default-submit-button-on-a-page-with-gwt/</guid><description>I found few ways to set default submit button on page with GWT.
Add key press handler for all form fields check for Enter button press and take action. You can add common key press handler for all form fields. This way you are not adding multiple handler for each form field. (I am assuming you understand what is ui handler and how it works.) @UiHandler({ &amp;#34;txtCompanyName&amp;#34;, &amp;#34;txtcontactName&amp;#34;, &amp;#34;txtEmail&amp;#34; }) public void onKeyPress(KeyPressEvent event) { if (event.</description></item><item><title>Set environment variable which is inherited inside eclipse workspace</title><link>https://www.pandurangpatil.com/post/2014-02-12-set-environment-variable-which-is-inherited-inside-eclipse-workspace/</link><pubDate>Wed, 12 Feb 2014 10:53:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-12-set-environment-variable-which-is-inherited-inside-eclipse-workspace/</guid><description>Ubuntu : Set required environment variable inside /etc/environment and restart the machine. This will set environment variable which can be inherited inside eclipse workspace. Above method will set the environment variable for all the users. To set environment variable for individual user set the required variable inside &amp;lt;user home&amp;gt;/.profile file. While doing so please make sure you use export keyword before variable. Alterante option to use .bashrc to set those environment variable, here as well you need to prefix export keyword.</description></item><item><title>Remove cookie.</title><link>https://www.pandurangpatil.com/post/2014-02-09-remove-cookie/</link><pubDate>Sun, 09 Feb 2014 02:02:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-02-09-remove-cookie/</guid><description>To remove cookie from server one need to set its expiry time to current time.
e.g. J2EE container one can remove the cookie in following way
HttpServletResponse response = (HttpServletResponse) servletResponse; Cookie cookie = new Cookie(&amp;quot;cookie-key&amp;quot;, &amp;quot;&amp;quot;); //.... set all the other attributes same as that of existing cookie, like path and domain. cookie.setMaxAge(0); response.addCookie(cookie); setting max age of cookie to 0 I am setting its expiry to current machine time.</description></item><item><title>Quick enable simple password protected Remote JMX with tomcat</title><link>https://www.pandurangpatil.com/post/2014-01-10-quick-enable-simple-password-protected-remote-jmx-with-tomcat/</link><pubDate>Fri, 10 Jan 2014 04:39:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2014-01-10-quick-enable-simple-password-protected-remote-jmx-with-tomcat/</guid><description>You need to do following configuration to enable Remote JMX monitoring on tomcat server.
Copy jmxremote.password.template located at JRE_HOME/lib/management inside the same folder with the name jmxremote.password. Edit this jmxremote.password file, uncomment last two lines starts with monitorRole and controleRole, instead of QED and R&amp;amp;D set some good password for both of them. Change directory to CATALINA_HOME/bin from where you start the tomcat. You will find setenv.sh (if you don&amp;rsquo;t find it create one) and add following line inside file CATALINA_OPTS=&amp;#34;$CATALINA_OPTS -Dcom.</description></item><item><title>apiary.io sample</title><link>https://www.pandurangpatil.com/post/2013-11-15-apiary-io-sample/</link><pubDate>Fri, 15 Nov 2013 05:06:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2013-11-15-apiary-io-sample/</guid><description>First of all I must mention apiary.io has done great job by providing some easy means to have REST api documentation, collaborate as well as expose it to public or keep it private. With the new release of the same I was struggling little bit to make use of the new version, for that I had to go through the detailed documentation (refer). But I felt this tutorial just demonstrates blueprint code, it doesn&amp;rsquo;t show the corresponding preview related to given blueprint code.</description></item><item><title>Convert mercurial (hg) to git repository for bitbucket</title><link>https://www.pandurangpatil.com/post/2013-10-29-convert-mercurial-hg-to-git-repository-for-bitbucket/</link><pubDate>Tue, 29 Oct 2013 01:53:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-10-29-convert-mercurial-hg-to-git-repository-for-bitbucket/</guid><description>To convert hg repository on bitbucket to git repository follow below steps.
Create new repository with Repository Type selected as Git follow below commands with the assumption that you already have hg repository cloned on your system. If not then you first need to clone existing hg repository. Steps to follow
$ git clone git://repo.or.cz/fast-export.git $ mkdir &amp;lt;new git repo&amp;gt; $ cd &amp;lt;new git repo&amp;gt; $ git init $ ../fast-export/hg-fast-export.sh -r &amp;lt;path to hg local repository&amp;gt; $ git checkout HEAD $ git remote add origin https://&amp;lt;username&amp;gt;@bitbucket.</description></item><item><title>Install and run memcached on OS-X</title><link>https://www.pandurangpatil.com/post/2013-10-27-install-and-run-memcached-on-os-x/</link><pubDate>Sun, 27 Oct 2013 10:42:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-10-27-install-and-run-memcached-on-os-x/</guid><description>One need to have gcc installed for that you need to install xcode along with command line tools. To install the same one can refer to this link for xcode 5.0.1. Libevent is required to be installed for memcached, if it is already installed on your machine you can skip this step.
Create temp directory and change directory to that location and execute following commands.
$ curl -O http://www.monkey.org/~provos/libevent-1.4.14-stable.tar.gz $ tar xzvf libevent-1.</description></item><item><title>Access file (JAVA)</title><link>https://www.pandurangpatil.com/post/2013-10-26-access-file-java/</link><pubDate>Sat, 26 Oct 2013 11:23:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-10-26-access-file-java/</guid><description>Access resource / file packaged inside a jar or a located on classpath. Two ways to access the file located inside jar or located on classpath.
Use getResourceAsStream(&amp;quot;filename&amp;quot;) on ClassLoader, one can retrieve the class loader instance from class instance of any class or Thread.currentThread().getClassLoader(). When you try to load the file using class loader, file will be always searched inside root folder on classpath. e.g. Thread.currentThread().getClassLoader().getResourceAsStream(&amp;quot;config.properties&amp;quot;) and Thread.currentThread().getClassLoader().getResourceAsStream(&amp;quot;/config.properties&amp;quot;) either way class loader will try to search file from root folder which is on class path or from root folder inside jar.</description></item><item><title>maven properties not being substituted inside resources</title><link>https://www.pandurangpatil.com/post/2013-10-18-maven-properties-not-being-substituted-inside-resources/</link><pubDate>Fri, 18 Oct 2013 10:09:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-10-18-maven-properties-not-being-substituted-inside-resources/</guid><description>You need to add following configuration which indicates those resources need to be processed and property values will be replaced. By default Maven resources plug-in will not do property value substitution (filtering), so it will need to be enabled within the &amp;lt;build&amp;gt; section of the pom.xml file. Filtering value true will enable the resources processing and substitute property values. In addition to that one can include/exclude the resources
&amp;lt;build&amp;gt; ..... .</description></item><item><title>Zeromq setup on MAC OSX 10.9.3 (mavericks) with Java binding</title><link>https://www.pandurangpatil.com/post/2013-09-26-zeromq-setup-on-mac-osx-10-9-3-mavericks-with-java-binding/</link><pubDate>Thu, 26 Sep 2013 08:39:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-09-26-zeromq-setup-on-mac-osx-10-9-3-mavericks-with-java-binding/</guid><description>Steps: With reference to following blogs written by Vivek blog to install zeromq and by Jean blog to install auto tools. I faced few issues ( one of them is following error ./configure: line 15284: 'PKG_CHECK_MODULES') which I tried to address with following steps:
Install gcc ( to install gcc you need to install xcode 5 download it from `https://developer.apple.com/xcode/ and install.)
Make sure you have java installed. If you want to install JDK 7 refer this http://docs.</description></item><item><title>Override JPA persistence unit properties in code with Google Guice</title><link>https://www.pandurangpatil.com/post/2013-08-06-override-jpa-persistence-unit-properties-in-code-with-google-guice/</link><pubDate>Tue, 06 Aug 2013 23:20:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-08-06-override-jpa-persistence-unit-properties-in-code-with-google-guice/</guid><description>To override properties from persistence.xml through code while using it with Google guice. One can read the properties from different source and add those properties while installing JpaPersistModule. Following is the sample
Properties persistenceUnit = new Properties(); persistenceUnit.put(&amp;quot;javax.persistence.jdbc.url&amp;quot;, &amp;quot;jdbc:mysql://192.168.9.102/MyDB&amp;quot;); persistenceUnit.put(&amp;quot;javax.persistence.jdbc.user&amp;quot;, &amp;quot;myuser&amp;quot;); persistenceUnit.put(&amp;quot;javax.persistence.jdbc.password&amp;quot;, &amp;quot;mypassword&amp;quot;); Injector injector = Guice.createInjector(new JpaPersistModule(&amp;quot;my-persistence-unit&amp;quot;).properties(persistenceUnit)); One can chose to read this configuration from some other file and install JpaPersistModule with those properties. This could be useful to override database url for test and production.</description></item><item><title>Generate complete package (ZIP) of Java (executable jar) application with required dependencies in it using Maven</title><link>https://www.pandurangpatil.com/post/2013-05-17-generate-complete-package-zip-of-java-executable-jar-application-with-required-dependencies-in-it-using-maven/</link><pubDate>Fri, 17 May 2013 07:45:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-05-17-generate-complete-package-zip-of-java-executable-jar-application-with-required-dependencies-in-it-using-maven/</guid><description>To generate a zip file, packaging all required dependent libraries and newly generated jar, using maven-assembly-plugin (for more detail on plugin refer).
I will demonstrate generation of package using assembly descriptor file.
Create a assembly descriptor file which is a xml file (for more details refer and format) as following. Create this file inside your project directory. One can keep this descriptor file any where inside given project directory. I have tried it by keeping this file at location &amp;lt;Project dir&amp;gt;/src/main/assembly/test-app-assembly.</description></item><item><title>OpenID and OAuth</title><link>https://www.pandurangpatil.com/post/2013-05-17-openid-and-oauth/</link><pubDate>Fri, 17 May 2013 05:29:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2013-05-17-openid-and-oauth/</guid><description>First of all OpenID and OAuth are two different standards don&amp;rsquo;t mix them together.
OpenID is only limited to authenticate the end user i.e. getting user authenticated from the third party provider like Google, Yahoo etc.
Following are the benefits
End user don&amp;rsquo;t have to remember another credentials for your site. They will be able to authenticate themself with their existing registered account with any of the third party service provider.</description></item><item><title>Intercept GWT Request Factory on client side</title><link>https://www.pandurangpatil.com/post/2013-02-02-intercept-gwt-request-factory-on-client-side/</link><pubDate>Sat, 02 Feb 2013 22:36:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2013-02-02-intercept-gwt-request-factory-on-client-side/</guid><description>How to intercept GWT Request Factory on client before call is being made and after response is received?
One can extend DefaultRequestTransport and intercept send call, at the same time writing a wrapper over TrasnportReceiver one can intercept response&amp;rsquo;s. Following is the example.
public class LoaderRequestTransport extends DefaultRequestTransport { private Loader loader; public LoaderRequestTransport(Loader loader) { this.loader = loader; } public LoaderRequestTransport() { this(new Loader(LoaderResources.INSTANCE.communicating())); } @Override public void send(final String payload, final TransportReceiver receiver) { final TransportReceiver proxy = new TransportReceiver() { @Override public void onTransportFailure(final ServerFailure failure) { loader.</description></item><item><title>Intercept GWT RPC Request and Response</title><link>https://www.pandurangpatil.com/post/2013-01-20-intercept-gwt-rpc-request-and-response/</link><pubDate>Sun, 20 Jan 2013 11:01:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2013-01-20-intercept-gwt-rpc-request-and-response/</guid><description>Some times you want to do some generic things like setting some header or adding some log or may be even showing a progress bar while rpc call is in progress and hide it once you receive the response. I came across one of such requirement for showing progress bar while service call is in progress. Following is complete end to end solution I found after searching for some solutions. I got some help at following threads and another one</description></item><item><title>Set Servlet RequestScope Guice dependencies</title><link>https://www.pandurangpatil.com/post/2013-01-02-set-servlet-requestscope-guice-dependencies/</link><pubDate>Wed, 02 Jan 2013 07:13:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2013-01-02-set-servlet-requestscope-guice-dependencies/</guid><description>Set some commonly used dependencies which are dependent on some parameter of HTTP Request.
The most common use case is to add logged in user context in request scope from session id inside filter. To do that you need to bind such a dependency inside your ServletModule like following.
bind(User.class).annotatedWith(Names.named(&amp;quot;user&amp;quot;)).to(User.class).in(ServletScopes.REQUEST); You are just binding a given User.class with @Named(&amp;quot;user&amp;quot;) annotation inside RequestScope. Now you have to take care of setting required value when request is made.</description></item><item><title>Access annotated dependencies through injector instance</title><link>https://www.pandurangpatil.com/post/2012-11-25-access-annotated-dependencies-through-injector-instance/</link><pubDate>Sun, 25 Nov 2012 00:56:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2012-11-25-access-annotated-dependencies-through-injector-instance/</guid><description>Following sample will demonstrate how to access guice dependency annotated with some annotation through direct Guice injector instance.
Bar.java
import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import com.google.inject.BindingAnnotation; @Retention(RetentionPolicy.RUNTIME) @BindingAnnotation public @interface Bar { } Foo.java
import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import com.google.inject.BindingAnnotation; @Retention(RetentionPolicy.RUNTIME) @BindingAnnotation public @interface Foo { } TestDepdency.java
public interface TestDepdency { String getValue(); } FooTestDependencyImpl.java
public class FooTestDependencyImpl implements TestDepdency { @Override public String getValue() { return &amp;quot;Foo&amp;quot;; } } BarTestDependencyImpl.</description></item><item><title>Singleton Factory</title><link>https://www.pandurangpatil.com/post/2012-11-25-singleton-factory/</link><pubDate>Sun, 25 Nov 2012 00:16:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2012-11-25-singleton-factory/</guid><description>Singleton factory for single threaded environment:
It is simple to create Singleton factory for single threaded application.
public class SingleThreadSingleton { private static SingleThreadSingleton instance; private SingleThreadSingleton() { // Initialise } public static SingleThreadSingleton getInstance() { if (instance == null) { instance = new SingleThreadSingleton(); } return instance; } } Singleton factory for multi threaded application:
When you want to create Singleton factory for multi threaded application. In which you want single instance to be maintained across all thread.</description></item><item><title>Free or less costly tools and services helpful for Software Startup</title><link>https://www.pandurangpatil.com/post/2012-11-21-free-or-less-costly-tools-and-services-helpful-for-software-startup/</link><pubDate>Wed, 21 Nov 2012 08:54:00 -0800</pubDate><guid>https://www.pandurangpatil.com/post/2012-11-21-free-or-less-costly-tools-and-services-helpful-for-software-startup/</guid><description>When you are looking to start on your own Software Start-up you need to look for what all free services, tools that can be help full to start with as saving on Money is very important for a startup.
Most important for any start-up is to have email for their custom domain. And I suppose most of the people know which is the best and free option to start with Google Apps for 10 users</description></item><item><title>Mulitple persistence Unit with Guice</title><link>https://www.pandurangpatil.com/post/2012-10-18-mulitple-persistence-unit-with-guice/</link><pubDate>Thu, 18 Oct 2012 05:57:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2012-10-18-mulitple-persistence-unit-with-guice/</guid><description>If you want to use Guice with multiple persistence Unit. Then its not much difficult task to do it, Guice's official wiki document says it all refer. But I feel it has missed out most important part from it i.e. to expose dependencies, if those dependencies need to be used outside the scope of give PrivateModule.
Note : I have created a complete working sample with multiple persistent unit refer - https://github.</description></item><item><title>Benefits of using GWT</title><link>https://www.pandurangpatil.com/post/2012-09-25-benefits-of-using-gwt/</link><pubDate>Tue, 25 Sep 2012 07:44:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2012-09-25-benefits-of-using-gwt/</guid><description>I have been exploring GWT for 4 years now. I have seen it enhancing and improving year over year. I have also used it in few of my projects. After using it for long I see following benefits of using GWT. I have added these point based on my experience after using GWT. So I might be wrong on some points please feel free to add your comments about the same.</description></item><item><title>GWT Cell Widget sample using UiRenderer with GWT 2.5-RC1</title><link>https://www.pandurangpatil.com/post/2012-07-23-gwt-cell-widget-sample-using-uirenderer-with-gwt-2-5-rc1/</link><pubDate>Mon, 23 Jul 2012 20:43:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2012-07-23-gwt-cell-widget-sample-using-uirenderer-with-gwt-2-5-rc1/</guid><description>GWT Cell Widget sample using UiRenderer.
I tried this sample with GWT 2.5 RC1 release. For official documentation refer. Below sample is simple sample which will display contents of Person entity using custom cell. And such list of entities can be displayed with cell list.
Person.java
public class Person { private String fname; private String lname; private String emailid; private int age; /** * @return the fname */ public String getFname() { return fname; } /** * @param fname * the fname to set */ public void setFname(String fname) { this.</description></item><item><title>Advantage of using Maven over ant.</title><link>https://www.pandurangpatil.com/post/2012-06-28-advantage-of-using-maven-over-ant/</link><pubDate>Thu, 28 Jun 2012 09:07:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2012-06-28-advantage-of-using-maven-over-ant/</guid><description>What is Maven?
It is a tool that can be used for build process and managing Java project. The way ant is used for build process of Java projects. But it does it very smartly and you can set-up your Java project very fast.
Advantage of using Maven over Ant.
With ant you have to do everything on your own, you have to write lot of code/configuration in build.xml. Where as maven is simple, easy and with minimal code you can start.</description></item><item><title>Start with maven</title><link>https://www.pandurangpatil.com/post/2012-06-28-start-with-maven/</link><pubDate>Thu, 28 Jun 2012 09:06:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2012-06-28-start-with-maven/</guid><description>Start with Maven
To start with Maven lets create a sample application which will result into artifact packaged into .jar. Maven being build system for Java application, you need to have following software&amp;rsquo;s installed on your machine and set few environment variables.
JDK may be latest version at least jdk 1.6. Maven installation download latest version. Set Maven&amp;rsquo;s bin directory into path variable so that it is accessible from anywhere. Set JAVA_HOME environment variable pointing to required JDK installation It is very easy to create simple jar project with the help of Maven archetype (in short it is a Java project templating tool, which has different templates to create different kinds of projects.</description></item><item><title>GWT use I18 Message resource in uiBinder</title><link>https://www.pandurangpatil.com/post/2012-05-20-gwt-use-i18-message-resource-in-uibinder/</link><pubDate>Sun, 20 May 2012 12:20:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2012-05-20-gwt-use-i18-message-resource-in-uibinder/</guid><description>To use I18 Message resource in uiBinder you need to follow the same mechanism as that of ClientBundle
In your corresponding java class add @uiFactory method which will return the object of required Message interface
e.g.
package com.test.module.client; public interface Messages extends com.google.gwt.i18n.client.Messages { @DefaultMessage(&amp;quot;Home&amp;quot;) @Key(&amp;quot;home&amp;quot;) @DefaultMessage(&amp;quot;Home&amp;quot;) String home(); } public class MyUiBinder extends Composite{ ..... ..... @UiFactory public static Messages getResources() { return GWT.create(Messages.class); } }	And you can use the same inside corresponding MyUiBinder.</description></item><item><title>Get New line after using float:left or right</title><link>https://www.pandurangpatil.com/post/2012-05-20-get-new-line-after-using-float-left-or-right/</link><pubDate>Sun, 20 May 2012 11:27:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2012-05-20-get-new-line-after-using-float-left-or-right/</guid><description>To get new line after using float property on previous element. I found straight forward solution to use either clear: both; on next element.
e.g.
1: &amp;lt;div style=“float: left;&amp;quot;&amp;gt; 2: .... 3: &amp;lt;/div&amp;gt; 1: &amp;lt;div style=“clear: both;&amp;quot;&amp;gt; 2: .... 3: &amp;lt;/div&amp;gt; for more details refer</description></item><item><title>Create Maven GWT project and setup eclipse project</title><link>https://www.pandurangpatil.com/post/2011-08-23-create-maven-gwt-project-and-setup-eclipse-project/</link><pubDate>Tue, 23 Aug 2011 08:53:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2011-08-23-create-maven-gwt-project-and-setup-eclipse-project/</guid><description>Using Maven archetype you can very easily create the gwt project in Maven. Follow below steps to create the same.
Assumption: You have latest version of maven installed (Tried the below steps with 3.0.3 version)
mvn archetype:generate It will ask for archetype to use specify 258 (gwt-maven-plugin). Then it will ask for other details like any other archetype asks for, enter the required details. And it will create the given GWT project with the details you have entered with a sample application.</description></item><item><title>Setup eclipse project from a Maven project</title><link>https://www.pandurangpatil.com/post/2011-08-11-setup-eclipse-project-from-a-maven-project/</link><pubDate>Thu, 11 Aug 2011 07:46:00 -0700</pubDate><guid>https://www.pandurangpatil.com/post/2011-08-11-setup-eclipse-project-from-a-maven-project/</guid><description>Note: Below steps will work for 2.x and later version&amp;rsquo;s of Maven project.
Assumption: You know eclipse.
Eclipse version details: I would recommend to use latest version of Eclipse (Helios was the latest version while writing this blog and steps are tried with the same).
If you know how to install eclipse plugin then you can skip install steps and install following two plugins http://m2eclipse.sonatype.org/sites/m2e http://m2eclipse.sonatype.org/sites/m2e-extras Install maven eclipse plug-in for more details refer.</description></item><item><title>About me</title><link>https://www.pandurangpatil.com/page/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.pandurangpatil.com/page/about/</guid><description>● Privacy ● AdTech ● FinTech ● E-Commerce Engineering leader with 22+ years of experience building systems from scratch across AdTech, FinTech, E-commerce, and Privacy domains. Set up multiple engineering organizations from the ground up, including hiring, defining architecture, establishing development processes, and driving execution from zero to production scale.
● Enterprise Architecture ● Technology Direction ● Execution &amp;amp; Delivery As a distinguished engineering leader, I bring a unique combination of technology, product management, people management, and entrepreneurial acumen.</description></item></channel></rss>