My SFSB Seam component is bound to JNDI on deployment, as evidenced by this log message:
Component: example, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN,
class:com.purecharger.action.ExampleAction, JNDI: purecharger/ExampleAction/local
My interface:
@Local
public interface Example {
public List<String> getExample();
public void destroy();
}
and my implementation:
@Stateful
@Scope(ScopeType.CONVERSATION)
@Name("example")
@Restrict("#{identity.loggedIn}")
public class ExampleAction implements Example, Serializable {
....
}
However, when I access the voting component in an xhtml page like, I get the following error:
javax.el.ELException: /home.xhtml: Could not instantiate Seam component: example
....
Caused by: javax.naming.NameNotFoundException: ExampleAction not bound
If Seam was smart enough to install my component using the JNDI pattern in components.xml (purecharger/#{ejbName}/local), why does it not also apply the pattern when looking up components?
Thank you.
UPDATE:
Looking at the JNDIView in JBoss, the name purecharger/ExampleAction/local is not bound anywhere. So I guess my question now becomes, why is Seam not adding this SFSB to JNDI?
Well,
As shown in your question, i think you have a ear application, because of its JNDI global address
which is mapped according to
When you deploy a single EJB module, its JNDI global address in JBoss looks like
Bacause you have a ear application, each EJB module should be declared in application.xml (The file that describes your ear) as follows
So your ear app looks like
And your application.xml
Notice jboss-seam.jar is a EJB module, so it should also be declared in application.xml file
If possible, use Seam-gen to generate your project. It takes care includes all libraries needed by your project and can be opened without restriction in NetBeans, for instance.
regards,