I think this error was, because you also need an empty beans.xml in the ejb-bar.
So I fixed that, but then got the errors below.
What is actually required for these @Named and @Inject annotations to work between two different modules in the same ear-file ?
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss-injector:topLevelUnit=foobar-ear-0.0.1.ear,unit=foobar-ejbapp-0.0.1.jar,bean=FoobarMgr,interceptor=org.jboss.weld.integration.ejb.SessionBeanInterceptor" is missing the following dependencies:
Dependency "<UNKNOWN jboss-injector:topLevelUnit=foobar-ear-0.0.1.ear,unit=foobar-ejbapp-0.0.1.jar,bean=FoobarMgr,interceptor=org.jboss.weld.integration.ejb.SessionBeanInterceptor>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=foobar-ear-0.0.1,module=foobar-ejbapp-0.0.1,name=FoobarMgr' **")
Deployment "jboss-injector:topLevelUnit=foobar-ear-0.0.1.ear,unit=foobar-ejbapp-0.0.1.jar,bean=FoobarMgr,interceptor=org.jboss.weld.integration.ejb.interceptor.Jsr299BindingsInterceptor" is missing the following dependencies:
Dependency "<UNKNOWN jboss-injector:topLevelUnit=foobar-ear-0.0.1.ear,unit=foobar-ejbapp-0.0.1.jar,bean=FoobarMgr,interceptor=org.jboss.weld.integration.ejb.interceptor.Jsr299BindingsInterceptor>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=foobar-ear-0.0.1,module=foobar-ejbapp-0.0.1,name=FoobarMgr' **")
Deployment "jboss-switchboard:appName=foobar-ear-0.0.1,module=foobar-ejbapp-0.0.1,name=FoobarMgr" is missing the following dependencies:
Dependency "java:global/cdi/foobar-ear-0.0.1/foobar-ejbapp-0.0.1/BeanManager" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:global/cdi/foobar-ear-0.0.1/foobar-ejbapp-0.0.1/BeanManager' **")
Deployment "jboss-switchboard:appName=foobar-ear-0.0.1,module=foobar-webapp-0.0.1" is missing the following dependencies:
Dependency "java:global/cdi/foobar-ear-0.0.1/foobar-webapp-0.0.1/BeanManager" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:global/cdi/foobar-ear-0.0.1/foobar-webapp-0.0.1/BeanManager' **")
Deployment "jboss.j2ee:ear=foobar-ear-0.0.1.ear,jar=foobar-ejbapp-0.0.1.jar,name=FoobarMgr,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:ear=foobar-ear-0.0.1.ear,jar=foobar-ejbapp-0.0.1.jar,name=FoobarMgr,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-injector:bean=FoobarMgr,interceptor=org.jboss.weld.integration.ejb.interceptor.Jsr299BindingsInterceptor,topLevelUnit=foobar-ear-0.0.1.ear,unit=foobar-ejbapp-0.0.1.jar' **")
Dependency "<UNKNOWN jboss.j2ee:ear=foobar-ear-0.0.1.ear,jar=foobar-ejbapp-0.0.1.jar,name=FoobarMgr,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-injector:bean=FoobarMgr,interceptor=org.jboss.weld.integration.ejb.SessionBeanInterceptor,topLevelUnit=foobar-ear-0.0.1.ear,unit=foobar-ejbapp-0.0.1.jar' **")
Deployment "jboss.j2ee:ear=foobar-ear-0.0.1.ear,jar=foobar-ejbapp-0.0.1.jar,name=FoobarMgr,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=foobar-ear-0.0.1.ear,jar=foobar-ejbapp-0.0.1.jar,name=FoobarMgr,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
Deployment "jboss.web.deployment:war=/foobar-webapp" is missing the following dependencies:
Dependency "vfs:///C:/program1/jboss6/server/default/deploy/foobar-ear-0.0.1.ear_WeldBootstrapBean" (should be in state "Create", but is actually in state "**ERROR**")