[jboss-user] [JBoss AOP] - Re: Can i have interceptor on throw exception?

2008-04-29 Thread stalep
you cant use normal aop on ejb beans since they are changed when deployed on jboss. but if you use ejb3 you can use the interceptor util thats included in the spec to do what you ask for. so since you call entitymanager.find(..) im guessing you are using ejb3. if you are take a look at

[jboss-user] [JBoss AOP] - Re: Can i have interceptor on throw exception?

2008-04-29 Thread stalep
the code i provided above will catch any exception thrown in a method that is intercepted. just add the above interceptor to the methods that can/will throw an exception and it will catch it. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4147521#4147521 Reply

[jboss-user] [JBoss AOP] - Re: maven-plugin

2008-02-21 Thread stalep
hi, i just created a small example you can download here: http://wiki.jboss.org/wiki/attach?page=JBossAOPMavenPlugin%2Fmaven-jbossaop-example.tar.gz its very basic, but it has two modules and the second module use a interceptor defined in the first one. the poms are a bit different, but see the

[jboss-user] [JBoss AOP] - Re: JJBoss-5.0.0.Beta2 AOP problems

2007-12-17 Thread stalep
the xml file was a bit hard to read, please include it in the code tags :) - and yes, you can define which packages you want to transform and which ones you want to skip. look at jboss/server/all/deploy/jboss-aop-jdk50.deployer/META-INF/jboss-service.xml. change the Include/Exclude tags as

[jboss-user] [JBoss AOP] - Re: JJBoss-5.0.0.Beta2 AOP problems

2007-12-17 Thread stalep
in your example you might set: | property name=includecom.test.core.aop/property | property name=excludeorg, com, etc/property View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4113466#4113466 Reply to the post :

[jboss-user] [JBoss AOP] - Re: Maven 2 plugin?

2007-06-24 Thread stalep
after some input i changed the groupid to org.jboss.maven.plugins as im told thats the default groupid for maven plugins. the goal was also changed from aopc to compile (now its jbossaop:compile) there is also support for compiling tests with: jbossaop:compile-test View the original post :

[jboss-user] [JBoss AOP] - Re: Maven 2 plugin?

2007-06-19 Thread stalep
thanks, my pleasure :) i can only agree with you that the maven respositories could easily be much better, but i believe its getting there. jboss have its own repository, a snapshot repository and think that modules will be updated faster in the future. remember that many projects (jboss aop

[jboss-user] [JBoss AOP] - Re: Maven 2 plugin?

2007-06-16 Thread stalep
currently the plugin depends on jboss aop 2.0.0alpha2 since thats the latest maven release atm. the plan is that it will depend on 2.0 when its released. mainly since thats what we want people to use and it also has less depencies on other modules. - but there is nothing in the maven plugin

[jboss-user] [JBoss AOP] - Re: Maven 2 plugin?

2007-06-15 Thread stalep
i added maven-jbossaop-plugin to the aop svn respository. i guess we'll move it to the jboss-plugins repository when the time is right, but i just added it here so the hardcore aop users could test it out :) small howto: 1. get the source and run (in the maven-jbossaop-plugin folder): mvn

[jboss-user] [JBoss AOP] - Re: Maven 2 plugin?

2007-06-08 Thread stalep
i got a compile plugin working on my local repository, it needs a bit more work before ill push it out though. sorry that this has taken so long, but ive been swamped at work for a while. ill try to get around and atleast push it out on svn in a few days... View the original post :

[jboss-user] [JBoss AOP] - Re: ClassNotFound for ClassMetaData.class

2007-04-26 Thread stalep
hi, i believe youre in the wrong forum. that class is provided by jbosscache. - but from what i can see in the jbosscache repository this file has been moved to org.jboss.cache.pojo.memory and has fixed the log error. View the original post :

[jboss-user] [JBoss AOP] - Re: Maven 2 plugin?

2007-03-22 Thread stalep
not atm. - but im looking for one too, so there might be one in the-not-too-distant-future :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4030617#4030617 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4030617

[jboss-user] [JBoss AOP] - Re: InterfaceIntroduction with Dynamic AOP

2007-02-06 Thread stalep
hi, im afraid its impossible to use introduction with dynamic aop. the reason is that for introduction, the class is altered (which is impossible to do when the class is already loaded by the jvm). for pointcuts its not needed to alter the class after its been prepared. so im afraid you have to

[jboss-user] [EJB 3.0] - EntityManager.find(Class, Object) performance

2007-01-12 Thread stalep
hi, ive been working on a ejb3 application that need to cache as much as possible. queries are cached manually by storing the result (only the primary keys) in jbosscache (the same cache as the entity beans). when that query is called again we fetch the id's from cache and for each id we just

[jboss-user] [JBossCache] - EJB3 entity cache layout

2007-01-11 Thread stalep
hello, im working on a ejb3 application and i noticed that all the entities are stored in the cache root node (as far as i can see). im wondering how optimal this is...? in our application we will try to have as much in cache as possible (100k-1m), but if all entities are added to the root i

[jboss-user] [JBoss AOP] - Re: Tracing/Logging - Actual RMI calls vs calls between EJBs

2006-12-12 Thread stalep
ykrishnaprasad wrote : | a) Can get the type of an invocation(whether its a METHOD)? | i guess you mean in the interceptor, so yes. just either try to cast it to a MethodInvocation or check if its an instanceof MethodInvocation. ykrishnaprasad wrote : | b) Can i use

[jboss-user] [JBoss AOP] - Re: Hotswapping an interceptor to an EJB

2006-12-12 Thread stalep
hm, thats strange, could you tell what files you copied over? if jbossaop isnt working at all anymore many of the jboss applications will not work either. eg (ejb3, cache, etc), so i guess you should have gotten a lot of other errors too (even though i havent tested it). View the original post

[jboss-user] [JBoss AOP] - Re: Dynamic Deployement with JBoss AS

2006-12-07 Thread stalep
hi, look at the injboss example provided by the jbossaop package. you can also find it online here: http://docs.jboss.org/aop/1.3/aspect-framework/examples/injboss/aopInJbossPackaging.html. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3991954#3991954 Reply

[jboss-user] [JBoss AOP] - Re: Is JBoss AOP complete?

2006-12-06 Thread stalep
hi, i havent used aspectj in many years so im outdated and probably a bit biased, but... aspectj is a more popular implementation, its older, it got a larger userbase and it got a few features jboss doesnt have (but we're catching up :). the reason i started to use jboss aop was because i just

[jboss-user] [JBoss AOP] - Re: Bug in SuperClassesFirstWeavingStrategy?

2006-12-06 Thread stalep
i would say that we have a deadlock issue when one thread is using jbossaop classloader and another is using the default one ( eg not the jbossaop classloader). if all threads are using the jbossaop classloader we shouldnt see this error (i hope). i havent had the time to look more deeply into

[jboss-user] [JBoss AOP] - Re: Can't read parameter annotations through reflection

2006-12-05 Thread stalep
hm, i might be far off, but if i remember correctly tomcat doesnt work well with annotations (dont sue me if im wrong, its early in the morning). could you try to deploy the code in jboss and not tomcat and see how it works? since it works when you test is outside tomcat i believe that its no

[jboss-user] [JBoss AOP] - Re: Bug in SuperClassesFirstWeavingStrategy?

2006-12-05 Thread stalep
hm, its seems like we got a general concurrent bug here. i was hoping it was only generated advisors (SuperClassesFirstWeavingStrategy) that caused the problem... i looks like our systemclassloader is creating a deadlock, if you got the time. could you try to deploy the app in jboss and see if

[jboss-user] [JBoss AOP] - Re: Bug in SuperClassesFirstWeavingStrategy?

2006-12-04 Thread stalep
hm, its quite possible that we have several concurrent issues with the generated advisors instrumentation that uses SuperClassesFirstWeavingStrategy. you can easily tell jboss aop to use a different instrumentor (its only from jboss aop 2.0 that generated advisors are default instrumentor). add

[jboss-user] [JBoss AOP] - Re: inheritance of aspects

2006-12-04 Thread stalep
hi, i guess this question should be answered by kabir. atm he is on vacation, but he will answer you when he's back. in the meantime i guess you have to add @Aspect on all subclasses (i dont know how many classes you got, but hopefully its not too big of a job :) View the original post :

[jboss-user] [JBoss AOP] - Re: Can't read parameter annotations through reflection

2006-12-04 Thread stalep
hm, even though i havent tested it myself but i thought it should work. the code you are calling is CtMethod/CtBehavior which is javassist, but thats not your problem :) have you tested .getAvailableParameterAnnotations() too? if that doesnt work either, could i bother you to make a small test

[jboss-user] [JBoss AOP] - Re: Bug in SuperClassesFirstWeavingStrategy?

2006-11-27 Thread stalep
hi, thanks for the feedback. SuperClassesFirstWeavingStrategy is used with the generated advisors instrumentation. it is very different from the other weaving types and as you can see, we havent fully tested it yet. i have commited a quickfix to the problem (i hope) in svn. if you could try it

[jboss-user] [JBoss AOP] - Re: Netbeans - AOP

2006-11-23 Thread stalep
no, only for eclipse afaik. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3988093#3988093 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3988093 ___ jboss-user mailing list

[jboss-user] [JBoss AOP] - Re: rmic and introduction together. It's possible ?

2006-11-19 Thread stalep
hi, when you introduce an interface to a class, that class will always also implement Advised. i do not know why it fails to compile, but it might be because the rmic do not have Advised in its classpath? - will it work to aopc after rmic? View the original post :

[jboss-user] [JBoss AOP] - Re: How to access an EJB 3.0 from an Interceptor

2006-11-10 Thread stalep
if you are creating an interceptor within a ejb3 application i really reccomend that you use the ejb3 interceptors. they are managed by the appserver and are really easy to set up. - and they are part of the ejb3 spec too. View the original post :

[jboss-user] [JBoss AOP] - Re: Aspect scope and construction pointcuts

2006-11-02 Thread stalep
hi, ive tested your example and i get the same error. i can see that it matches the pointcut and the generated code looks correct. so if im not mistaken ill call this a bug. i tried to change the pointcut to: @Aspect(scope=Scope.PER_INSTANCE) | public class MyAspect { | @Bind

[jboss-user] [JBoss AOP] - Re: error when introducing method in class

2006-11-01 Thread stalep
hi, you have an error in your jboss-aop.xml file, you need to wrap the introduction defenitions in a mixin tag, eg: | aop |introduction class=Calculator | mixin | interfaces | Main |/interfaces |class |

[jboss-user] [JBoss AOP] - Re: JBoss AOP- Compile vs LoadTime vs Hotswap

2006-10-26 Thread stalep
compile time may be the easiest to set up and use if you're not very familiar with jbossaop. compile and load time do not differ in functionality. with both you can add a new pointcut/interceptor to a method/field/etc in runtime if the class has been prepared first. View the original post :

[jboss-user] [JBoss AOP] - Re: ClassProxyFactory problem with classes that overide meth

2006-10-22 Thread stalep
This is now fixed in svn. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3979905#3979905 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3979905 ___ jboss-user mailing list

[jboss-user] [JBoss AOP] - Re: aopc fails to instrument classes

2006-10-13 Thread stalep
hi, it looks like there is something wrong with the instrumentation. what excactly is it that you are trying to do? if you could post a small example that reproduce you problem, that would be great. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3978289#3978289

[jboss-user] [JBoss AOP] - Re: Is there a static vs. dynamic binding problem with jboss

2006-10-09 Thread stalep
this problem is now fixed, it was a bug in javassist. the fix is atm only available from the javassist cvs repository, but the upcoming jboss-aop 2.0 will include this fix. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3977088#3977088 Reply to the post :

[jboss-user] [JBoss AOP] - Re: Using JBoss AOP with webstart

2006-09-26 Thread stalep
try to add the property; | property name=jboss.aop.verbose value=true / | and see what the output, [debug] jboss.aop.class.path: says. i would guess that the errormessage: [error] Unable to find jboss.aop.class.path: will show up in the console log of javaws (with javaws you can enable a

[jboss-user] [JBoss AOP] - Re: Using JBoss AOP with webstart

2006-09-22 Thread stalep
hi, if you could provide a small example ill take a look at it, but as far as i can remember (long time since i made a webstart app) webstart is a web-deployed application, and hence the classes used by the app must be packaged in a jar and referenced in the .jnlp file. - and i think that that

[jboss-user] [JBoss AOP] - Re: AOP Instrumentor failed to transform class

2006-09-21 Thread stalep
hm, how did you install jbossaop 1.5.1 into jboss as? jbossaop 1.5.1 do come with org.jboss.aop.MethodInfo.getInterceptors(), so it seems like there are some problems with old/new jbossaop jars. earlier versions of jbossaop did not have this method (and in the repository MethodInfo is moved away

[jboss-user] [JBoss AOP] - Re: Unable to resolve pointcut reference

2006-09-14 Thread stalep
as far as i can tell there is nothing wrong with your code, but the errormsg you get is typical that the pointcut you defined with your @Bind doesnt exist. eg: that you mistyped the classname/package/etc. i tried your example where i just changed packagename to com, and pointcuted another

[jboss-user] [JBoss AOP] - Re: compiling aop with jbosside

2006-09-11 Thread stalep
hi, i misunderstood your question a bit, but if you test your subclasses on the inherited method you will see that they will be intercepted even though the subclass hasnt changed. For some transformation the subclass will also change, but not always. eg: aop | interceptor name=MethodInt

[jboss-user] [JBoss AOP] - Re: Is there a static vs. dynamic binding problem with jboss

2006-09-05 Thread stalep
hi, a simple workaround for the fieldproblem is to either to rename the field variable so that it doesnt match the field of the subclass or make the field variable private accessible. the only workaround for the overflow/loop problem is to rename one of the methods calling. i'll make a post

[jboss-user] [JBoss AOP] - Re: change text with interceptors

2006-09-05 Thread stalep
hi, im not certain i understood you question, but ill try to clarify a bit. first off your jboss-aop.xml is completly valid and will work, but its a bit wierd. for readability i would recommend: | ?xml version=1.0 encoding=UTF-8 standalone=yes? | aop | interceptor