tags:

views:

20

answers:

1

I'm writing an application using Seam 2.2.x which will be deployed on JBoss 5.1. I have an EJB module with all of the business logic en EJB's. However, I'd also like to have statless session EJBs in the web module to act as action classes. Is this possible? Do I need to perform any additional configuration to get this working? I have an interface I've defined:

@Local
public interface ContentItemSearchAction extends Serializable {
     ...
}

...and an implementing class...

@Name("contentItemSearchAction")
@AutoCreate
@Stateless
public class ContentItemSearchActionBean implements ContentItemSearchAction {
     ...
}

However, when I try to access the EJB in one of my JSF views, I get the following exception:

Caused by javax.naming.NameNotFoundException with message: "ContentItemSearchActionBean not bound" 

Has anyone seen this before? What am I missing? Why is the EJB in my WAR module not being picked up?

+2  A: 

EJBs do not go into WAR files. They're packaged into JARs, which go into the EAR along with the WAR.

The EJBs need not be in the WAR to be visible from your web tier.

duffymo