Java Reference
In-Depth Information
private Date placedOn;
private Boolean creditValidated;
// Accessors go here
...
}
OrderItem
package com.apress.springbatch.chapter11.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;
@Entity
@Table(name="orderItems")
public class OrderItem implements Serializable{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@Version
private long version;
private String itemNumber;
private int qty;
private BigDecimal price;
private Boolean inventoryValidated;
@ManyToOne
private Order order;
// Accessors go here
...
}
The annotations are the final piece of the baseline configuration of your JMS and database
resources. Now you can configure step 2 of the job to read orders from the JMS queue and save them in
your database. Listing 11-13 shows the configuration for step 2 of the parallel job.
Search WWH ::




Custom Search