I am trying to do some post processing after a record is entered into a database and am finding the flush is not causing the record to be written. This is my code: | @Override | public String persist() { | String retval = super.persist(); | EntityManager em = (EntityManager)Component.getInstance("entityManager", true); | em.flush(); | moveTempRecord(); | return "success"; | } | | public void moveTempRecord() { | log.info("Calling UpdateDB_NID_SUB.loadSubTargetStrength"); | UpdateDB_NID_SUB ACINTDatabase_loader = null; | ACINTDatabase_loader.loadSubTargetStrength(); | }
In stepping through the code, the problem is that the records are not there for the moveTempRecord method to work. I thought the flush would take care of that. If there is another way to do this, please let me know. Thank you, Kim View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084729#4084729 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084729 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user