• 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!