dion
Posts: 5028
Nickname: dion
Registered: Feb, 2003
|
Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
|
|
|
|
javax.dependency.Inject
|
Posted: Dec 18, 2004 9:16 PM
|
|
|
This post originated from an RSS feed registered with Java Buzz
by dion.
|
Original Post: javax.dependency.Inject
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
|
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)
|
|
After hearing more about EJB 3, and talking to various people, why are we putting dependency Injection semantics in an EJB spec?
I can see one reason: "Let's just get EJB 3 done"
This is a reason for not splitting the persistence API into a truly seperate JSR (although it IS mean to be a seperate spec/tck/runtime).
Dependency injection is a very generic concern, and one that should be shared throughout a bunch of specs. One tiny JSR could flush out the semantics
of dependency injection, and end up with javax.dependency.*.
Then EJB 3 would specify that "When you @Inject a transaction manager.... you must do X". A future Servlet spec could do the same thing for their resources, etc etc.
Also, lightweight containers would have the option of groking these annotations too, without needing some ejb.jar.
Wouldn't that be nice?
Read: javax.dependency.Inject
|
|