Back to project page droidBBpush.
The source code is released under:
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...
If you think the Android project droidBBpush listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.arg3.examples.push; /* ww w. j a va 2 s. c o m*/ import java.sql.Connection; import javax.inject.Singleton; import javax.servlet.ServletContext; import dagger.Module; import dagger.Provides; /** * Created by c0der78 on 2014-09-27. */ @Module(library = true, injects = { PushServlet.class, SendServlet.class }) public class MainModule { ServletContext context; public MainModule(ServletContext context) { this.context = context; } @Provides @Singleton ServletContext provideServletContext() { return context; } @Provides @Singleton Connection provideSqlConnection() { return (Connection) context.getAttribute(Connection.class.getName()); } }