I read some post hear (specially BalusC post) and googled for the reason (not deep) but i couldn't find why shouldn't use entity bean as a managed bean. what's the reason? (I'm learning from "Pro JSF and HTML5" and in this book, entity bean is used as a managed bean.)
why shouldn't entity bean be managed by JSF framework?
422 views Asked by Arash At
1
There are 1 answers
Related Questions in JSF
- Calling custom AuthenticationHandler from Faces bean throws IllegalStateException: Cannot change buffer size after data has been written
- Force security constraint managed 403 error when hitting restricted page with h:commandLink
- primefaces component id not found in update
- LazyDataModel, custom filter with search button
- How to use SelectManyCheckbox with ArrayList as HashMap value
- how to surpress logging of jsf "There are some unhandled FacesMessages"
- SelectManyCheckbox returns array of Object[] instead of ArrayList
- My dialog component on PrimeFaces can't render a list on first click
- How to retrieve posted data via FacesContext
- I'm using JSF and after a timer expires, I want to display a warning
- Why print result is blank?
- PrimeFaces centering searchbar on menubar
- JSF: p:fileUpload requiredmessage is apearing on click of another button
- How can I make sure that JSF works?
- Is there an already-made template project using Spring, JSF, PrimeFaces, SOAP and MySQL?
Related Questions in MANAGED-BEAN
- Problema with managedbean null, but system out work
- Why does my managed beans are not working?
- Best practice for storing and reading data from Java Beans in XPages
- @ViewScoped bean behaves like @SessionScoped or @ApplicationScoped
- jakarta.servlet.ServletContext from jakarta.faces.context.FacesContext to getAttribute("AnAttributeName")
- CDI injection of subclasses of session scoped beans as a managed property
- Get JSF managed bean by name in a Servlet
- JSF - Appropriate bean scope for keeping data between pages but only "browser tab related"
- javax.faces.component.UpdateModelException: javax.el.PropertyNotFoundException. Target Unreachable, identifier resolved to null
- How to pass a variable value from one xhtml to another xhtml and then to the backing ManagedBean of 2nd xhtml
- faces-config.xml keep updating itself
- How to determine coordinates of different areas in h:graphicImage
- JSF cant resolve bean in xhtml file using spring boot
- faces-config.xml is being overwitten
- search and display person by id in jsf
Related Questions in ENTITY-BEAN
- Access entity dynamically based on postgres/ sql db from springboot app based on configuration
- Bean-Managed EB3 with jdbc persistency
- Is it a good practice to use the entity beans for front end
- JPA HIBERNATE - why does the system keep in database a column that has previously been updated in the entity bean
- JPA/ JPQL: How to use member-of with an hash-map
- WAS 8.5.5 CMP/BMP and Persistence DataSource
- How to call an entity class inside servlet in JEE. Beginner JEE programer
- org.omg.CORBA.MARSHAL: WARNING: 00810057: Could not load class
- @Size annotation not trimming whitespace
- Error accessing Entity Bean from client side on local environment
- Transaction between two session beans in ejb3
- How to refresh EJB 2.1 entity bean after changes made by JDBC in the same transaction?
- how to use spring to inject EntityBean on EJB 2.1 version using version 2.5 for JDK1.4
- Multiple field with identical name in Spring
- why shouldn't entity bean be managed by JSF framework?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Separation of concerns.
Normally, enterprise applications are developed and deployed as EARs instead of WARs. A typical EAR project consists of an EJB subproject as "back-end" and a WAR subproject as "front-end". The EJB subproject contains all JPA entities and EJB services. The WAR subproject contains all JSF managed beans and views (and what not closely related to JSF such as converters, validators, phase listeners, etc).
A good EJB subproject may not have any dependency on JSF. This makes it reusable for different front-ends, such as Spring MVC, JAX-RS, Struts2, plain JSP/Servlet or even a desktop oriented Swing application. This also means that no one of your JPA entities and EJB services should have any
javax.faces.*import/dependency in the class. Having for example aFacesContextat hands inside a JPA entity or EJB service is alarming as that doesn't necessarily exist in other front-ends.The "Pro JSF and HTML5" concentrates on simple WAR projects. Therein that's "okay" in order to show the possibilities and/or to keep the examples "simple", but that's actually misleading to starters once they grow into developing enterprise applications, the more so if the book doesn't cover the design concern in detail.
See also: