English 中文(简体)
JPA/Glassfish:持久性,xml被忽视?
原标题:JPA/Glassfish: persistence.xml ignored?

I currently have kind of a problem.

我有一个小型项目,界定了大地,并实施了这个项目,此外,该项目还包含一些解放模式。

英国的实施就是这样:

 public class TestBean implements TBean {

    @PersistenceContext
    protected EntityManager em;

    public TestBean() {
    }

    public void createEntries(User user) {
           em.persist(user);
       }
 }

我认为,这应当奏效。

我现在的问题是,我在坚持不懈方面做了一些改变,但似乎忽视了所有这些变化。 我甚至删除了持续存在的整个内容,并修改了案文,以完全不作任何改动。 我现在的问题是,如果玻璃鱼 ca住持久性,我会怎样避免这种ach,如果现在——我会做什么错呢?

非常感谢:

问题回答

检查重新部署的手法: 在档案方案中开放实际的杰尔档案,并核实档案载于 META-INF/(如果你重新部署EJB模块)或。 WEB-INF/classes/META-INF/(在战争情况下)。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签