Apache tomcat easy deployment script

Following is the script that can be used to deploy application to Apache tomcat running on a Linux machine. Also this script can be called from a Jenkins to automate the deployment process. The script file can be downloaded from HotDeployScript #/bin/bash#/bin/bash # . ~/.profile export APP_ID=$1export URL1="http://localhost:8257/myWebApp/mvc/" export CHECK_URLS="$URL1" export CATALINA_HOME=/opt/myWebApp/tomcat7/ export CATALINA_BASE=$CATALINA_HOME echo CATALINA_HOME:
Read More »

TIBCO Java Event Source

TIBCO Java event source activity gives you the flexibility to write custom process starters. In following post we will create a simple project where we use the event source plugin. The java source code and the tibco project can be found here. Sample github project code Do a maven clean install on the java project
Read More »

Hotswap for Java using DCEVM+Hotswap Agent

Here is an opensource setup that does the job as JRebel which offcourse is not free. Download HotswapAgent latest release from this url https://github.com/HotswapProjects/HotswapAgent/releases Download DCEVM jar from the following url https://github.com/dcevm/dcevm/releases Install DCEVM as an administrator java -jar DCEVM-light-8u112-installer.jar Create a new run configuration in intelliJ with following VM option -XXaltjvm=dcevm -javaagent:C:\Dev\sw\HotswapAgent-0.3\hotswap-agent.jar -Xms1G -Xmx5G
Read More »

TDD with java a good overview book

Was contacted recently by PACKT publishing to act as technical reviewer for Test driven java development book by Viktor Farcic and Alex Garcia. I accepted the challenge and reviewed around 10 chapters. It a nice overview book which touch almost all the concerns in test driven application development without diving deep into details and you
Read More »

XML Schema generation from Java 8 code and Gradle integration

Using Java 8 and Gradle I had to generate XSD schema. Most of the Gradle plugins out there are not compatible with Java 8 yet. So I tweaked my way and following is how I did it. I had following model class supporting both JAXB and JSON. @XmlType(namespace = "http://com.invalid/1.0/request/schema") @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name = "Person") @JsonRootName(value
Read More »

Create maven archetype project

A simple maven archetypes with most common set of libraries, configured property files and some boiler plate code that you often copy past in every project can be of great help. I had similar requirements and here I am sharing my experience of creating a maven archetype project. The source code is available here Java-maven-archetype-github
Read More »

Dynamic SOAP web service endpoint address

Every one prefers REST API’s now a days but hard luck lots of back end systems are SOAP XML based. There are some nice benefits e.g a contract (WSDL xsd) and of course web service client code generation that can easily be integrated into the client application. However you can have several environments continuous integration,
Read More »