在 SpringSource 應用程式平台上使用 EclipseLink
本週 EclipseLink 團隊宣布發布 EclipseLink 1.0。我已經在 S2AP 上使用 EclipseLink 一段時間了;事實上,我在開發我們的 JPA 載入時編織支援時使用了 EclipseLink。
我們尚未將我們的內部使用升級到 1.0 - 我們的 beta9 版本在公告之前就被標記了 - 但我想演示這種配對在 OSGi 環境中是如何有效地工作。
Petclinic 中的 EclipseLink
在 S2AP Petclinic 範例的 1.2.0 版本中,我們發布了 Clinic 後端的 EclipseLink 實作。該後端是 JDBC 後端的直接替換,先前 JDBC 後端是唯一的選擇。
建置 Petclinic EclipseLink
要建置 EclipseLink 版本的 Petclinic,只需在 Petclinic 根目錄中開啟一個終端機視窗並執行
cd org.springframework.petclinic.eclipselink
ant collect-provided jar
<p>
This will create the Petclinic EclipseLink PAR file in <span style="font-family:courier">org.springframework.petclinic.eclipselink/target/artifacts/org.springframework.petclinic.eclipselink.par</span> and will put all the required bundles in <span style="font-family:courier">org.springframework.petclinic.eclipselink/target/par-provided/bundles/</span>.
</p>
<h2 id="running-petclinic-eclipselink">
Running Petclinic EclipseLink
</h2>
<p>
To run the Petclinic EclipseLink application, copy all the provided…