users@glassfish.java.net

Re: EJB Cannot Be Found

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Jun 2007 08:55:03 PDT

In EJB 3.0, there is a separation between the local Business interface and bean class itself.
In your example, there is only a bean class. The simplest change is to add a local business
interface called UserAccount containing each of your public business methods :

@Local
public interface UserAccount {
   ...
}

Then change the bean class name to UserAccountBean and add UserAccount to the
implements clause :

@Stateless
public class UserAccountBean implements UserAccount ...

Also, change the injected field in the JSF managed bean to remove the static keyword.
Java EE injection within web components only works on non-static fields.
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=223098