[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: AOP metrics ex. doesn't work after redeploy :(

2004-12-08 Thread hessman
Yes we're using jboss 4.0.0 too. 

JBoss 4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418)

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3857843#3857843

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3857843


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: AOP metrics ex. doesn't work after redeploy :(

2004-12-08 Thread hessman
Since post editing is disabled i have some infos to provide for better 
understanding.

We use jdk 1.5 and aop final 1.0.0. The classes are precompiled(aop'ed) and 
then copied into the deploy folder as an *.ear.

thx for help
d.hesse
 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3857849#3857849

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3857849


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - AOP metrics ex. doesn't work after redeploy :(

2004-12-07 Thread hessman
Hello 


we've tried the metrics example from the 
http://docs.jboss.org/aop/aspect-framework/userguide/en/pdf/jbossaop_userguide.pdf
 within our own bank project.
After the first deploy it works very well. But after the second time it doesnt 
work anymore. Any help would be appreciated.



jboss-aop.xml:

  | ?xml version=1.0 encoding=UTF-8?
  | aop   
  | bind pointcut=execution(public boolean 
de.bootlab.bank.BankSessionBean-ueberweisen(..))
  | interceptor class=test.Metrics/
  | /bind
  | /aop
  | 

metrics.java:

  | package test;
  | 
  | import java.lang.reflect.Method;
  | import org.jboss.aop.advice.Interceptor;
  | import org.jboss.aop.joinpoint.Invocation;
  | import org.jboss.aop.joinpoint.MethodInvocation;
  | /*
  |  * Created on 15.10.2004
  |  */
  | 
  | 
  | public class Metrics implements Interceptor {
  | 
  | public String getName() { return Metrics; }
  | 
  | public Object invoke(Invocation invo) throws Throwable {
  | long start = System.currentTimeMillis();
  | try{
  | Object value = invo.invokeNext();
  | System.out.println(Return value: +value);
  | return value;
  | }catch(Exception ex){
  | throw ex;
  | }finally{
  | long end = System.currentTimeMillis() - start;
  | Method m = ((MethodInvocation)invo).getMethod();
  | System.out.println(Method  + m.toString() +  Time 
needed:  + end +  ms);
  | }
  | }
  | 
  | }
  | 
StackTrace:

  | 14:39:50,841 ERROR [LogInterceptor] RuntimeException in method: public 
abstract
  | boolean 
de.bootlab.bank.Bank.ueberweisen(de.bootlab.bank.Kunde,java.lang.Integer
  | ,java.lang.Integer,java.lang.Double) throws java.rmi.RemoteException:
  | java.lang.NullPointerException
  | at de.bootlab.bank.BankSessionBean.ueberweisen(BankSessionBean.java)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
  | at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
  | at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
  | at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
  | at 
org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
  | at 
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
  | at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
  | at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
  | at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
  | at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
  | at 
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
  | at org.jboss.ejb.Container.invoke(Container.java:854)
  | at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
  | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
  | at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
  | at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
  | at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
  | at 
org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
  | at 
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
  | at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
  | at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
  | at 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
  | at 
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
  | at