Modifying the CustomerDBSpring sample REST application to run on Glassfish V3



Netbeans 6.5 comes with sample applications (CustomerDB and CustomerDBSpring)  that demonstrate how to use the Jersey REST APIs. By default these deploy on Glassfish V2.


If you want to try this on Glassfish V3, you will need to change your persistence.xml to use EclipseLink instead of Toplink. (EclipseLink is the new JPA provider in V3 ).  This should do the trick:



<persistence-unit name="CustomerDBSpringPU" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/sample</jta-data-source>
    <class>customerdb.Customer</class>
    <class>customerdb.DiscountCode</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="eclipselink.target-database" value="Derby"/>
      <property name="eclipselink.logging.level" value="FINE"/>
    </properties>
 </persistence-unit>


Comments:

Post a Comment:
Comments are closed for this entry.
About

Things that amuse me

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News

No bookmarks in folder

Blogroll