My current project EAR file (JAR and WAR) is deployed and running in production for many yrs. The EJB 2.0 was part of JAR file. I would like to do some operation before invoking the particular method in a EJB with out touching the EAR file. So wrote simple class which implements MethodBeforeAdvice interface (Spring AOP) and generated runable jar file using eclipse which has set it in the application server classpath. So that new java file will pickup as per the applicationContext configuration and perform the operation as I expected. The new jar file includes applicationContext.xml file and spring AOP depends JAR files like aop, bean, core and aopalliance. In the applicationContext XML file, mapped org.springframework.aop.framework.ProxyFactoryBean with target as EJB Bean class and InterceptorNames as new class name.
I set the jar file in the server classpath and restarted server in unix box but handshake between new jar file and ear file is not happening when I invoke the EJB. The new jar file should invoke before I call particular method in EJB (After look up EJB). Any idea or suggestions?