Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB DI

 
Dinidu de Silva
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I use DI to Inject an EJB in a servlet.

When it runs it says

Unresolved Ejb Ref.

Do i have to declare a ejb-ref in web xml

I thought DI was a substitute to ejb-ref.

I am using Glassfish 2 and NetBeans 6

Please guys help
 
nitin pai
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Export you EJB project in a jar file and put the jar file
in your WEB-INF/lib folder.

If its a problem with the mapping, use 'mappedname' attibute within
both @Stateless and @EJB when using DI and make sure both have the same values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic