Today''s Page Hits: 427
In past of two days, I was studying JBoss Seam, reading the document and trying to run the tutorial example.
I did a stupid thing that spent me half a day, the example must run in EAR deployment, but I ran it in WAR mode.
I am curious how to make it run in WAR mode.
Cause of the example is made for a EJB, so you need to declare @Stateless/@Stateful for the controller.
In document of Seam, it can control any bean to be a controller, no need to EJB , so we should able to remove EJB annotation.
However cause we still need an entity manager,that annotated by @PersistenceContext, to work, so we don't remove @Stateless/@Stateful directly.
Thanks Seam, it is easy to fix, use @In annotation, you can get a entity manager with out @PersistenceContext
following is the steps to run example in WAR mode.