[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 : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4157611#4157611

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4157611
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/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 redeployed. 
PER_CLASS gives the same problem.
I believe this is due to the same classes being loaded with different 
classloaders. We do not have a PER_CLASSLOADER scope, do we?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4157324
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 client. Is there 
a way to catch them?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4157078
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 to /bin directory
- Add pluggable-instrumentor.jar to classpath and as java option (-javaagent...)
- Start JBoss

- Run MiniEjbTest.jar, specifying a low delay
- Observe in the JBoss output the messages from the interceptor

- Run MiniEjbTest.jar, specifying a high delay
- Shutdown and restart JBoss
- Wait for the timer to fire, observing no message from the interceptor

You can find the .EAR and the client .JAR at this URL:
http://www.megaupload.com/?d=VBXFXVIK

Ask me if you need the source or the netbeans 5.1.1 projects.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4153858
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 restart the server, then just wait for 
the timer to fire, it behaves as the called stateless EJB did not have AOP 
enabled: no aspects are called, just directly the timer function. This happens 
not only in the function called by the timer, but also later, if I call the 
same EJB for other purposes. It looks as the whole EJB was loaded with no 
aspects.
I'm using JBoss 4.2.1 (same problem on 4.2.2 though), and AOP 1.5.6. Apart from 
timers, everything else works fine.
Any clues on this?


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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4152903
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 have no idea how to do it atm, I'll check it out). Yes, the 
-aop.xml has been deployed when the timer fires.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4153033
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 code in the static {} 
portion of a stateless EJB, or is there any more appropriate place? The code 
must be executed once for all, so ejbCreate() is not what I need.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4133597
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4105393#4105393

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105393
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105405
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[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 initialization of VM
  | agent library failed to init: instrument
  | 
I'm sure it has something to do with the -javaagent switch, but I have no clue 
how to solve it.

Ideas?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105390
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user