Thanks. The errors disappeared. Op 03-06-12 18:49, Romain Manni-Bucau schreef:
2notes: 1) @local needs an interface (remove it) 2) mappedname is container dependent (remove it) Le 3 juin 2012 18:23, "Marco de Booij"<[email protected]> a écrit :Hello, My EJB is like: @Local @Stateless(mappedName = "CodeDao") public class I18nCodeDao extends Dao<I18nCodeDto> { static Logger logger = LoggerFactory.getLogger(**I18nCodeDao.class); @PersistenceContext(unitName="**doos", type=PersistenceContextType.** TRANSACTION) private EntityManager em; public I18nCodeDao() { super(I18nCodeDto.class); } @Override public String getApplicationName() { return DoosBase.APPLICATION_NAME; } @Override protected EntityManager getEntityManager() { return em; } @Override public Logger getLogger() { return logger; } } The Dao class is an abstract class defined as public abstract class Dao<T extends Dto> The I18nCodeDao is used as: @Local @Stateless(name="**I18nCodeManager") public class I18nCodeManager { @EJB private I18nCodeDao i18nCodeDao; So for me this all looks quite simple and straight forward. I use no XML for this part. Only for JSF (faces-config.xml) and sun-web.xml with (unused) security role mapping. Regards, Marco Op 03-06-12 17:58, Romain Manni-Bucau schreef:Hi, Can you share some code? Tomee supports ejb 3.1 Romain Le 3 juin 2012 16:16, "Marco de Booij"<[email protected]> a écrit : Hello,Nearly 2 years ago I tried OpenEJB. I wanted to use it with Tomcat. It was not such a big success for me :-( Lack of knowledge from my side. I went to Glassfish and there I managed to get an application running. I used EJB3.1 so I could pack the whole application in a single WAR and did not need to create any interface for my beans. The application works. Glassfish is nice (Beautiful console) but it is not really free. Oracle is visible everywhere and openJDK is not supported. To free myself from Oracle I decided to replace MySQL by Postgres and Glassfish by Geronimo. But then Tomee Plus came to my attention and I decided to use this. I installed it and created a Tomee Plus server in Eclipse. When I deploy my application I get the following error message for each EJB: Ambiguous @Local() usage on bean class. Must list interfaces explicitly in annotation. Also my beans cannot be found (WARNING: Unresolved ejb reference "java:comp/env/...). To me it looks like Tomee does not expect EJB 3.1. Do I need to configure somewhere that I want to use EJB 3.1 or doesn't Tomee accept EJB 3.1 yet. I searched for a few days on how to fix it but I am a bad searcher or my limited knowledge is the problem. Can somebody help me out? It works on Glassfish so it must be a configuration problem. Regards, Marco
