1 Reply Latest reply on Dec 22, 2006 4:15 AM by None None

    Queries work, persist does not work, in a Servlet

    None None Master

      Strange strange problem:

      I have a Servlet. Within this Servlet I get a hold of a EntityManager like this:

      Inside of init:

      entityManagerFactory = Persistence.createEntityManagerFactory(persistenceContextName);


      And then in the doPost() method, I get an actual EntityManager using the obvious entityManagerFactory method.

      Strange thing, every time I try to persist an object using this EntityManager, nothing happens. No error, nothing, but nothing is persisted. But I can do queries with it and get the expected results!

      Is there any explanation for this? This is all in JBoss 4.0.5.

      Thanks