wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Singer <gr00vus.j...@gmail.com>
Subject injecting application context
Date Fri, 25 May 2012 00:14:51 GMT
Hello,

I'd like to inject the jax-rs application context as a method parameter.
I've subclassed the javax.rs.ws.core.Application class with my own
specialized application class. It is the instance of my subclass that I'd
like to pass as context (via a "@Context MyApplicationSubclass app" method
parameter). When I do this, I receive the following exception:

java.lang.IllegalArgumentException class MyApplicationSubclass is not
visible from class loader

(full stack trace omitted for now)

If I pass "@Context javax.ws.rs.core.Application app" as a method parameter
things work fine, and I can access the members of my subclass via type
casting. While this will work, it's not ideal. I'd like to be able to pass
my Application subclass directly for context and be able to access it fully
without the type casting.

Is there something I can do to make that happen?

Thanks,

Jeff

Mime
View raw message