cancel
Showing results for 
Search instead for 
Did you mean: 

dependency injection across enterprise applications is possible?

Former Member
0 Kudos

Hi All ,

I am working on EJB3.0. I want to know if we can use dependency injection across application?

I have

1. jpadc having all JPA classes and 1 jpaAppl enterprise application having only jpadc

2. session1dc and session1Appl enterprise application for session1dc

3. session2dc and session2Appl enterprise application for session2dc

I want to use jpa classes and sesisonbean classes from jpadc and session2dc respectively

inside session2dc. is it possible? i tried but i am not able to d odependency injection

Please let me know if this is possible?

Thnx in advance

Regards

Kavita

Accepted Solutions (1)

Accepted Solutions (1)

ekaterinamitova
Advisor
Advisor
0 Kudos

Hi Kavita,

Yes, you can use dependency injection. For more information, refer to this document:

http://help.sap.com/saphelp_nwce711/helpdata/en/44/bf6e9344751eaae10000000a1553f6/frameset.htm

If you need information related to the JPA part, read this:

http://help.sap.com/saphelp_nwce711/helpdata/en/46/307a2a50094f09e10000000a114a6b/frameset.htm

Best regards,

Ekaterina

Former Member
0 Kudos

Thnx for reply. I have read these links. but in these links its mentioned for same application. In my case my session beans classes and jpa classes are in different enterprise applications. I could do dependency injection across dcs but within same enteprise application. I want to try for across enterprise applications

siarhei_pisarenka3
Active Contributor
0 Kudos

I think It shall be possible. Java standard for dependency injections does not restrict them to single j2ee application. What is your problem exactly? Why could not you do this?

BR, Sergei

ekaterinamitova
Advisor
Advisor
0 Kudos

Hi Kavita,

I researched your case. It is not possible to use dependency injection across applications. It is also forbidden the usage of classes outside of an application that could change the O/R mapping.

You have to find another way to do implement the business logic of your applications.

Best regards,

Ekaterina

Former Member
0 Kudos

Hey thnx a lot.

Answers (0)