Use the Inject annotation for Jobs

Bug #509612 reported by Oded Peer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Oded Peer
1.1
Fix Committed
Undecided
Unassigned

Bug Description

Hi,

The documentation for |Play version 1.0.1 says the Inject annotation should work for controllers, jobs and mailer.
The code of play.inject.Injector in Play version 1.0.1 only injects to Controller and Mailer.
Please update the documentation and add the support for the next Play version.

Thanks

Tags: inject
Revision history for this message
Oded Peer (oded-50) wrote :

Add "Job" classes to the list of "injectable" classes in play.inject.Injector

Revision history for this message
Oded Peer (oded-50) wrote :

Wrong patch file earlier

Revision history for this message
Guillaume Bort (guillaume-bort) wrote : Re: [Bug 509612] Re: Use the Inject annotation for Jobs

This patch will work only for static fields. But Job classes are instanciated.

On Tue, Feb 2, 2010 at 8:37 AM, Oded Peer <email address hidden> wrote:
> Add "Job" classes to the list of "injectable" classes in
> play.inject.Injector
>
> ** Changed in: play/1.0
>     Assignee: (unassigned) => Oded Peer (oded-50)
>
> ** Patch added: "bug509612.txt"
>   http://launchpadlibrarian.net/38656131/bug509612.txt
>
> --
> Use the Inject annotation for Jobs
> https://bugs.launchpad.net/bugs/509612
> You received this bug notification because you are subscribed to play
> framework.
>

Revision history for this message
Oded Peer (oded-50) wrote :

It should work only for static fields, it's consistent with the Play! documentation.
From http://www.playframework.org/documentation/1.0.1/spring:
"You can now use the @Inject annotation to automatically inject defined beans in your controllers, jobs and mailer.
It works on static fields defined in these artefact."

Am I missing something?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.