[jboss-user] [EJB 3.0] - Re: Injection SessionContext to interceptor

MirekSz do-not-reply at jboss.com
Thu Jul 30 03:03:42 EDT 2009


IntercetorTest class

  | public class InterceptorTest {
  | 
  | 	SessionContext sessionContext;
  | 	public Object execute(InvocationContext invocation) throws Exception {
  | 		System.out.println(invocation.getTarget());
  | 		Context context = new InitialContext();
  | 		return invocation.proceed();
  | 	}
  | }
  | 

and fragments of ejb-jar.xml


  | 		<interceptor>
  | 			<interceptor-class>test.InterceptorTest</interceptor-class>
  | 			<around-invoke>
  | 				<method-name>execute</method-name>
  | 			</around-invoke>
  | 			<resource-env-ref>
  | 				<resource-env-ref-name>SessionContext</resource-env-ref-name>
  | 				<resource-env-ref-type>javax.ejb.SessionContext</resource-env-ref-type>
  | 				<injection-target>
  | 					<injection-target-class>test.InterceptorTest</injection-target-class>
  | 					<injection-target-name>sessionContext</injection-target-name>
  | 				</injection-target>
  | 			</resource-env-ref>
  | 		</interceptor>
  | 

This error occurs when I invoke method of session bean which is connected with this interceptor

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246876#4246876

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246876



More information about the jboss-user mailing list