Update of /cvsroot/springframework/spring/tiger/src/org/springframework/ejb/interceptor
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20521/tiger/src/org/springframework/ejb/interceptor
Modified Files:
SpringBeanAutowiringInterceptor.java
Log Message:
made SpringBeanAutowiringInterceptor callback signature compatible with WebSphere
Index: SpringBeanAutowiringInterceptor.java
===================================================================
RCS file: /cvsroot/springframework/spring/tiger/src/org/springframework/ejb/interceptor/SpringBeanAutowiringInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SpringBeanAutowiringInterceptor.java 28 Aug 2008 09:00:22 -0000 1.3
--- SpringBeanAutowiringInterceptor.java 19 Mar 2009 14:45:52 -0000 1.4
***************
*** 1,4 ****
/*
! * Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
--- 1,4 ----
/*
! * Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
***************
*** 22,25 ****
--- 22,26 ----
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
+ import javax.ejb.EJBException;
import javax.ejb.PostActivate;
import javax.ejb.PrePassivate;
***************
*** 94,100 ****
@PostConstruct
@PostActivate
! public void autowireBean(InvocationContext invocationContext) throws Exception {
doAutowireBean(invocationContext.getTarget());
! invocationContext.proceed();
}
--- 95,110 ----
@PostConstruct
@PostActivate
! public void autowireBean(InvocationContext invocationContext) {
doAutowireBean(invocationContext.getTarget());
! try {
! invocationContext.proceed();
! }
! catch (RuntimeException ex) {
! throw ex;
! }
! catch (Exception ex) {
! // Cannot declare a checked exception on WebSphere here - so we need to wrap.
! throw new EJBException(ex);
! }
}
***************
*** 184,190 ****
@PreDestroy
@PrePassivate
! public void releaseBean(InvocationContext invocationContext) throws Exception {
doReleaseBean(invocationContext.getTarget());
! invocationContext.proceed();
}
--- 194,209 ----
@PreDestroy
@PrePassivate
! public void releaseBean(InvocationContext invocationContext) {
doReleaseBean(invocationContext.getTarget());
! try {
! invocationContext.proceed();
! }
! catch (RuntimeException ex) {
! throw ex;
! }
! catch (Exception ex) {
! // Cannot declare a checked exception on WebSphere here - so we need to wrap.
! throw new EJBException(ex);
! }
}
|