geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsmch <>
Subject Interceptors on SessionBeans
Date Thu, 27 Nov 2008 19:25:57 GMT


today i got an interceptor to be built into my geronimo-application.
The interceptor is correctly deployed (no errors on deployment), but when
testing the application the interceptor-method is never used (i tried it
with System.out.println-code which should be visible on the server - but
only original code is being accessed - not the interceptor methods).

As you can see, the interceptor-class uses AroundInvoke:

The interceptor class:
public class MessageInterceptor
	public MessageInterceptor() 

	private EntityManager em;
	private int measureId = -1;
	private int appserverid = -1;
	private boolean deletedLogFlag = true;
	public Object invoke(InvocationContext context) throws Exception
              some code...

The ejb-jar describes the ejb-name, the interceptor-class and the method
that has to be intercepted:
The ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns=""

The Bean is the ChatClient-class (with sendMessage to be intercepted):
public @Stateful
class ChatClient extends Client implements IChatClient {
   ...some code

	public void sendMessage(String message) {

		sendMessage(message, user.getId());

  ...some code	


Note: In our project an other team is using exactly the same application
running on JBoss (with a few other configuration issues due to JBoss) - and
there it´s running quit fine.
Any idea what the problem could be? Is there any code necessary to be added
to the openejb-jar.xml for interceptors? (i didn´t find any useful
information in documentation for interceptors) 

Thank you in advance if there is anybody how can help me

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message