Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on DI

 
kalle suresh
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am new to EJB. I am following EJB 3 in Action Book. Talking about Action Bazar example

In the stateless bean client if we put

@EJB
private PlaceBid placeBid;

It injects the instance of PlaceBid EJB. But in the PlaceBid Stateless session bean code we have only the interface for PlaceBid not the PlaceBid class.
It injects the instance of PlaceBid EJB - means
will the server creates a class which implements the PlaceBid interface?
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See JSR-220, par. 4.7.1.
 
kalle suresh
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please be more clear on what you are saying. I am not getting what you are saying.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He's saying that this is explained in the EJB 3.0 specification, which is developed under JSR 220 (JSR = Java Specification Request). Google for "jsr 220"; the first link that comes up is where you can download the specification. It's a good idea to keep the spec handy while you learn EJB.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic