[jboss-user] [JBoss AOP] - Re: Using jboss AOP to handle try-catch

2008-06-12 Thread f.baronti
I was wrong: with PER_INSTANCE scope, the interceptor never gets called. I reverted back to PER_VM, using some ugly rereflection tricks to use the classes within the classloader of the intercepted methods, instead of the classloader of the interceptor. View the original post :

[jboss-user] [JBoss AOP] - Re: Using jboss AOP to handle try-catch

2008-06-11 Thread f.baronti
Your first suggestion works perfectly, thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4157231#4157231 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4157231 ___ jboss-user

[jboss-user] [JBoss AOP] - Re: Using jboss AOP to handle try-catch

2008-06-11 Thread f.baronti
Actually it works almost perfectly. In fact, using scope=PER_VM, it works only until the first redeploy; after that, I get funny class loading errors like Cannot cast it.tdgroup.sism.ejb.EJBAnswer to it.tdgroup.sism.ejb.EJBAnswer. Using scope=PER_INSTANCE, it works also after the application is

[jboss-user] [JBoss AOP] - Re: Using jboss AOP to handle try-catch

2008-06-10 Thread f.baronti
I tried this approeach together with Container Managed Transactions, in order to catch exceptions raised during commit() (typically database constraint violations). Unfortunately, it appears that JBoss commits transactions after executing all the AOP methods - so exceptions fall through the

[jboss-user] [JBoss AOP] - Re: EJB timers, server restarts and AOP

2008-05-28 Thread f.baronti
I tried it again on a minimal EJB and fresh installation of JBoss 4.2.2, and the same behaviour shows. I report here the files I used, and the installation steps: - Install JBoss 4.2.2 - Enable load time weaving - Put the .ear file in the default/deploy directory - Add pluggable-instrumentor.jar

[jboss-user] [JBoss AOP] - EJB timers, server restarts and AOP

2008-05-23 Thread f.baronti
Hello, I have a problem which spans the three topics in subject. I have some stateless EJBs which use AOP for some tasks. I'm then using the EJB Timer to schedule some tasks. All is fine if the timer fires when I have already used the stateless EJB. However, if I set a timer, shut down and

[jboss-user] [JBoss AOP] - Re: EJB timers, server restarts and AOP

2008-05-23 Thread f.baronti
Yep, I'm saying that - or at least that what appears to happen... the project is quite complex, so I could be wrong. I'll try to build a mini test over the weekend, so I can try to replicate this behaviour. As regards the other questions, I'm using loadtime, and did not try compile-time (I

[jboss-user] [EJB/JBoss] - Re: J2EE application startup code?

2008-03-10 Thread f.baronti
Bounce View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4135222#4135222 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4135222 ___ jboss-user mailing list jboss-user@lists.jboss.org

[jboss-user] [EJB/JBoss] - J2EE application startup code?

2008-03-03 Thread f.baronti
Greetings, I'm writing a standard J2EE application composed of some stateless session beans. I have some code which should be executed at the initialization of the whole application (it basically reads some configuration files, and stores the result in static variabiles). Is it ok to put this

[jboss-user] [JBoss AOP] - Re: JBoss AOP and JBoss please Help me! It's ugent!

2007-11-16 Thread f.baronti
As regards question 8), that is due to a wrong library name in the example build.xml file. Look for the line saying | pathelement path=${jboss.dir}/server/default/lib/javax.servlet.jar/ | and replace javax.servlet.jar with servlet-api.jar. View the original post :

[jboss-user] [JBoss AOP] - Perfect

2007-11-16 Thread f.baronti
It starts! Right now I can't check if AOP is working, but I'll keep you informed. Thank you very much, this was incredibly faster than I thought :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4105405#4105405 Reply to the post :

[jboss-user] [JBoss AOP] - Problem starting JBossAS +JBossAOP from Netbeans

2007-11-16 Thread f.baronti
Hello, I'm trying to start the JBoss 4.2.2.GA application server with AOP capability from Netbeans. Everything works when I start it from the command line, but I have the following error message when I try to start it from within Netbeans: anonymous wrote : | Error occurred during