I m facing exactly the same problem with Oracle database too.
EntityManager.find() method is not able to find the entity in the database. 

In the session bean before firing a message to a queue, I m persisting some 
data using EntityManager.persist() . and MDB on receiving the message, tries to 
fetch the data from the DB. 

Initially I doubted that, may be the entityManager.persist is not commiting the 
data into the DB. But then I put the code which persist the data in session 
bean in a new  transaction, this transaction is done even before the session 
bean fires the message into the queue thus making sure that data is commited 
into the database. (Even checked manually that data is available in DB). But 
still EntityManager.find() is not able to find the data in the DB.


This is how I m persisting the data

@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
private void updateTradeFormGenerationStatus(String tradeFormRequestID, String 
formID, String locale) {

 FormattedDocument fd = new FormattedDocument(tradeFormRequestID);
        fd.setAForm(formID);
        fd.setAFormLanguage(localeConvertor.getLanguage(locale));
        fd.setADocumentStatus(Constants.TRADEFORM_STATUS_PEN);        
        
        em.persist(fd);
        em.flush();        
    }


Looks like this is a bug in the database connectivity implementation of JBoss 
404GA.



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973431
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to