openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louis Bros <>
Subject tomee ejb annotation not injecting
Date Thu, 09 Aug 2012 06:12:41 GMT
tomee ejb annotation not injecting

Hi everyone,

I'm having problems with EJB injection is tomee. I can't seem to find what
I'm missing.

I have a simple JSF webapp with both my ManagedBean and Stateless Bean in
the same war file under WEB-INF/classes.

The webapp works as expected when run in Glassfish 3 but in tomee the
injection seems to fail.

I hope someone knows what I'm doing wrong.


package com.ejbtest.ejb;

import javax.ejb.Stateless;

public class HelloEJB{

	public String sayHello(){
		return "Hey hey"; 

My Managed Bean:

package com.ejbtest.test;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import javax.ejb.EJB;
import com.ejbtest.ejb.HelloEJB;

public class TestBean implements Serializable{

	private HelloEJB helloEJB;

	private String test = "default";

	public String getTest() {
		return test;

	public void setTest(String test){
		this.test = test;

	public String doTest(){

		if(helloEJB == null){
			test = "Not Injected";
			test = helloEJB.sayHello();
		return null;

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message