[jboss-user] [EJB 3.0] - Queries work, persist does not work, in a Servlet

SmokingAPipe do-not-reply at jboss.com
Fri Dec 22 04:05:30 EST 2006


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


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995816#3995816

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995816



More information about the jboss-user mailing list