Mobile Application Development contest

Reliance Communications has announced Rural Mobile Application Development Contest. I got a mailer from them with lot of images and only images. It is not even hyperlinked and the site name is in a small font at the bottom. It doesn’t look professional coming from a big company like Reliance.
Anyways, after some searching, here is [...]

Read More      No Comments »

Spring+JPA with Hibernate

This is a sample of using Spring 2.5 with JPA provided by Hibernate 3.2.
This is the model class Trip.java

package sample.model;import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.Column;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;import java.util.Date;

@Entity
@Table(name = “trips”)
@NamedQueries({
@NamedQuery(name=”Trip.allTrips”, query=”from Trip”)
})
public class Trip  {

@Id
@GeneratedValue
private Long id;

@Column(length = 30)
private String tripName;
@Column(length = 3)
private int duration;
@Column(length = 20)
private Date startDate;
@Column(length = 500)
private String description;

public Long getId() [...]

Read More      No Comments »

Job Scheduler using commonj Timer in weblogic

A Job Scheduler using commonj api on weblogic server. The commonj is supported by websphere also.
Refer Anthony Jen’s Blog for detailed tutorial including configuring the scheduler using JMX & Spring annotations.
The following entry should be in web.xml. This will create a Timer called BatchTimer.

<resource-ref>
<res-ref-name>timer/BatchTimer</res-ref-name>
<res-type>commonj.timers.TimerManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
The batch timer with JNDI name is injected into the Spring bean, [...]

Read More      No Comments »