RE: Pb. while searching entitybeans via the entitymanager.

<[email protected]> Wed, 20 Jul 2011 17:32:51 +0200
Newsgroups gmane.comp.java.objectweb.jonas
Message-ID <FE8F6A65A433A744964C65B6EDFDC240025AC95C@ftrdmel0.rd.francetelecom.fr>
Hi Antonin,
I'm not sure but it like look a persist() VS merge() problem, when you add the new entity in your PersitenceContext before flushing it ! or a thing like this.
 
-- Aziz
 

________________________________

De : [email protected] [mailto:[email protected]] 
Envoyé : mercredi 20 juillet 2011 15:54
À : [email protected]
Cc : CHAZALET Antonin NRS
Objet : [jonas] Pb. while searching entitybeans via the entitymanager.



Dear,

 

 

I have problem with my EJB3 application.

 

I have a remote client that calls a statelessbean in order to createAComposite.

The createAComposite method itself calls, several times, a second statelessbean in order to create the composite's components. (This second statelessbean atcs as a component manager.)

Each component creation is persisted, and flushed in DB (the corresponding lines appear in DB).

 

Once the components' creation is done, createAComposite searches in DB for the just created components, and find nothing.

(I need to retrieve the just created components in order to define several associations within components, and with others entity objects.)

 

I don't understand my mistake, can you help me ?

 

I use JOnAS 5.2-RC1.

 

 

Thanks,

Regards,

 

Antonin.

********************************************************************************
IMPORTANT.Les informations contenues dans ce message electronique y compris les fichiers attaches sont strictement confidentielles
et peuvent etre protegees par la loi.
Ce message electronique est destine exclusivement au(x) destinataire(s) mentionne(s) ci-dessus.
Si vous avez recu ce message par erreur ou s il ne vous est pas destine, veuillez immediatement le signaler  a l expediteur et effacer ce message 
et tous les fichiers eventuellement attaches.
Toute lecture, exploitation ou transmission des informations contenues dans ce message est interdite.
Tout message electronique est susceptible d alteration.
A ce titre, le Groupe France Telecom decline toute responsabilite notamment s il a ete altere, deforme ou falsifie.
De meme, il appartient au destinataire de s assurer de l absence de tout virus.

IMPORTANT.This e-mail message and any attachments are strictly confidential and may be protected by law. This message is
intended only for the named recipient(s) above.
If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message.
Any unauthorized view, usage or disclosure ofthis message is prohibited.
Since e-mail messages may not be reliable, France Telecom Group shall not be liable for any message if modified, changed or falsified.
Additionally the recipient should ensure they are actually virus free.
********************************************************************************