I am writing a small program for User Management. I have an entity bean and database table for user. I have also written a session bean "UserManager". This session bean has methods for create/modify and delete user operations.
my question is:
If I use JSF, I need to use a java bean and set the values from the JSF to this java bean, then call the EJB from a method in this java bean. Right?
How will I do the mapping from java beans to Entity beans?
In theory, you could use an EJB directly as a JSF backing bean, but in practice it's not very realistic. You do better to let an ordinary backing bean be the go-between.
An industrial-grade application would put the display interaction in the backing bean, optionally have it invoke a business-layer bean for app-specific business logic, have that bean invoke a DAO or data service bean (which could be a session EJB), and it would manage the storage and retrieval of entity EJBs. Which may seem a bit much, but in major apps, having a few well-defined layers of simple functions beats lumping things together in one big ugly do-everything object.
I use the JPA and the Spring framework for my persistence-layer functionality and it works quite well for me.
An IDE is no substitute for an Intelligent Developer.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: New to JSF : Interaction between JSF and EJB's