[jboss-user] [Installation, Configuration & DEPLOYMENT] - DI and annotations not working

irinac do-not-reply at jboss.com
Tue Sep 9 18:15:55 EDT 2008


I am very new to JBoss and I cannot seem to resolve this issue.

I am deploying a simple application in an ear file.  The ear file contains a jar file with my EJBs and a war file with my web app files.

The structure of the ear archive is as follows:


  | MyApp.ear
  |   - my_ejb.jar
  |       - my classes
  |       - META-INF
  |           - persistence.xml
  |   - my_app.war 
  |       - index.html
  |       - META-INF
  |       - WEB-INF
  |           - web.xml
  |   - META-INF
  |       - aplication.xml
  |       - jboss-app.xml
  |   - postgres-ds.xml    
  | 


I've exposed one of the session beans as a web service that I access from the web files.  The problem I'm running into is that it seems like all DI related annotations are being ignored i.e. @EJB annotated items are null, @PostConstruct method is not getting called ...

I've tried this in JBoss-5.0.0 and JBoss 4.2.2 and I'm getting the same behavior.  JNDI lookup of the items works however.  

Please point me to something that I may be overlooking or am doing wrong.

Thank you,
Irina

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175438#4175438

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175438



More information about the jboss-user mailing list