on 11-09-2009 3:12 PM
Hi experts,
I have the following question. I've made WD app that uses EJB model. The persistence ejb module is created with JPA and my structure is as follows:
EJB Module with JPA entities and persistence.xml (EJB1) + EJB Module with session beans that use the persistence unit from EJB1 (EJB2) ->packed in one Enterprise Application DC -> which is used by my WD application.
The error I get is that it can't inject the EntityManager which I try to inject in EJB2. It is probably because it can't see the persistence unit from EJB1 but I don't know how to fix that. I know it's not really WD question but I hope someone had this problem before and could help me. Help will be rewarded with points of course.
Best regards,
Martin
Hi Friend,
I don't have much idea but you can check this links for help i follow these documents for my development work. Hope it will help.
[Using EJBs in Web Dynpro Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c]
[Integration of EJB 3.0 in Web Dynpro Using Enterprise JavaBean Model|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/8041f93c-8e76-2b10-d5b9-862ed0140cc1]
[How to Develop a Simple CRUD Application Using EJB 3 and Web Dynpro|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00bddb57-456c-2b10-cc8d-b6980d75299b]
Regards
Jeetendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem was a missing db table.
So to summarize:
EJB Module 1 contains only JPA entities + persistence.xml with PU named myPU
EJB Module 2 contains the session beans using the entities from the first module. EntityManager is injected (for AS managed EntityManagers) with @PersistenceContext(unitName="myPU")
Both EJB Modules are packed in one EAR (in order to see the persistence unit from the first module in the second one)
Regards,
Martin
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.