Comment #5 on issue 597 by [email protected]: Persist Extension:
UnitOfWork.begin() throws IllegalStateException when called multiple times
http://code.google.com/p/google-guice/issues/detail?id=597
I have the same issue by using Guice and GWT requestfactory which assume to
use static entity manager on entity:
@MappedSuperclass
public class BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Inject
protected static Provider<EntityManager> emProvider;
....
public static final EntityManager entityManager() {
return emProvider.get();
}
/*
* (non-Javadoc)
*
* @see com.google.inject.AbstractModule#configure()
*/
@Override
protected void configure() {
install(new JpaPersistModule("xxxx"));
requestStaticInjection(BaseEntity.class);
}
Which is is the best practice using Guice-Persist extension and GWT
requestfactory?
Thank You in advance.
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.