[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Problems with
Hint: Docs: 6.3. Preparation Dynamic AOP cannot be used unless the particular joinpoint has been instrumented. You can force intrumentation with the prepare functionality I _think_ that's the problem. Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3863005#3863005 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3863005 --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag--drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Design of AOP on JBoss (Aspects/JBoss)] - Re: AOPC question on the inner src tag
As depends on first, all you need is only to compile needed plain _Java_ files - including aspects you want. Put then, every compiled *.class file into your build directory and run on that directory. Here snippets from my build.xml: | | target name=compile depends=common:read_params | description=Java sources compilation | javac | destdir=${build.classes.dir} | debug=on | debuglevel=lines, vars, source | deprecation=on | depend=on | nowarn=on | optimize=off | | | include name=**/*.java / | src path=${src.main.dir} / | src path=${src.aspects.dir}/persistence / | src path=${src.aspects.dir}/transactions / | | classpath refid=compile_classpath/ | /javac | /target | | !-- || Weave all the sources with JBossAOP compiler | -- | target name=aopc depends=common:read_params | aopc compilerclasspathref=run_classpath classpathref=run_classpath | verbose=false | classpath path=run_classpath / | src path=${build.classes.dir} / | aoppath path=${etc.dir}/jboss-aop.xml / | /aopc | /target | Of course you know, you may also use regular expressions inside jboss-aop.xml. This might help. And how many of those aspects, source files do you have anyway? Or/and how much memory do you have? Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3863007#3863007 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3863007 --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag--drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [Design of JBoss Remoting, Unified Invokers] - Re: Standalone remoting without JBossAS vs Pojo architecture
Hmmm, something wrong happens to the forum or sth.. (bug?) I did NOT post former post here on this forum. I did started topic Standalone remoting without JBossAS vs Pojo architecture on other forum. I've been watching the topic. I've just reveived notification, someone answered to notified topic but this isn't true. More: the topic is in wrong place.. :( Check this one: anonymous wrote : Subject: Topic Reply Notification - Standalone remoting without JBossAS vs Pojo architecture | Charset: iso-8859-1 | | Hello , | | You are receiving this email because you are watching the topic, Standalone remoting without JBossAS vs Pojo architecture at JBoss.com. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. | | http://www.jboss.org/index.html?module=bbop=viewtopicp=3859323#3859323 and this one.. http://www.jboss.com/?module=bbop=viewtopicp=3856945 Really strange, ??? Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3859526#3859526 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3859526 --- 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 JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Different handling of XML entities between FINAL and RC1
[EMAIL PROTECTED] wrote : ... | The include is a bug though and we'll fix as soon as we can. | | Bill Just remind. I haven't found that on JIRA.. or has it been already fixed Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3858572#3858572 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3858572 --- 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] [JBossCache] - Re: Does node triggers coordinator methods?
Ok. I got this SharedStoreCacheLoader, but I have little problems with using it. It has strange constructor, so it cannot be plugged directly by using XML conf file. Any help with this, please? Next thing: about shared cache loader. Correct me if my assumptions are wrong: -I want to have shared DB -want to use lazy loading (my custom implementation) from DB -so I start cache with several nodes -aop tree is empty -tree.getObject(/customers/first); -after that, the tree has one element, loaded with my custom: Map get(Fqn fqn) method -I _thought_ from now on, in case every _other_ node wants /customers/first it will be given by cache -but: from other nodes method: Map get(Fqn) is still executed. So, basically: there is no cache ? :/ Here is my configuration: -FetchStateOnStartup: TRUE -CacheLoader: MyCustomLoader -CacheLoaderShared: TRUE -CacheLoaderPreload: empty -because I want to lazy load all data -CacheLoaderFetchTransientState: TRUE -CacheLoaderFetchPersistenceState: FALSE I think sth might be wrong with implementation of my CacheLoader. Because I think FileBased and Bdbje work correct. Any comment? T. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3855874#3855874 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855874 --- 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] [JBossCache] - Re: Problems with using TreeCacheAop for the first time
Hi! Thanks for tip about transient log. That was the problem in JbossCache 1.1 I won't check CVS version for now. I'll wait till 2.0. And btw, when will it be? ~end of november? Rgrds, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3855184#3855184 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855184 --- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - Does node triggers coordinator methods?
Hi! I wonder whether when asking node (invoking 'getChildren()') for some objects, the method is realy executed on coordinator? I suppose it doesn't :( So what I try to achieve is to use my own persistence aspects - not CacheLoader. The scenario is: execute 'getChildren' on slave - this triggers 'getChildren' on coordinator - this triggers my lazy loading aspect - returns some results on coordinator - cache itself transfers data to slave nodes.. Is this scenario possible with JBossCache? Thanks in advance, Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3855199#3855199 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855199 --- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - Re: Does node triggers coordinator methods?
Yes, I want to write my own persistence layer, but let's say I want to do it with 1.1, because that's last stable version. Maybe I'll repeat problem in other words: 1) I want to cache Root object which may have some children: accessed through 'getChildren()' method. 2) I want to combine caching with lazy retrieving those data from database using already written persistence aspect 3) I want only coordinator node to persist (retrieve, store) data. 4) I do not want to load whole data from database as the application starts, but want to use lazy loading. Problems occurs when application has started - no data loaded - and the first node accessing data ('Root.getChildren()') is slave node. That's not the node with persistence aspect applied. This node sees 0 data, because it wasn't loaded by coordinator. In other case, when the coordinator node access data first, it is loaded into cache and distributed also to slave nodes. After that, slave nodes see data. There would be no problem at all, if execution of 'Root.getChildren()' would also trigger execution of the same method on coordinator. But this is as I think impossible. Looking for some way of workaround for it.. Or more in generall: how to let the coordinator know that slave wants to retrieve some data from underlying database, not from cache itself? Hope it is enough.. hope for some tip Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3855214#3855214 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855214 --- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - Re: Problems with using TreeCacheAop for the first time
bwang00 wrote : Can you create a JUnit test case and submit it here or email me ([EMAIL PROTECTED])? I'll take a look. | | Thanks, | | -Ben Ok. Prepared sources and sent to you. When you'll find the_thing, let us know and show where the problem lies. Thanks, Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3854980#3854980 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854980 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: how to change the arguments of a method by AOP?
Hi It works. You must use execution joinpoint instead. It won't work with call joinpoint as it doesn't make sense. Even if it works with AspectJ, when I think about call type it looks strange to change called method's arguments from caller context. Is there some special reason you can't use execution joinpoint? So your code should use MethodInvocation class instead, and binding should be bind poincut=execution(void i$instanceof{SomeInterface}-someMethod()) :) Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3854748#3854748 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854748 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - Re: Problems with using TreeCacheAop for the first time
bwang00 wrote : For setter method, you can't ovelroad it like: | | void setName(String name); | void setName(Object obj); | | This will be fixed in the upcoming 1.2 release in November. In addition, the collection classes api will be enhanced as well. | | -Ben Sorry, but had to let you know.. I have two classes. None of them overloads any method. One implements interface. Every getter/settter exists for every private field (except static ones). Still have: IAE: get/set types differ when putting object to cache.. :( JBossCache 1.1 :( I have sth like this: Root: | List _children; | addChild(Child); | findChild(String name); | | ChildImpl implements Child | | | Child | getName() | ... | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3854804#3854804 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854804 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - Re: get* and set* pointcuts vs. set(field) get(field)
Ok. This was in TreeCacheAop.java's javadoc.. And what about second question? Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3854586#3854586 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854586 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - get* and set* pointcuts vs. set(field) get(field)
Hi, In TreeCacheAop doc you state sth like this: ..Whenever there is state change ('set*' interceptors)..All 'get*' operations.. I wonder if it is a good idea to restrict user of JBossCache to conform to some getters-setters standard. Maybe it would be better to intercept field access (read or write) using standard JBossAOP: get/set(field expression)? You know there might be problems with settle(..) method for example, and maybe someone (I :) ) doesn't like accessing their private implementation through getters and setters.. I _think_ field access joinpoint would solve some problems.. How do you think? Maybe you have that in your plans for 1.2. And one more thing: are you going to extract jbossCache as a concern, you know.. to provide jboss-aop.xml bindings for jbossCache, for users who will need some more advanced concern management? Thanks in advance, Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3854441#3854441 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854441 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: How to get 'caller' object in 'call' type of joinpoint?
I'd be satisfied with that. That's exactly what I meant. Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3854045#3854045 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854045 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - How to get 'caller' object in 'call' type of joinpoint?
Hi! There is part of documentation saying: anonymous wrote : org.jboss.aop.joinpoint.MethodCalledByMethod | ..This particular class encapsulates a method that is calling another method | so that you can access the caller and callee Well, callee we have with invocation.getTargetObject() (right?), but how can I get caller object? I've whole MethodCalledByMethodInvocation.java in front of me and cannot find it... Thanks in advance, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3853867#3853867 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3853867 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Introduction
ad-rocha wrote : | I have some test cases implemented using JUnit, so these classes (Test1, Test2) | extends TestCase. I've created a new class (MyTestCase) that extends and modify | TestCase default implementation, adding new fields and methods. | | | Compiling with AspectJ I can force my test cases to extends MyTestCase instead | TestCase and perform the new behavior... | | Andrea Hi! I've compared two approaches and I think it is impossible to realize your UseCase with JBossAOP. Comparing to AspectJ in field of introductions JBossAOP is quite weak. It is ..% pure Java and that's the reason. As I understood your case, you want some of your test cases to have different behaviour by not extending plain TestCase, but your custom MyTestCase, with custom 'setUp' and 'tearDown' methods for database connection initialization for example. AspetJ will simply put yout MyTestCase class between YourTestCase and TestCase in class hierarchy. This way you can use 'setUp()' method in YourTestCase and override it in MyTestCase.setUp(). With JBossAOP mixins it is not possible to achieve exact the same situation because of problem with: Caused by: java.lang.Exception: Mixin syntax.Base of pointcut | file:/jboss-aop.xml0 is trying to apply an already existing method setUp for | class syntax.Pojo When speaking about introductions: can someone give some answer why do we really need 100% pure Java in JBossAOP? I know about this requirement of loading classes without compiling under JBoss AS. But anyway, in the end they have to be compiled by 'javac' compiler.. So, if there would exist 'jbossaopc' instead of 'javac' (similar to aspectj), then there is no problem... or am I missing sth? Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3853621#3853621 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3853621 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Different handling of XML entities between FINAL and RC1
Hi! No problem. But it's essential for me to have included entities. Say you have a product line and some already developed aspects, and want to include A, B, C concerns for configuration 1 of application, and only A and C for 2nd application. The only way, I think is to have two separate XML AOP files: config1-aop.xml and config2-aop.xml and manage concerns by including them using XML entities. Well, one could use some Ant's task to do this, but this is cleaner I think. So, this way it is possible to develop product lines with JBossAOP. See you, Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3853254#3853254 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3853254 --- This Newsletter Sponsored by: Macrovision For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins003001msi/direct/01/ ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Different handling of XML entities between FINAL and RC1
Hi. I've updated JBossAOP to FINAL version and have problem with my XML entities which I access from XML my-aop-file.xml file. Here's the code: | $cd /home/nthx/private/YYY/Project/ | $ls | configurations/ | src/ | build.xml | | | $cat /home/nthx/private/YYY/Project/configurations/myAOP-A.xml | | ?xml version=1.0 encoding=UTF-8? | !DOCTYPE aop [ |ENTITY include1.ent SYSTEM configurations/META-INF/include1.ent |... | ] | aop | include1.ent; | ... | /aop | | | | $ant | ... | internal:parametrisied-aopc: | [aopc] [info] Total length of filenames to be compiled is greater than 1000, listing files | in --SOURCEPATH: /tmp/src5805.tmp | [aopc] [debug] jboss.aop.class.path is NULL | [aopc] [debug] jboss.aop.search.classpath: 'null' true | [aopc] [debug] jboss.aop.path: /home/nthx/private/YYY/Project/configurations/myAOP-A.xml | [aopc] jboss.aop.path[0]: /home/nthx/private/YYY/Project/configurations/myAOP-A.xml | [aopc] [deploying] file:/home/nthx/private/YYY/Project/configurations/myAOP-A.xml | [aopc] java.io.FileNotFoundException: JAR entry configurations/META-INF/include1.ent not found | in /home/nthx/private/YYY/Project/lib/jboss-aop.jar | [aopc] at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:97) | [aopc] at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:107) | [aopc] at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher. | dispatch(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) | [aopc] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) | [aopc] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) | [aopc] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) | [aopc] at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) | [aopc] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) | [aopc] at org.jboss.aop.AspectXmlLoader.loadURL(AspectXmlLoader.java:948) | [aopc] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:885) | [aopc] at org.jboss.aop.Deployment.deployXmlFile(Deployment.java:164) | [aopc] at org.jboss.aop.Deployment.preconfigThroughSystemProperty(Deployment.java:146) | [aopc] at org.jboss.aop.Deployment.deploy(Deployment.java:36) | [aopc] at org.jboss.aop.AspectManager.instance(AspectManager.java:122) | [aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:160) | [aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:67) | [aopc] java.lang.RuntimeException: [error] failed to load | aop path: /home/nthx/private/YYY/Project/configurations/myAOP-A.xml | [aopc] at org.jboss.aop.Deployment.preconfigThroughSystemProperty(Deployment.java:155) | [aopc] at org.jboss.aop.Deployment.deploy(Deployment.java:36) | [aopc] at org.jboss.aop.AspectManager.instance(AspectManager.java:122) | [aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:160) | [aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:67) | [aopc] Caused by: java.io.FileNotFoundException: JAR entry configurations/META-INF/include1.ent | not found in /home/nthx/private/YYY/Project/lib/jboss-aop.jar | [aopc] at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:97) | [aopc] at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:107) | [aopc] at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher. | dispatch(Unknown Source) | [aopc] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) | [aopc
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Declare error
ad-rocha wrote : Hi, | | Has JBoss AOP a construction like Aspectj declare error? | | Thanks, | | Andre Hi Don't ask here for AspectJ like features ;) Authors will answer you: anonymous wrote : Please use provided solution if you want to have 'declare warning/error' functionality. We want to have simple API.. | | | bind poincut=..your pointcut here for declaring warnings/errors... | | interceptor name=WarningInterceptor/ | | /bind | | | | public class WarningInterceptor implements Interceptor | | { | | public Object invokeNext(Invocation invocation) | | { | | log.debug(Warning: You shouldn't use that poincut); | | return invocation.invokeNext();//proceed() | | } | | } | It was the same, when I wanted native after/before advice types in JBossAOP. Of course in case of simple API - everyone's forgotten about that an interceptor can be emulated with one advice Aspect - yeah, simple API Have a nice day, guys :) Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3852932#3852932 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3852932 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - Re: Problems with using TreeCacheAop for the first time
bwang00 wrote : For setter method, you can't ovelroad it like: | | void setName(String name); | void setName(Object obj); | | This will be fixed in the upcoming 1.2 release in November. In addition, the collection classes api will be enhanced as well. | | -Ben OK, thanks for info. I'm curiuos.. does this overloading also includes constructors and/or methods with different arguments number? Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3852324#3852324 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3852324 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBoss Remoting, Unified Invokers] - Standalone remoting without JBossAS vs Pojo architecture
Hi everybody! I've read documentation about remoting and wished to remote my plain Pojo object: public static void main.. | Pojo my = new Pojo(17); | | after advice: | Dispatcher.simgleton.registerTarget(/pojo, my); | return my; | As I've expected a client code might look like this (from jboss-aspects-library documentation): | (client code) | Pojo proxy = (Pojo)Remoting.createRemoteProxy(/pojo, pojo.getClass(), socket://servername:8084); | new InitialContext().bind(/remote/pojo, proxy); | But I got exception: | java.lang.InstantiationException: org.jboss.aop.proxy$Pojo |at java.lang.Class.newInstance0... |at org.jboss.aop.proxu.ClassProxyFactory.newInstance(ClassProxyFactory.java:60) |at org.jboss.aspects.remoting.Remoting.createRemoteProxy(Remoting.java:46) | | Any suggestions what's wrong here? Best regards, Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3852333#3852333 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3852333 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBossCache] - Re: Problems with using TreeCacheAop for the first time
Hello, I have the same problem with the difference that: -JbossCache 1.1 -standalone without anything else (JBossAS..) -adviced all the classes' fields with 'prepare' tag -have two different applications: Forum and Bank -both uses collections but Bank uses map.values() and a map where values consists of other collections (Lists) -Forum applications works OK *-Bank throws exception when putting into tree : ..IllegalArgumentException: get/set types differ Any suggestions? Is the problem related to lack of support for these collections' methods? Could you be more specific about overloading a call to a method, please? Best regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3852196#3852196 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3852196 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Order of advice/interceptors - Due to: New JBoss AOP Con
Hi! I've seen some announcement of 1.0 final release of JBossAOP next week. How did you/are you going to clear things up with advice/aspect/annotations precedence? Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3851879#3851879 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851879 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: AOP interceptor applied to all JSP/Servlet requests?
Hi. My penny to disscussion. I have Struts application and been using Tomcat server. I'd like to use JBossAOP with it. So what I've tried is: precompiled my plain servlets, jsps (in Struts meaning) with jasper/jspc. This way I got sources of my web pages for my application. As I have sources I can apply JBossAOP aspects to them - including crosscutting every Struts action and applying your own concerns (JBossAOP has some security concern @@org.jboss.aspects.security.*) I haven't tried to put compiled sources into Tomcat - but I think there shouldn't be a problem, as these are normal java classess. The only problem is: this way one looses favourite way of development. On every change of JSP we must recompile, redeploy whole app. :/ Solution would be to use somehow JBoss AS with Tomcat and dynamic classloader. I wait for some JBoss + Tomcat + Struts HOWTO. If there won't be any until September, I'll write one myself :) Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3851730#3851730 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851730 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: AOP interceptor applied to all JSP/Servlet requests?
Hey, thanks for explaining diff between static and dynamic sec model. I will need dynamic one in some application and was wondering whether to use already written JBoss' security aspects. Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3851733#3851733 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851733 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Why lack of 'before' and 'after' advice types is bad..
KevinConner wrote : | Think of my solution as the PrintWriter that surrounds the Writer ;-) | E-e :/ It is not correct type of comparition. But thanks for sample. Let's have a closer look at it, by first showing present state of JBossAOP API | public void MyAspect | extends KevinConnersNiceSolution //or/and additional configuration | { | | Object firstAdviceBefore(...) //@@before | Object firstAdviceAfter(...) //@@after | } | | // and try to imagine that this class has only one! write method | | public java.io.Writer { | voidwrite(char[] cbuf) | //Write an array of characters. | abstract void close() | //Close the stream, flushing it first. | abstract void flush() | //Flush the stream. | } | | But true and useful Writer looks little different - it has write(String) method! (just like number of other methods which don't give you additional funcionallity but help you using other code) | public java.io.Writer { | void write(String str) | //Write a string. | void write(String str, int off, int len) | //Write a portion of a string.voidwrite(char[] cbuf) | ... | } | | // and the way I try to persuade you to | | public void MyAspect | { | | @before Object firstPersistenceAdvice(...) | @after Object secondAdviceAfter(...) | | Object standardAroundAdvice(..)... | } | And I'm sure you don't use this writer.write(Open your eyes) and System.out.println(And keep them opened) and you've written several emails to Sun complaining about Java API too big in this case ;) Yeah, nice to be on the second side of the mirror... Regards, Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3851422#3851422 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851422 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Why lack of 'before' and 'after' advice types is bad..
Bill, will you agree with me that code duplication is something bad? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3851271#3851271 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851271 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Why lack of 'before' and 'after' advice types is bad..
KevinConner wrote : Hiya guys. | | ... as it provides the advices that remove the code duplication | With full respect to your code Kevin (I use it): I will send you my custom code for using writting Strings to System.out. Why should we use System.out.println(String) method if we can use custom Utils.writeMyString(String) method which uses System.out.println(char) internally... anonymous wrote : | I tend to agree with Bill on the matter of simplicity... | I think we're on different sides of a mirror.. What type of simplicity are you talking about? Simplicity of JBossAOP implementation (which I don't care in this case), simplicity of JBossAOP API (come on...JBossAOP has four ways of specifying joinpoints: AspectJ style, annotations in separate XML or within Java source and two additional methods/words won't blow it) or simplicity of using JBossAOP which is the one I care and is most important and it fails in some cases without after/before anonymous wrote : | It is generally easier to keep a simpler framework fast and correct than an expanded one, it is usually easier to learn as well :-). | The case we're discussing (types of advices) is simple to imagine. Come on.. anonymous wrote : | The tradeoff is in ease of development | Yeah, and I thought for a moment aspects and AOP frameworks were for ease of development.. anonymous wrote : | .. Both subclassing and aspects can be used to good effect... | Yes, yes.. so let's use pure OO then. What for do we need AOP advantages if we can implement the same functionallity without AOP.. anonymous wrote : | The other advantage is that you can tailor this to fit your own needs. You are not constrained by a particular implementation of before/after as you have the code and can change it. | I'm not sure if I understood this .. Kevin, thanks for your code. I've designed concerns and implemented them without having to use try-catch-finally in many places. My aim is to separate exception hangling which is a separate concern (separation of concerns). For this I need before/after functionallity. What about other people who will need similar functionallity as I? Will we tell them: use try-catch-finally or adopt Kev's sollution? This disscussion starts to be silly... Regards, Tomasz Nazar View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3851283#3851283 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851283 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Why lack of 'before' and 'after' advice types is bad..
Hi Kevin! I was on short vacations, so forgive delay.. I'm impressed your patience for this topic. I've lost my energy for trying to explain why one needs 'before-after' types of advice. When you get fully functional code for emulation of before-after, send it to JBossAOP CVS, so other app developers can use it transparently - this is suggestion for JBossAOP authors, if you haven't noticed ;) Best regards, Tomasz Nazar PS. Thanks for the code.. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3851135#3851135 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3851135 --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Why lack of 'before' and 'after' advice types is bad..
KevinConner wrote : | ...I must admit that if I was faced with an aspect containing 30 advices then I would be wondering whether the design was correct. Is this connected with your pervayler library? If so, we can take this offline. | | Kev | Hello, Oh my, no way! :) It's for my current employer. PAT works fine with no problems :) But I would be _very_ interested in your opinion about PAT (private).. Tomasz PS. I will leave this topic now. I've said what I wanted. It's up to JBossAOP authors to consider all the facts. Anyway, thanks guys :) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849705#3849705 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849705 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: multiple jboss-aop.xml files?
Hi. I'm not an expert about JBossAOP packaging, but this is what I use: ?xml version=1.0 encoding=UTF-8? | !DOCTYPE aop [ |ENTITY developer1.ent SYSTEM etc/developer1.ent |ENTITY bad-developer2.ent SYSTEM etc/bad_developer1.ent | ] | aop | | developer1.ent; | !--bad_developer2.ent;-- | /aop | On Windows, you must change / to \ I think. You may also use Ant task, to join several XML files into one. Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849714#3849714 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849714 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Why lack of 'before' and 'after' advice types is bad..
Thanks for your time Kevin. Yes it works. I'm impressed. With your solution my 3DAspect looks simple. It's simple to configure it in way that you've provided. And my ExceptionHandlerAspect4D is a simple old JBossAOP aspect, with plain invoke(..). That's enough for me. Ok. But still it is a workaround, although smart and works for this example. But what about a whole aspect of before advice methods? To put, say persistance logic in one Aspect class. Not one separate interceptor for every core method (these 30 methods ;) ) . You know: beforeGetCustomers(), beforeRentAHouse(), beforeAnotherCoreMethod(), etc.. It isn't so simple now. You'll end up with 30 interceptors (extend AbstractInterceptor) or one aspect extending MyCustomAspect where you'll have 30 methods like this one... ouh my.. I'm scared of the code I see.. I won't write it... Wouldn't be it simpler to have: bind pointcut=execution(* Pojo-method1()) | interceptor class=knrc.beforeAfter.Aspect3D type=before / | | /bind | | aspect class=Aspect3D scope=PER_VM / | bind pointcut=execution(* Pojo-method1()) | advice name=beforeMethod1 type=before aspect=Aspect3D / | | /bind Thanks for explaining me this try()..catch()..finally() issues. Best regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849638#3849638 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849638 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Why lack of 'before' and 'after' advice types is bad..
Hi! It's in my mind from some time. Now I share it with you. Imagine situation of say, 3D concern which does sth before invoking core method. It's applied directly on core classes (assuming OO is 2D) Let's suppose someone wants to add 4th dimension concern directly on 3D concern. Its aim would be to provide fault tolerance in a way, that if 3D concern fails, then we should still keep running our core system, but without 3D concern applied. To implement it in JBossAOP one must intercept all execution of advices of 3D concern and surround it with some try()..catch() block. 3D concern (actual state): public Object 3DAdvice(...) | { | if (doSomething()); | invocation.invokeNext(); - this is core method (2D) | } | } Fault tolerant 4D concern (actual state): public Object failTolerance4DAdvice(...) | { | try | { | invocation.invokeNext(); | }catch (SomeNastyException ...) | { | //continue running system... means proceed to the core method | //which may be impossible with current JBossAOP | ??? return invocation.invokeNextAfter3D(); ??? | | } | } In AspectJ style and maybe with JBossAOP future style, one would use before advice style for 3D concern.. 3D concern (after/before state): public Object before3DAdvice(...) | { | doSomething(); | } Fault tolerant 4D concern (after/before state) then would be simple: public Object failTolerance4DBeforeAdvice(...) | { | try | { | invocation.invokeNext(); | }catch (SomeNastyException ...) | { | //continue running system... means proceed to the core method, | //means: do nothing because we are on before advice | //and next invocation in chain is core | } | } What do you say on that? Or maybe there is some nice looking way for invoking invocation after next invocation (which could solve lack before problem)? Regards, Tomasz PS. Anyway, emulation of after and before with around only is ugly. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849402#3849402 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849402 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Why lack of 'before' and 'after' advice types is bad..
Thanks for explanation.. t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849438#3849438 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849438 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - 'within' and 'set' and documentation page
Hi guys. I've tried to define pointcut: bind pointcut= | set(* my.*-*) | AND | within(my.Pojo) | | interceptor class=WriteOperationsInterceptor/ | /bind But it doesn't intercepts what I want. It works with 'call' and 'execution' pointcut types. I need that combination.. PS. Maybe there should be separate page on JBossAOP Wiki about with and withincode. They are quite important in AOP. Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849267#3849267 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849267 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: 'within' and 'set' and documentation page
Sorry, it was to hurry. My pointcut doesn't make sense at all. I can have set(my.*-*) without using within. I've tried to use it in another poincut together with (set(...) OR call(...) OR execution(...)) AND within(my.package). That's why. Sorry, forget about that. t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849269#3849269 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849269 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - QDox bug: semicolon at the end of class source
Hi everyone, public class Pojo | { | | | }; - because of this semicolon ... | we got exception: | [javac] Compiling 2 source files to /home/nthx/tmp/JBossAOPTests/build/classes | [annotationc] Working directory ignored when same JVM is used. | [annotationc] com.thoughtworks.qdox.parser.ParseException: syntax error @[7,2] | [annotationc] at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:464) | [annotationc] at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:570) | [annotationc] at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:448) | [annotationc] at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:276) | [annotationc] at org.jboss.aop.annotation.compiler.ByteCodeAnnotationCompiler.compile(ByteCodeAnnotationCompiler.java:68) | [annotationc] at org.jboss.aop.annotation.compiler.AnnotationCompiler.compile(AnnotationCompiler.java:46) | [annotationc] at org.jboss.aop.annotation.compiler.AnnotationCompiler.main(AnnotationCompiler.java:23) | Just wanted you to know. Don't know about QDox so I put it here. Regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849268#3849268 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849268 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Arguments of method that called some other method.
Hi. Is there any way to get underlined arguments: | public void method(Object _arg1_, String _arg2_) | { | collection.add(arg2); - join point call(* $instanceof{java.util.Collection}add(..)) | | } public Object advice(MethodCalledByMethodInvocation invocation) | { | invocation.getArguments()[0] == arg2; | invocation.getTargetObject() == collection; | invocation.getCallingMethod() == method; | | ??? = _arg1_; | } Thanks.. Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849317#3849317 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849317 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Arguments of method that called some other method.
Bill Burke wrote : you cannot get arg1 as it is higher in the stack. Sh.. :( Thanks for quick answer. t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849321#3849321 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849321 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Arguments of method that called some other method.
kabkhan wrote : But you could create in interceptor to intercept method(), and store the parameters somewhere, and then access that from your other advice. To make a tunnel you say. Thanks for it. It could be done, but this place of storing.. it smells bad for me. I'll consider both. For now I put my joinpoint little higher to 'method()' and it will work for me, even though it breaks consistency of my solution... :( t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849323#3849323 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849323 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Annotate class only and crosscut methods within the clas
Hi And I was going to work today with a thought about posting about this simpler way that I found out yesterday evening... Ehhh :) Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849080#3849080 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849080 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Order of advice/interceptors - Due to: New JBoss AOP Con
Long post .. Andrzej Krzywda wrote : Hi! | | You can write an aspect which contains only precedence rules. This aspect you can use as a configuration file of your application: | | public aspect ForumConfiguration { | |declare precedence: Security, Logging, *; | | } | | It doesn't couple different concerns. | | Andrzej Krzywda Hi. I was thinking a little about it and did some tests. First you're right. That's way to achieve it in AspectJ. It could be sth similar for JBossAOP in future. Second: this solution implies that a developer who uses your AOP library _must_ know AspectJ/JBossAOP syntax, etc. And this is not quite OK, and here is why I think so: Imagine Jim, a developer of, say TicketsReservation system. Business logic for this world is easy and simple. He prototyped his object world with POJOs only, so he has nice running system with tests, and all of it, but these are only POJOs. He still needs persistence, transactions, GUI. And now is the time for him to think about it a little bit. Of course he finds PAT for persistence ;) and some other AOP libraries for other services. But he doesn't know nothing about AOP. He's heard from a friend but didn't write any aspect. And he don't have to! He wishes to annotate transactions, to annotate important business classes, _maybe_ adopt build.xml. But that should be all for him. Compilation (weaving), tests and system runs. So, what I'm trying to tell in this user story, is about some developer who only wishes to use _our_ work. And it happens that our work is to develop set of services for him. And that's great and for us and for him. But for now, we have a problem, with order of aspects (AOP libraries) applied which is still unsolved. And I'm even not sure if Jim should know about problems with precedence at all! What my idea is:existence of some known repository of known services and their precedence priorities and relations to each other. Just like /etc/services has all over the world known port numbers and names, in the same way, maybe there would exist a list of such AOP libraries. But this is only idea and I don't think if it's even realizable... Another low level idea would be to give to our Jim sth like this one: aopc -classpath aop-services/*.aop:$CLASSPATH$ | -Daop.precedence=persistence,transactions | jim.bookingsystem.* | In this case both libraries must not use the same annotations names of course. Ok. And back to reality: there is another related problem I've discovered today. I thought that with this code: /** | * @@first | * @@second | * @@third | */ | public int method1() | { | System.out.println(Method body.. :) ); | return 17; | } I will get: [java] ==O==[main] FirstInterceptor: 28: @first: {} | [java] ==O==[main] SecondInterceptor: 28: @second: {} | [java] ==O==[main] ThirdInterceptor: 28: @third: {} But that's not the case! I got [java] ==O==[main] SecondInterceptor: 28: @second: {} | [java] ==O==[main] FirstInterceptor: 28: @first: {} | [java] ==O==[main] ThirdInterceptor: 28: @third: {} | because definition of poincuts in jboss-aop.xml file was: bind pointcut=execution(* *-@second(..)) |interceptor class=SecondInterceptor/ |/bind |bind pointcut=execution(* *-@first(..)) |interceptor class=FirstInterceptor/ |/bind |bind pointcut=execution(* *-@third(..)) |interceptor class=ThirdInterceptor/ |/bind And I must say I don't like it. As a end user (Jim) I assume that the order of advices (defined by annotations) will be the same as order of their definition in method's comment. To be more verbose, I want @@securable before @@transactionable before @@persistable. And as you see I prefer annotations as a way of specifying system concerns instead of normal poincuts definition. Best regards, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3849088#3849088 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849088 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Annotate class only and crosscut methods within the clas
Yupiii! And once more, I reply to my own post :) So here is the solution with new TYPE_DEF feature: jboss-aop.xml: aop | typedef name=rootable expr=class(@root) / | | bind pointcut=all($typedef{rootable}) | interceptor class=RootInterceptor/ | /bind | | !-- If you annotated class with @@root you don't need this | annotation tag=root class=MyRoot | class/ | /annotation | -- | /aop | Interceptor: public class RootInterceptor |implements Interceptor | { | public Object invoke(Invocation invocation) throws Throwable | { | if (invocation instanceof ConstructorInvocation) | { | ...put logic here for Constructor joinpoints.. | } | | } | } | and core code: /** @@root */ | public class MyRoot | { | public void method1(){} | public static void main(String[] args) | { | System.out.println(--START); | MyRoot root = new MyRoot(); | root.method1(); | System.out.println(--END); | } | } | There is only default constructor here. But the logic from RootInterceptor will be applied. That's great. Output: [java] --START | [java] ==O==[main] RootInterceptor: 23: [EMAIL PROTECTED] | [java] ==O==[main] RootInterceptor: 25: I'm in ConstructorInterceptor | [java] ==O==[main] RootInterceptor: 23: MyRoot_method1_N4778546224999628736_ | [EMAIL PROTECTED] | [java] --END | --Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3848988#3848988 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3848988 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Order of advice/interceptors - Due to: New JBoss AOP Con
kabkhan wrote : I'm currently working on specifying things via annotations :-) | That's why I'm trying to warn you before :) t. PS. I don't have idea how to solve it, in a nice manner, yet. When I get some I'll let you know.. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3848766#3848766 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3848766 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: On emore AJ vs. JBAOP Querstion. Was Re: JBoss AOP vs. A
rmcdonough wrote : .I've been doing more reasearch on AOP overall | and more research on AspectJ and JBossAOP. Now I'm not sure that I'll be | phrasing thsi right, but it seems that AspectJ doesn't allow you to apply | advice or introduction on an existing class without explicitly defining defining | a join point within an Ascpect. Also, once you make this change, you will also | have to recompile all your classes again. Hi. So, to clear things up... You may introduce sth in AspectJ's aspect to some class without specifying pointcut (what for would you specify it?). With AspectJ; to apply advice you always have to specify some kind of pointcut/join point. In AspectJ the only possibility to apply some advice is by defining it on some pointcut (but AspectJ people work on annotations). About recompiling: of course you have to recompile classes (with ) whenever you change sth in AspectJ. But the same goes for JBossAOP (if you don't use custom classloader). Even if you add some @metadata to some method - you still need to recompile the class. But, is there some problem with recompiling? Sincerely, Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3848291#3848291 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3848291 --- This SF.Net email is sponsored by: thawte's Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: java.lang.ClassCastException in Forum_new_$aop
Hi After long time I had a fresh look at my code and it happend the exception is _my_ fault. Sorry guys. During around Forum construction I've returned object of different class, so that was the cause. Sorry for this, once more.. t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3847776#3847776 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847776 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: introduction class syntax
Hello The solution might be to package adviced and non-adviced classes in two different packages, and instead `*` use sth like: `bind ... com.mycompany.aoptized.*`. (unless you have quite complicated package tree) I don't know if syntax that you provide in the introduction is even supported. And btw, what do you need execution-of-everymethod for? You must have some real special requirements.. Hmm, as I think.. AspectJ's `within` might help, but JBossAOP doesn't provide it. One may use `all(com.MyClass)` instead.. t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3847020#3847020 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847020 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Instrumentor makes _transient_ fields when introducing f
Bill Burke wrote : | Sorry for the long delay. I'll look into your ClassCast problems if they still exist with this build. | | Thanks, | | Bill Yes, it still exists - had vacations, so did nothing with that - waiting for feedback.. I've forgiven delay :) t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3846719#3846719 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3846719 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: java.lang.ClassCastException in Forum_new_$aop
Bill Burke wrote : I'm not sure what you're saying with this statement: | | Modified not to create _transient_ mixin fields. | | Can you elaborate? Hi Bill, Sorry that you didn't read my erlier post, then you would have known.. http://www.jboss.org/index.html?module=bbop=viewtopict=53078 Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3845688#3845688 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3845688 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - java.lang.ClassCastException in Forum_new_$aop
Hi. Don't know where to find cause of error: | [java] java.lang.ClassCastException | [java] at org.nthx.pat.demo.Forum.Forum_new_$aop(Unknown Source) | [java] at org.nthx.pat.demo.Driver.main(Unknown Source) | [java] Exception in thread main | Decompiled Forum.class: | public class Forum | implements Advised, PrevalentSystem, IdentityMap, BusinessObject, Identificable, Persistable | { | | public static Forum Forum_new_$aop() | { | if(((Advisor) (aop$classAdvisor$aop)).doesHaveAspects) | return (Forum)aop$classAdvisor$aop.invokeNew((Object[])null, 0); | else | return new Forum(); | } | Client's code for creating Forum: | public class RootCreationInterceptor | { | public Object invoke(Invocation invocation) | throws Throwable | { | ConstructorInvocation ci = (ConstructorInvocation) invocation; | String patRootClassName = ci.getConstructor().getName(); | Class classOfPatRoot = Class.forName(patRootClassName); | PrevalentSystem root = (PrevalentSystem) classOfPatRoot.newInstance(); | | . | | public class Driver | { | | public static void main(String[] args) | { | Forum forum = new Forum(); | log.debug(-= Finished creating Forum object =-); | | jboss-aop.xml: | bind pointcut=execution(*-@pat.root(..)) | interceptor class=org.nthx.pat.RootCreationInterceptor / | /bind | JBossAOP version is CVS 10.08.2004 version. Modified not to create _transient_ mixin fields. Help! Tomasz ps. Can attach full source code if needed View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3845600#3845600 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3845600 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Annotate class only and crosscut methods within the class
Hi all During weekend heavilly developed (what? later :) ) with JBossAOP. Question by the code: package my.demo; | /** @@my.root */ | public class RootClass | { | public RootClass() | { | //constructor here | //... | } | } | | jboss-aop.xml | bind pointcut=execution(my.demo.*-@my.root) | interceptor class=RootCreationInterceptor / | /bind | I want to crosscut every constructor of class that has only been annotated with tag @@my.root for the class (not for the constructor). I don't want to annotate _every_ constructor inside class (which works with JBossAOP). I've also looked at tutorial at page about annotation introductions. It could also work for me, if I can _introduce_ annotation to constructors, by specifying only tag for the whole class. But annotation-introducionts seem not to work that way. Sth like that, doesn't work: | jboss-aop.xml: | annotation-introduction expr=constructor(my.demo.*-new()) AND class(@my.root) | @my.root | /annotation-introduction | Although, above doesn't make sense, I think. Are there any possibilities of solving my problem? Thanks, for help :) Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3845193#3845193 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3845193 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Instrumentor makes _transient_ fields when introducing field
Hi, Another separate topic after work at weekend. I need my objects to be serialized. I also need to introduce Identificable implementation to every of them, to give them OID. I did this by introducing IdentificableMixin: | public class IdentificableMixin... | { | private Long oid; | private void setOID(... | private Long getOID(... | } After logging few lost hours it happened that (by checking decompiled class) JBossAOP introduces this mixin to the class as a field and makes it transient. Decompiled sample: |private transient IdentificableMixin _my$demo$getOID$IdentificableStringMixin$aop$mixin; | Unfortunately for me it happend to be _transient_ which doesn't serialize. So my app magically didn't work :/. For my app I need mixin fields to be normal - not transient. I found 2 places in JBossAOP code which I think are responsible for that: jboss.aop.instrument.Instrumentor: | | private CtField addProtectedField(... | { | field.setModifiers(Modifier.PROTECTED | Modifier.TRANSIENT); | | private CtField addPrivateField( |{ | | field.setModifiers(Modifier.PRIVATE | Modifier.TRANSIENT); I've removed Modifier.TRANSIENT, and all the fields (I think) that JBossAOP introduces to classes are not transient. So, I did this, but are there any reasons for them to be transient? I know that you didn't realized that someone will use Mixins in that way. So you see now (or will see in some days :) ). Comments? Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3845194#3845194 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3845194 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
kabkhan wrote : Weird, I unzipped your file and it compiled fine. Hope I'm not missing something! For what it's worth I'm using jdk 1.4.2 and ant 1.6.1, my output follows: | Hi. I checked other j2sdk versions: j2sdk1.4.1_06 (win) - problem exists 1.4.2_05 (win) - problem doesn't exists. I'll go on with investigation of the problem... -- Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844768#3844768 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844768 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
kabkhan wrote : I misread 1.4.1_06 to be 1.4.2_06, and was wondering whyit does not exist. I'll get Bill to verify, but I believe you must use 1.4.2. | | Cheers, | | Kabir Hi, I don't know if I understand your answer correctly (or you understood me). So, repeating in other words: The file I attached, runs with problems that I described earlier on 1.4.1 sdk version. You downloaded it and run on 1.4.2, and there was no error. So and I did with 1.4.2_05 (win) version, and problem was gone due to sdk upgrade. So, I upgraded my whole environment to 1.4.2 and everything with calls to private members works correctly. The exact version of jdks, that problem arrises are: | D:\nthx\E8-workspace\JBossError\sent-to-NET\JBossErrorjava -version | java version 1.4.1-rc | Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b19) | Java HotSpot(TM) Client VM (build 1.4.1-rc-b19, mixed mode) | | and/or ... | | D:\nthx\E8-workspace\JBossError\sent-to-NET\JBossErrorjava -version | java version 1.4.1_06 | Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_06-b01) | Java HotSpot(TM) Client VM (build 1.4.1_06-b01, mixed mode) | D:\nthx\E8-workspace\JBossError\sent-to-NET\JBossErrorant -version | Apache Ant version 1.6.0 compiled on December 18 2003 | t. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844781#3844781 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844781 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
kabkhan wrote : Hello there, | | I've added a fix for this. Can you get the latest from cvs and try again? | | Hi, I would like to, but.. I need help with cvs compilation. I did like Bill said: (windows) | cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/jboss login | cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/jboss co jboss-head | (approx 30 minutes of downloading...) | cd jboss-head/aop | build.bat dist | ... | dist: | BUILD FAILED | D:\nthx\install\jbossaop\jboss-head-10.08.2004\jboss-head\aop\build.xml:303: D:\nthx\install\jbossaop | \jboss-head-10.08.2004\jboss-head\common\output\lib not found. | ) | so... mkdir ..\common\output | mkdir ..\common\output\lib | build.bat dist | [zip] Building zip: D:\nthx\install\jbossaop\jboss-head-10.08.2004\jboss-head\aop\jboss-aop-dis | t.zip | | BUILD SUCCESSFUL | It created dist file, without classes in it. Where can I find info about building jboss-aop library? How do you people build it? Task: 'compile' doesn't work: D:\nthx\install\jbossaop\jboss-head-10.08.2004\jboss-head\aopant compile | Buildfile: build.xml | | _buildmagic:init: | Trying to override old definition of task property | | _buildmagic:init:buildlog: | | configure: | Overriding previous definition of reference to xdoclet.task.classpath | | init: | | compile-classes: | [echo] classes go to: D:\nthx\install\jbossaop\jboss-head-10.08.2004\jboss-head\aop/output/ | classes | [javac] Compiling 297 source files to D:\nthx\install\jbossaop\jboss-head-10.08.2004\jboss-head\a | op\output\classes | [javac] D:\nthx\install\jbossaop\jboss-head-10.08.2004\jboss-head\aop\src\main\org\jboss\aop\Aspe | ctManager.java:32: package org.jboss.util.loading does not exist | [javac] import org.jboss.util.loading.Translatable; | [javac] ^ | [javac] D:\nthx\install\jbossaop\jboss-head-10.08.2004\jboss-head\aop\src\main\org\jboss\aop\Aspe | ctManager.java:33: package org.jboss.util.loading does not exist | [javac] import org.jboss.util.loading.Translator; | [javac] ^ | ... | Is this me, or sth is really wrong? Help appreciate.. Tomasz View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844643#3844643 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844643 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
Ok. I figured it out after a while, and did as you said. Problem is with finding door: and it was building all jboss. So, thanks anyway. Let's go back to the problem. I compiled today's version of JBossAOP, and switched jboss-aop.jar only. Before the operation, everything (with `execution of public PreparedStatements.getConnection()) worked fine. After switching to the latest jbossaop: | [aopc] [no comp needed] D:\nthx\E8-workspace\JBossAOPBanking\build\classes\banking\ | aspects\persistance\AccountGatewayTest.class | [aopc] [trying to transform] banking.aspects.persistance.BankingWithPersistanceDemo | [aopc] error getting:banking.core.Account. 'credit' | [aopc] java.io.FileNotFoundException: | D:\nthx\E8-workspace\JBossAOPBanking\build\classes\banking\aspects\persistance\ | BankingWithPersistanceDemo_N_1585215547985831794banking_aspects_ | persistance_BankingWithPersistanceDemo7162818025563628934MethodCalledByMethodInvocation.class | (The system cannot find the path specified) | [aopc] at java.io.FileOutputStream.open(Native Method) | [aopc] at java.io.FileOutputStream.init(Unknown Source) | [aopc] at java.io.FileOutputStream.init(Unknown Source) | [aopc] at org.jboss.aop.instrument.TransformerCommon.compileOrLoadClass(TransformerCommon.java:113) | [aopc] at org.jboss.aop.instrument.CallerTransformer$CallerExprEditor.createOptimizedMethodCalle | dByMethodInvocationClass(CallerTransformer.java:979) | [aopc] at org.jboss.aop.instrument.CallerTransformer$CallerExprEditor.modifyMethod(CallerTransformer.java:395) | [aopc] at org.jboss.aop.instrument.CallerTransformer$CallerExprEditor.edit(CallerTransformer.java:320) | [aopc] at javassist.expr.ExprEditor.doit(ExprEditor.java:114) | [aopc] at javassist.CtBehavior.instrument(CtBehavior.java:328) | [aopc] at org.jboss.aop.instrument.CallerTransformer.applyCallerPointcuts(CallerTransformer.java:74) | [aopc] at org.jboss.aop.instrument.Instrumentor.applyCallerPointcuts(Instrumentor.java:448) | [aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:511) | [aopc] at org.jboss.aop.AspectManager.translate(AspectManager.java:509) | [aopc] at org.jboss.aop.AspectManager.transform(AspectManager.java:463) | [aopc] at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:196) | [aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:157) | [aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:61) | [aopc] java.lang.RuntimeException: failed to transform: banking.aspects.persistance.BankingWithPersistanceDemo | [aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:548) | [aopc] at org.jboss.aop.AspectManager.translate(AspectManager.java:509) | [aopc] at org.jboss.aop.AspectManager.transform(AspectManager.java:463) | [aopc] at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:196) | [aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:157) | [aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:61) | [aopc] Caused by: javassist.CannotCompileException: by java.io.FileNotFoundException: | D:\nthx\E8-workspace\JBossAOPBanking\build\classes\banking\aspects\ | persistance\BankingWithPersistanceDemo_N_1585215547985831794banking_aspects_persistance_ | BankingWithPersistanceDemo7162818025563628934MethodCalledByMethodInvocation.class (The system cannot find the path specified) | [aopc] at org.jboss.aop.instrument.CallerTransformer$CallerExprEditor.edit(CallerTransformer.java:328) | [aopc] at javassist.expr.ExprEditor.doit(ExprEditor.java:114) | [aopc] at javassist.CtBehavior.instrument(CtBehavior.java:328) | [aopc] at org.jboss.aop.instrument.CallerTransformer.applyCallerPointcuts(CallerTransformer.java:74) | [aopc] at org.jboss.aop.instrument.Instrumentor.applyCallerPointcuts(Instrumentor.java:448) | [aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:511) | [aopc] ... 5 more | [aopc] java.lang.RuntimeException: failed to transform: banking.aspects.persistance.BankingWithPersistanceDemo | [aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:548) | [aopc] at org.jboss.aop.AspectManager.translate(AspectManager.java:509) | [aopc] at org.jboss.aop.AspectManager.transform(AspectManager.java:463) | [aopc] at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:196) | [aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:157) | [aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:61) | [aopc] Caused by: javassist.CannotCompileException: by java.io.FileNotFoundException: | D:\nthx\E8-workspace\JBossAOPBanking\build\classes\banking\aspects\persistance
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
kabkhan wrote : Also, can you try changing the optimized mode to false, and see what results that gives you. | You do this by setting the jboss.aop.optimized system property to false. Even if that works, if you could post the example that would be greatly appreciated. | | Thanks Ok, I attached file: http://www.jboss.org/wiki/attach?page=RunningAOPStandalone%2FJBossErrorProjectByNthx.zip I cannot attach my sources (company's confidential), so I've spent two hours finding error reason, and I cut the sources to minimum. And I don't believe the reason: try to change class and package name of class BankingWithPersistanceDemo... you'll see :) For demo, just.. ant cu - nthx PS. How to transfer jboss.aop.optimized property to ant task? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844683#3844683 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844683 --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - IllegalAccessException
Hi, I think I have some configuration problem with j2sdk or sth similar, cause you say in earlier thread and in docs, that it's normal to advice private class members. This is part of my class, and method I want to advice: | public class banking.aspects.persistance.PreparedStatements | { | private Connection getConnection(){ ... } | ^ | ...} | That's part of jboss-aop.xml: | aspect class=banking.jbossaop.transactions.DbConnectionAspect scope=PER_VM / | bind pointcut=call(* banking.aspects.persistance.DatabaseGateway-getConnection()) | OR | call(* banking.aspects.persistance.PreparedStatements-getConnection()) | advice name=switchConnection | aspect=banking.jbossaop.transactions.DbConnectionAspect / | /bind | And error from ant looks... | run-static: | internal:parametrisied-java: | [java] ==DB==[main] Initializing database connection.. | [java] ==DB==[main] Generating connection.. | [java] ==DB==[main] Generating normal connection from DB.. | [java] ==DB==[main] Connection: [EMAIL PROTECTED] generated successfully. | [java] ==JB==[main] *PersistanceAspectCustomerManager-getNextId | | [java] java.lang.IllegalAccessException: Class org.jboss.aop.joinpoint.MethodCalledByMethodInvocation can not access a | member of class banking.aspects.persistance.PreparedStatements | with modifiers private | | [java] at sun.reflect.Reflection.ensureMemberAccess(Unknown Source) | [java] at java.lang.reflect.Method.invoke(Unknown Source) | [java] at org.jboss.aop.joinpoint.MethodCalledByMethodInvocation.invokeNext(MethodCalledByMethodInvocation.java:71) | [java] at banking.jbossaop.transactions.DbConnectionAspect.switchConnection(Unknown Source) | [java] at org.jboss.aop.advice.banking.jbossaop.transactions.DbConnectionAspect0.invoke(DbConnectionAspect0.java) | [java] at org.jboss.aop.joinpoint.MethodCalledByMethodInvocation.invokeNext(MethodCalledByMethodInvocation.java:60) | [java] at org.jboss.aop.ClassAdvisor.invokeCaller(ClassAdvisor.java:1453) | cut | Any ideas about sth wrong here? Thanks.. -- nthx View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844544#3844544 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844544 --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
clebertsuconic wrote : | Are you sure you are calling invocation.invokeNext() in your interceptor? | | This is just a guessing, but at a first look looks like you are calling the | banking.aspects.persistance.PreparedStatements.getConnection | instead invocation.invokeNext(). | | Clebert Hi, Of course it's impossible to run ...PreparedStatements.getConnection() within anywhere except the class, cause it's private - except one would invoke it by using reflection, which I don't. But here is the aspect class, that I haven't provided before: | public class DbConnectionAspect | { | private DbConnectionsHelper dbConnectionsHelper; | | public DbConnectionAspect() | { | dbConnectionsHelper = new DbConnectionsHelper(); | } | | public Object switchConnection(Invocation invocation) | throws Throwable | { | invocation.invokeNext(); | return dbConnectionsHelper.getConnectionForCurrentThread(); | } | } | As u see, I totally ignore returned value of invocation.invokeNext() which is my aim: to switch global connection into per-thread connection (wchich allows one to program threaded apps in non-threaded way :] ) I'll check these tests from CVS... --nthx View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844563#3844563 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844563 --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
Hi, Problems with cvs compilation: First: downloaded whole jboss cvs tree (default branch) cd jboss-aop build.bat dist Second: In file: jboss-aop/build.xml line: | fileset dir=${project.thirdparty}/xdoclet-xdoclet/lib | is incorrect. There is no dir called xdoclet-xdoclet. But I replaced with correct one, and then removed 'javadocs' from target 'dist' cause of: | [javadoc] D:\nthx\install\jbossaop\jboss-cvs-04.08.2004 | \AnnotatedPOJO.java:16: illegal character: \64 | [javadoc]@trace public int field; | [javadoc]^ | Then: `$move 'thirdparty/javassist/javassist ..` cause of: | BUILD FAILED | D:\nthx\install\jbossaop\jboss-cvs-04.08.2004\jboss-ao | -cvs-04.08.2004\thirdparty\javassist\lib not found. | And the same with: oswego-concurrent, trove, qdox, junit, And before that: | mkdir ..\common\output\lib | build dist | And thank-you JBoss fellows .. `build dist` built a jar file without classess. `build jars` doesn't work.. problem with not-having other classess (jboss-common) Sorry, but I've seen many build configurations and this isn't one.. Is this on purpose? This you call 'professional'? Need help with writing ant files? People, wake up! It's becoming to be not funny... As stated Scott Stark : Its baseline status requires nothing other than running the jboss-head/build/build.xml script. That's the answer? Please explain... --nthx View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844570#3844570 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844570 --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: IllegalAccessException
kabkhan wrote : I'm investigating a fix. For now, could you try using something else than caller pointcuts? For example: | | | aspect class=banking.jbossaop.transactions.DbConnectionAspect scope=PER_VM / | | bind pointcut=execution(* banking.aspects.persistance.DatabaseGateway-getConnection()) | | | | DatabaseGateway.getConnection() is private poincut type: 'execution' instead of 'call' It works.. without any problems. Thank you. I still will need 'call' type, though.. -- nthx View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3844573#3844573 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3844573 --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [AOP on JBoss (Aspects/JBoss)] - Re: Pointcut expression for methods that take arrays as argu
Hi, there. This is my first post after checking out JBossAOP, and implementing persistance and transaction layer for my POJOs with it. So ... Is it possible to intercept element-of-an-array assignment? I mean: | //I'd like some code here (through Interceptor, of course) | myArray[5] = newElement; | //maybe I also would like some code 'around'.. | //maybe sth like this: myArray[5] = getCachedMyElement; | //or even 'after': UPDATE OBJECT_TABLE WHERE ... | And the binding in jboss-aop.xml, would look like this: | aop | bind pointcut=array-element-set(myClass.myArray)... | bind pointcut=array-element-get(myClass.myArray) ... | /aop | If I had the functionality, then I would write persistance-layer with no limitations on collections classes, or whatever limitations existing persistance layers may have. More deeply: One would not write bindings for every collection class, i.e. collection.add(), collection.get(i) One would write generic persistance, by: intercepting every-variable-change-including-array-element-assignment. And the real example of this is: java.util.ArrayList, where it stores data internally in an array: | package java.util; | public class ArrayList { | | private transient Object[] elementData | ... | public boolean add(Object o) { | ensureCapacity(size + 1); // Increments modCount!! | elementData[size++] = o; | return true; | } | ... | I think you know what I mean now. I'd like to have simple | bind poincut=array-element-set(java.util.ArrayList-elementData) | instead of binding, and implementing every collection class' method which manages data. PS. Of course AspectJ also doesn't have functionality mentioned above, either View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3843602#3843602 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3843602 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development