最近,當我使用EclipsLink 2.0時,遇到了執行持久對象時的性能瓶頸問題。EclipsLink 2.0的性能瓶頸
爲了我曾經有下面的實現更具體的:
@Entity
@Table(name = "CUSTOMERS")
public class CustomerEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private volatile Long id;
@Column(nullable = false, unique = true)
private String name;
private static final long serialVersionUID = 6952530957072210017L;
private String custGroup;
private String address;
private String nameOfFirstPerson;
private String contactPerson;
private String phone;
private String fax;
private String email;
private String comments;
private String defaultCustomer;
private volatile boolean delayedPaymentAllowed;
private volatile long periodOfDelayedPaymentAllowed;
private volatile boolean restrictionsOnDelayedPayment;
private volatile double maxAmoutPemittedSom;
private volatile double maxAmoutPemittedYE;
private transient String salesPointName;
@Column(length=25483)
private HashMap<String, PriceItem> totalBalance;
@Column(length=25483)
private HashMap<String, PriceItem> totalBalanceUsd;
private transient boolean valueChanged = false;
@OneToMany(mappedBy = "supplier")
private Collection<PurchaseInvoiceEntity> purchaseInvoices;
@OneToMany(mappedBy = "receiver")
private Collection<SalesInvoiceEntity> salesInvoices;
@OneToMany(mappedBy = "payer")
private Collection<PayInSlipEntity> payInSlips;
@OneToMany(mappedBy = "recipient")
private Collection<PaymentOrderEntity> paymentOrders;
@OneToMany(mappedBy = "recipient")
private Collection<WriteOffEntity> writeOffs;
@ManyToOne()
private ResponsiblePersonForDebtEntity responsiblePersonForDebt;
@ManyToOne
private CustomerGroupEntity customerGroup;
public CustomerEntity() {
valueChanged = false;
}
...
}
和同時每個我被增加新文檔的實例爲適當的收集,同時插入的文檔的新實例爲I檢測出的表的時間插入文檔需要很長的時間。我在使用netbeans ide 6.9的profiler模塊時遇到了這個問題。其實我正在使用這些藏品來檢查相關文件的空白。