[jboss-user] [EJB 3.0] - Problem with EJB3 MDB, & Entity Objects

smeverts do-not-reply at jboss.com
Fri Jul 18 07:38:41 EDT 2008


I am having a problem with a project that I am currently working on.  I have a process that imports a datafile which goes like: 
1. a SAR detects the file is present
2. the SAR will then send a JMS message to the MDB
3. the MDB receives the message and then parses / imports the data creating Entity objects etc.
4. when the MDB has imported all of the records it then sends a list of IDs to the next MDB which would need to process it and so on.

Here's the problem.  I import all of the records in basically the OnMessage function of the MDB using a couple of helper classes.  When I go to send the message to the next MDB,  the "NEXT" MDB receives the message looks up the entity by the ID provided in the message and it's not in the database even though we persisted it in the "FIRST" MDB...  Even if in the "FIRST" MDB I call entityManager.Flush () and then EntityManager.Clear() it still has the same problem

Am I not using EJB correctly, should the MDB be using some other EJB object to process / import the records?

Any thoughts?

Thanks in advance,

Scott


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

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



More information about the jboss-user mailing list