开发者

persistence.xml cache property warning

I'm using eclipse indigo for EE developement to develop an SE project, just to take benefit from the JPA project support.

I created a JPA project, here's the properties of my persistence.xml file:

    <properties>
        <property name="eclipselink.persistence-context.reference-mode" value="WEAK" />
        <property name="eclipselink.cache.shared.default" value="false"/>
        <property name="eclipselink.cache.size.default" value="5000"/>
        <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
        <property name="javax.persistence.jdbc.url"
            value="jdbc:derby:DB;create=true;" />

        <property name="eclipselink.ddl-generation" value="create-tables" />
        <property name="eclipselink.ddl-generation.output-mode" value="both" />
    </properties>

a warning appears :

"eclipselink.cache.shared.default" is a legacy entity caching property. Consider migration to JPA 2.0 and EclipseLink cache settings via annotation or 开发者_高级运维XMLmapping file

I'm using the last release of eclipseLink (2.3.0), and here's a link to EL documentation, where there's an example for setting the property onto the persistence.xml file.

Does anybody knows the reason of the warning?

Note that i used the same property in a normal java project, and there were no warnings, it appeared only when used the JPA project.


It just wants to inform about use of EclipseLink Entity caching. Instead it suggests that you could use cache which is part of JPA 2.0. Usage is described among other sources here: http://en.wikibooks.org/wiki/Java_Persistence/Caching

And why it does so, is probably best explained in the request to add such a message: https://bugs.eclipse.org/bugs/show_bug.cgi?id=294077

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜