[jboss-user] [EJB 3.0] - Re: Client access to Entity beans
fguerzoni
do-not-reply at jboss.com
Sun Jul 16 09:49:43 EDT 2006
It's not MVC pattern, but FACADE pattern.
You don't need an EM on client, because EM can't do anything for you on client for client-server applications.
EM performs transactionally CRUD operations on server.
You have two options:
1) passing detached object to client, let client work on them, and eventually reattach them to EM on server -> less code
2) converting entities (model) to dto object and viceversa -> more flexibility
At the moment I've chosed the second option because I can't download to client all the Hibernate classes required to manage detached entity.
In the second case try out Dozer, it's a mapping library that does all the bidirectional mapping between model and dto quite automagically.
If your application is a standalone application, without server connection, so you have the database directly on client, you must bootstrap an embedded container and follow the general ejb3 tutorial. There's a lot of sample that explain how to do that.
ciao
F
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958321#3958321
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958321
More information about the jboss-user
mailing list