02 Google App Engine for Java

Eclipse setup for Google App Engine and import of guestbook project. . . . → Read More: 02 Google App Engine for Java

01 Google App Engine For Java

Guestbook Example Application . . . → Read More: 01 Google App Engine For Java

Amazon AWS Simple Email Service with Java

How to send an email with Amazon Web Services, using the Java SDK … . . . → Read More: Amazon AWS Simple Email Service with Java

Spring schemaLocation fails when there is no internet connection

A Spring application, built with Maven Shade plugin, was working normally, except when the internet connection was missing. . . . → Read More: Spring schemaLocation fails when there is no internet connection

Hibernate course completed

I’ve completed yesterday the course Object-Relational Mapping with Hibernate: Hands on. Although I’ve already used Hibernate before, it was very valuable to refresh and expand my knowledge on the topic. I was quite doubtful whether to enrol or not, but I am now glad that I did!

. . . → Read More: Hibernate course completed

Spring JDBC Template

Spring JDBC template is helpful to reduce boilerplate code, to use it, I first define a bean that use a data source, called dataSource, defined as in the previous post. . . . → Read More: Spring JDBC Template

Defining a JNDI DB connection with Tomcat

1. Install Your JDBC Driver

Copy the driver’s JAR file(s) into the $CATALINA_HOME/lib directory, which makes the driver available both to the resource factory and to your application.

2. Bootstrap the project

If you don’t have a project to play with already, you can bootstrap a project with Spring Roo. I’ve used version 1.2.1. I . . . → Read More: Defining a JNDI DB connection with Tomcat

Remove a dependency from pom.xml

I wrote another simple Groovy script to remove one or more dependencies from a pom.xml – Here is how to use it:

$ pomRm rdbms org.datanucleus:datanucleus-rdbms:3.0.4 $ pomRm rdbms rm org.datanucleus:datanucleus-rdbms:3.0.4 REMOVED

The first form just lists the matching artifacts, without changing the pom.xml, while adding ‘rm’ in the command line as second parameter, actually . . . → Read More: Remove a dependency from pom.xml

Check and Modify Artifacts versions in a pom.xml

Taking advantage of the easy XML processing, built in regular expressions I wrote a short script in Groovy to check and modify artifacts version in a pom.xml (Maven).

For example to show all dependencies with the word datanucleus in it, and display them in compact form (groupId:artifactId:version)

$ pomVersions datanucleus com.google.appengine.orm:datanucleus-appengine:2.0.0-RC2 org.datanucleus:datanucleus-core:3.0.4 org.datanucleus:datanucleus-api-jpa:3.0.4 org.datanucleus:datanucleus-rdbms:3.0.4

I . . . → Read More: Check and Modify Artifacts versions in a pom.xml

Mavenizing Spring Security Tutorial

I couldn’t compile Spring Security Sample Tutorial Application, so I decided to change the build system from Gradle to Maven to see it in action.

Spring Roo 1.2.0 has just been released, so I used it to create the project structure fastly. Here are the commands typed in the shell:

mkdir security-tutorial cd security-tutorial roo . . . → Read More: Mavenizing Spring Security Tutorial