This content has been marked as final.
Show 3 replies
-
1. Re: Injecting POJO object to ejb session bean
viggo.navarsete Dec 6, 2012 2:53 AM (in response to himansumca)Yes you can:)
By using CDI, if supported by your container you can use the
@Inject annotation to inject a POJO. Remember that you also need a beans.xml bundled with your application, this is the way the container knows it should enable CDI for your application.
-
2. Re: Injecting POJO object to ejb session bean
himansumca Dec 6, 2012 3:57 AM (in response to viggo.navarsete)do @Inject annotation comes with java 1.6 if i am not worng, but my ejb 3 runs on java 1.5 ?
-
3. Re: Injecting POJO object to ejb session bean
viggo.navarsete Dec 6, 2012 3:53 AM (in response to himansumca)It depends on which application server you want to run you application and also which version of the application server. I think CDI was introduced as part of Java EE 6, so you should see if your application server supports Java EE 6.