Your SlideShare is downloading. ×
0
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Øredev 2010 - Guice and @Inject
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Øredev 2010 - Guice and @Inject

1,973

Published on

If @Inject is the new new then is Guice the new you? See how Guice makes application assembly a snap, saving you from spaghetti-hell. …

If @Inject is the new new then is Guice the new you? See how Guice makes application assembly a snap, saving you from spaghetti-hell.

This talk covers the basics of @Inject/Guice before diving into examples that use servlets, persistence, and classpath scanning. Nexus and Maven3 already run on Guice - will your code be next?

Published in: Technology
1 Comment
7 Likes
Statistics
Notes
No Downloads
Views
Total Views
1,973
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
53
Comments
1
Likes
7
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide


  • hints for anyone extending or re-using class
    can still load class without annos on classpath

  • Spaghetti!
    what do I need to wire?
    XML == paper manual (which might go missing)
  • No need for paper manual
  • Provider like factory -> get() ... no context passed in!
    @Qualifier meta-annotation
    at least 5 implementations so far

  • setters can have multiple arguments



  • Lazy loading
    Multiple values
    Mixing scopes





  • eager singletons?



  • + concrete types
  • AOP alliance (like JSR330)

  • web.xml
  • web.xml
  • all servlets and filters must be @Singleton’s
    mention @RequestScoped / @SessionScoped
    sitebricks!
  • persistence.xml
  • starts / stops JPA
  • session-per-transaction
    supports rollback on exception

    MyService instance(s) must be created by Guice
  • session-per-http-request / open-session-in-view

    no need to explicitly start PersistService




  • ×