Vaadin AppEngine best practice

Hello everybody,

I’m almost new to Vaadin but so far I found it to be a great framework to build my own web applications. Here comes the question:

I want to put my application on the AppEngine and I was able to get it done. No problem up to this point. My question is about the best practice to work with the JDO persistency layer GAE offers.

Normally I would like to have an interface (IDbLink) with very generic methods like

public void save(T…ts){

to be able to change my underlaying datastore if necessary on the fly (or almost on the fly :-)).

Everything works fine when I save new entites added to a BeanItemContainer, but when I have to update an existing entity, new values aren’t persisted to the datastore. My entity is (detachable=“true”).

The problem is in the way a manage my JDO PeristenceManager which I open when the application start and I close when it close (so I cannot use the usual JDO update within transaction way) but I cannot figure out the best way to structure my web app. If I create PersitenceManager whitin Vaadin Components when I have to save, than the risk is that I bind Vaadin to JDO, not to an interface, and this is something that I don’t really like.

Any suggestion or link?

Thanks a lot.