سؤال

I've been using JSF 2.1 & EJB 3.1. So far, my aplication have such flow:

  1. Facelets template
  2. @ManagedBean connected to .xhtml page
  3. @Stateless EJB bean that uses EntityManager to get entities from DB etc
  4. EJB bean is injected to @ManagedBean via @EJB

So basically for 1 entity class I have 2 classes and 1 xhtml page.

Now, I'm starting new project with SEAM 3 (solder, faces, security and validation modules). How can I simplify application flow? Can I use EntityManager inside JSF bean and get all EJB functions, like transactions etc? How can I organise my project (entity classes, bean classes, service classes)? Thanks for help!

هل كانت مفيدة؟

المحلول

How can I simplify application flow?

From what you are wrote i don't thinks that you have some complicated architecture.

Can I use EntityManager inside JSF bean and get all EJB functions, like transactions etc?

If this is possible why should you do that?

How can I organise my project (entity classes, bean classes, service classes)?

I would say that your application organisation should not be changed.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top