tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Lazy loading from remote context
Date Fri, 07 Oct 2016 16:30:31 GMT
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-10-07 17:34 GMT+02:00 ict <ict.management.trexon@gmail.com>:

> Maybe I'm wrong, but I have already tried so unsuccessfully...
>
> Method in PersonEntityManager:
> @TransactionAttribute(TransactionAttributeType.MANDATORY)
> @Override public Person getPerson(int id){return
> personPu.find(Person.class,
> id);}
>
>
> Method in remote SessionBean:
> @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
>  pubic void aMethod(){
>      Person person = PersonEntityManagerRemote.getPerson(12);//THIS WORK
> FINE
>

exiting this method you change of transaction (cause of the remote thing


>      List<EmbeddCustomClass> surnames = person.getSurnames();//THIS NOT
> LAZY
> LOAD
>   }
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Lazy-loading-from-remote-context-tp4680313p4680315.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message