aop

Java: testing thread access to "not thread-safe" methods.

My strategy for threading issues in a Swing Java app is to divide methods in three types: methods that should be accessed by the GUI thread. These methods should never block and may call swing methods. Not thread-safe. methods that should be accessed by non-GUI threads. Basically this goes for all (potentially) blocking operations suc...

Mono Cecil vs. PostSharp Core vs. Microsoft CCI for implementing AOP framework

Which is the better in terms of capabilities, easy of use, documentation, samples, community/support, VS integration, known implementations, long-term viability, and build speed to implement a custom AOP framework? I'll start with what I know (I have only tried PostSharp to so far): Microsoft Common Compiler Instrastruture (CCI): I've...

Aspect oriented programming in r: Any libraries available?

Are there any R-project packages that implement AOP? Or even better an example of an R package that uses any such AOP library. ...

Adding validations to Java Beans via Annotations

I want to add validations to a Java Bean. For example, I want to do the following: @MaxLength(50) @RequiredField public void setEmployeeName(String name){ ..... } I know I can write code that gets the validations for a specific method by calling method.getDeclaredAnnotation after all the bean values have been set. I would like to...

Aspect Oriented Programming in C#

HI, Any good resources to wrap my head around Aspect Oriented Programming? PS:- I need to understand AO programming not the libraries or frameworks available for .NET or C# :) ...

PostSharp: OnMethodBoundaryAspect doesn't get called

Hi I'm using PostSharp to apply a CompoundAspect to a ActiveRecord class (from CastleProject). The code looks like this: public override void ProvideAspects(object targetElement, LaosReflectionAspectCollection collection) { Type targetType = (Type)targetElement; RevertibleSubAspect revertible = new RevertibleSubAspect(); re...

Spring.NET does not use AOP AfterReturningAdvice

I am trying to use Spring.NET AOP in my project for logging purpose, and two advices work great, however, the third does not get used at all. Here is my wiring: <!-- the "After" Advice --> <object id="GraphicsContextManagerAfter" type="PicturetoolWeb.App.Advice.GraphicsContextManagerAfter, PicturetoolWeb.App"> </object> <!-- The Proxy...

incompatible types found: required: default enums in annotations

[javac] C:\ws\galileo\test\Cacheable.java:13: incompatible types [javac] found : com.io.CacheType [javac] required: com.io.CacheType [javac] public CacheType id() default CacheType.COMMON; I really don't get this one. I have a project where I'm custom building a caching interceptor for Spring. It simply is a look by cache name to p...

Adding aspect to an abstract method?

PostSharp gives this error: PostSharp: Cannot apply an OnMethodInvocation aspect (...) with target-site weaving on the abstract or external method "...". Consider excluding the aspect from this method or use call-site weaving. Suggested call-site weaving is not an appropriate solution for me. Is there any way to add pre/p...

AOP can be use to share data among different running threads in application process?

UPDATE: I am not clear in what context AOP should be used? As we can use AOP for logging purpose, security(Authentication), please suggest some other scenarios where we can take benefit of AOP. Can AOP be used to share data among different running threads in application process? ...

Aspect Oriented Programming: What do you use PostSharp for?

Hi, I would like to ask users of the AOP framework Postsharp, what specifically are you using the framework for? Also, I know it's use has a big negative impact on build times, but how about runtime performace? Is there much of a hit? Thanks, S ...

AOP based object injection fails for class name starting with lower case.

I am doing object injection using AOP. There exists a class which starts with samllcase (testClass) wherein the object is not getting injected. I converted the file name (legacy class) so that it starts with capital case (TestClass) and updated references in AOP.xml and spring-beans.xml containing the bean definitions and it it started ...

How can you handle cross-cutting conerns in JAX-WS without Spring or AOP? Handlers?

I do have something more specific in mind, however: Each web service method needs to be wrapped with some boiler place code (cross cutting concern, yes, spring AOP would work great here but it either doesn't work or unapproved by gov't architecture group). A simple service call is as follows: @WebMethod... public Foo performFoo(...) { ...

NHibernate conversation with ASP.NET+IoC+PostSharp?

Does anybody know a good example of how an NHibernate conversation can be used in a Web context (ASP.NET or ASP.NET MVC) using an IoC container and AOP? Personally, I use Castle/Windsor and PostSharp, but I will appreciate everything that points me to the right direction. ...

Is it possible in Springframework 2.5.6 to have scope="session" create the object on session create

I've got a project using Jetspeed portal and Springframework 2.5.6 where I need a Jetspeed level service to be unique for each user logged in. This would be best done using Spring AOP and scope="session". The problem is, that these are behind the scenes beans that need to be running as soon as the session in initiated. It appears that ...

How can I use a singleton class in AOP (aspect oriented programming)?

Language by choice is AspectJ but I am open for a generic answer. ...

How can I get aop:config to work with BeanFactoryPostProcessor in spring

I am trying to prototype some aop logic to handle logging logic. While I am doing it, I thought I would be nice to use BeanFactoryPostProcessor (not BeanPostProcessor) to automatically set bean name to 'name' property of target beans, so I can use it for logging if needed. I got the aop autoproxying logic (aop:config) working before...

Aspect-Oriented Objective-C Library?

Is there any Aspect-Oriented Objective-C library that I could perhaps use for iPhone development? ...

Implementing INotifyPropertyChanged or similar custom event in base class

Is there a way to do this: I need to develop the easiest way to support registering to property changes of some class. Apart from manual way of adding INotifyProperyChanged support, is there a way to do it like this: class Base ... // all notification logic here class Child { public string Name { get; set; } public int SomeNu...

Monitoring Changes of a Bean to build deltas?

Hi StackOverflow! I have several Beans in my Application which getting updated regularly by the usual setter methods. I want to synchronize these beans with a remote application which has the same bean classes. In my case, bandwidth matters, so i have to keep the amount of transferred bytes as low as possible. My idea was to create delt...