Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within EJB and other Jakarta /Java EE Technologies
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
EJB and other Jakarta /Java EE Technologies
Catch parameters inside interceptors
masoud keshavarz
Greenhorn
Posts: 21
I like...
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi, I implemented a very simple interceptor.
My method have two
string
parameters:
@Interceptors(SimpleInterceptor.class) public String printMessage(String message1, String message2) { return message1 + message2; }
Is it possible to I catch message2 in my interceptor and print it?
public class SimpleInterceptor { @AroundInvoke public Object intercept(InvocationContext context) throws Exception { /* need a code like this to print message2: System.out.println(context.getParameters[1].toString()); */ Object result = context.proceed(); return result; } }
Thank you very much for help.
Computer Enterprise Masoud Keshavarz
For more information contact
masoudk1990@yahoo.com
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Exception Q2
beginning methods help
I need some light please
sending image to server using HTTP connection
Anonymous Local Variables
More...