Will Spring support CDI? [closed]

Even though Spring is open source and used and supported by a large community, its future development is controlled by a single company (spring source / vmware). As such, its decisions are inherently non-public and certainly influenced by a large number of factors – like the currents demands of the community, but certainly also financial … Read more

What ever happened to Aspect Oriented Programming? [closed]

There has maybe been a lot of hype in the early 2000’s, and what happened is the following: there has been a lot of attempts to create aspect-oriented frameworks, and these attempts have merged into two significant projects in the Java sphere: AspectJ and Spring AOP. AspectJ is complete, complex, academic, somewhat overengineered. Spring AOP … Read more

What can AOP do that OOP can’t do?

AOP is OO; Aspects are objects. I don’t understand why the either/or mentality. AOP is the perfect choice for chained, cross-cutting concerns (e.g. logging, security, transactions, remote proxying, etc.) UPDATE: I think the criticisms offered by the OP are subjective and not as universally widespread as stated. Assertions stated without proof can be dismissed without … Read more

Spring AOP pointcut that matches annotation on interface

If I understand you correct, you want a pointcut that finds all methods in classes that extends MyService and is annotated and with the preferred arguments. I propose that you replace: execution(public * com.mycompany.myserviceimpl.*(..)) with: execution(public * com.mycompany.myservice.MyService+.*(..)) The plus sign is used if you want a joinpoint to match the MyService class or a … Read more

Any AOP support library for Python?

See S.Lott’s link about Python decorators for some great examples, and see the defining PEP for decorators. Python had AOP since the beginning, it just didn’t have an impressive name. In Python 2.4 the decorator syntax was added, which makes applying decorators very nice syntactically. Maybe if you want to apply decorators based on rules … Read more

Can I do Aspect Oriented Programming in Scala?

Mixin has been the classic way to introduce AOP in Scala (as in “AOP-style Mixin Composition Stacks in Scala” from Jonas Bonér). But I know only of “Method Proxy-Based AOP in Scala” (Daniel Spiewak — also here on SO — and Tian Zhao) as an advanced AOP implementation in Scala (source code here). Our technique … Read more

What’s your “best practice” for the first Java EE Spring project? [closed]

Small tip – I’ve found it helpful to modularize and clearly label my Spring xml context files based on application concern. Here’s an example for a web app I worked on: MyProject / src / main / resources / spring / datasource.xml – My single data source bean. persistence.xml – My DAOs/Repositories. Depends on datasource.xml … Read more

tech