-
1. Re: JSF EJB's and actionListeners
wangliyu Aug 24, 2010 8:15 AM (in response to asermej)With EJB3.1 you should be able to put the EJB in the war file, so you can implement the ActionListener,another thing is the Listener Interfaces are in the JSF API jar. if you want to keep EJB in the EJB jar, you can put the jsf api jar in the ear/lib. This is what we do before with Seam2 and JBoss5.x,
And of cause if you don't need transactions, you don't have to use EJBs.
-
2. Re: JSF EJB's and actionListeners
nickarls Aug 24, 2010 4:12 PM (in response to asermej)You don't have to implement any interface for the EJB itself, just do an EL-ref into a method that has the correct signature.
-
3. Re: JSF EJB's and actionListeners
asermej Aug 25, 2010 10:30 AM (in response to asermej)Thank you both for your replies. It sounds like I am probably having an environment issue then. I have a class that implements an actionListener method and everything is working; i.e. the EL finds and executes the method. I then throw the @Stateless annotation on the class without changing anything else and it fails with an Expression Language can't find method error.
I will try to simplify the code to a minimal test case and post it.
-
4. Re: JSF EJB's and actionListeners
wangliyu Aug 25, 2010 12:14 PM (in response to asermej)Check the Bean's scope, maybe you want to use @Stateful instead of @Stateless, also maybe need to implements Serializable interface.