GetServlet retrieves the service pattern, demonstrating that the service is shared between all injecting classes
Binding | Value |
---|---|
@Inject MyService | MyServiceBean[MyStartupBean: initial value] |
Binding | Value |
---|---|
@Inject StartupResourceBean | StartupResourceBean[MyStartupBean: initial value] |
public class GetServlet extends HttpServlet { // service pattern private @Inject MyService _service; // plugin/extension pattern private @Any Instance<MyResource> _resources; // startup pattern private @Inject StartupResourceBean _startupResource; ... }