JPAContainer with remote EJB

Hi,

I am evaluating Vaadin, and I’m having a lot of problems hooking it up to the rest of our JEE application, in which remote EJBs handle data for the webapp.

So the web application is calling only remote interfaces of EJBs, but it seems that this was not how JPAContainer was designed, at least that’s what I can figure out.

The problem is that MutableLocalEntityProvider is a class, and that JPAContainer.setEntityProvider expects to get a class, and not an interface.

This is all fine if you have access to local EJB, but not all applications have this.

So I guess I have two questions:

  1. Can JPAContainer somehow work with remote EJBs?

  2. Is there a way to hook up existing DAOs, so not to use JPAContainer, but just to use some basic Container class in Vaadin and hook it up to our existing DAO methods. We don’t really need JPAContainers caching etc. just basic things like pagination, list, delete, edit.

Thank you all,

Bozo

Does anyone have an answer for that? I am about to design a Vaadin - JEE application which needs to use remote EJBs. I would like to use JPAContainer which in this case would not work…

Thanks,
Sebastian

Yes, you can write your own container for that special requirements. It’s not hard, try look to lazy-query container sources for more clues.

In theory, JPAContainer could use a remote EntityProvider. In practice this gets tricky with registering for notifications, handling of communication problems etc. so I would recommend using the LazyQueryContainer add-on with a custom back-end or perhaps even a completely customized container as Lukasz suggested.