wink-user mailing list archives

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

I'd like to inject the jax-rs application context as a method parameter.
I've subclassed the 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 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?



View raw message