How do you use EclipseLink 2.3 as persistence provider in NB 7?

社会主义新天地 提交于 2019-12-20 06:03:35

问题


I downloaded the latest EclipseLink 2.3 and want to give it a try. But I cannot find a way to choose EclipseLink 2.3 as a persistence provider in NB7.

Here's what I did. 1. Go to my project's persistence.xml. In Design view-> Persistence Provider drop down menu -> New Persistence Library 2. I added the EclipseLink 2.3 jar files and gave it a name. 3. Hit OK.

Nothing happened. It still shows "EclipseLink (JPA 2.)(Default) as my Persistence Provider. And I cannot find the newly created library in the drop down menu. (But if I go Project Properties->Libaries->Add Library I can see it got created).

So how do i use EclipseLink 2.3 as a persistence provider in NB7?


回答1:


As long as your Libraries list contains your EclipseLink 2.3 jar and that the persistence.xml file contains the following line: org.eclipse.persistence.jpa.PersistenceProvider

You will be using version 2.3 of EclipseLink. As for the display in netbeans, I'm not sure why it wouldn't update but I wouldn't worry about it.

FYI, I've been using EclipseLink 2.3.0 in Netbeans via the method I've described above and it works fine.



来源:https://stackoverflow.com/questions/7017359/how-do-you-use-eclipselink-2-3-as-persistence-provider-in-nb-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!