The Java EE 6 specification lists JAXWS handlers as component classes that are supporting injection (see page 69, table EE.5-1).
It seams, that within Glassfish 126.96.36.199 (build 5) @Inject is not resolved for handler classes. Is this a known bug?
I have found a forum posting (http://forums.java.net/node/873115) that has not been answered yet.
The attached sample demonstrates this issue.
- ServerSideTicketHandler is a JAXWS handler that has dependency to TicketFactory (should be resolved via @Inject). Since DI does not work "ticketFactory is null" is logged to System.out.
- ProductServiceEndpoint is the service implementation that itself delegates the method call to ProductRepository (here @Inject works as expected).